From 78f3b19b58df699ef883b89a7a44531407377719 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 11 Sep 2023 12:49:10 +0800 Subject: [PATCH 01/59] Removes spacether (#16551) * Update README.md * Update team.yml * Update pom.xml --- README.md | 2 +- pom.xml | 5 ----- website/src/dynamic/team.yml | 3 --- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/README.md b/README.md index 76abf4179edb..49efc07dc3c9 100644 --- a/README.md +++ b/README.md @@ -1168,7 +1168,7 @@ If you want to join the committee, please kindly apply by sending an email to te | Perl | @wing328 (2017/07) [:heart:](https://www.patreon.com/wing328) @yue9944882 (2019/06) | | PHP | @jebentier (2017/07), @dkarlovi (2017/07), @mandrean (2017/08), @jfastnacht (2017/09), [@ybelenko](https://github.com/ybelenko) (2018/07), @renepardon (2018/12) | | PowerShell | @wing328 (2020/05) | -| Python | @spacether (2019/11) [:heart:][spacether sponsorship] @krjakbrjak (2023/02) | +| Python | @krjakbrjak (2023/02) | | R | @Ramanth (2019/07) @saigiridhar21 (2019/07) | | Ruby | @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) | | Rust | @frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) @jacob-pro (2022/10) | diff --git a/pom.xml b/pom.xml index 40a65602d3e3..18a60a479670 100644 --- a/pom.xml +++ b/pom.xml @@ -53,11 +53,6 @@ Sunn sunn.ssb@live.com - - spacether - Justin Black - justin.a.black@gmail.com - github diff --git a/website/src/dynamic/team.yml b/website/src/dynamic/team.yml index ce9e99772324..c30c679012ca 100644 --- a/website/src/dynamic/team.yml +++ b/website/src/dynamic/team.yml @@ -15,6 +15,3 @@ core: - name: sunn github: etherealjoy joined: 2019/06 - - name: Justin Black - github: spacether - joined: 2020/05 From 1901bf23ea3ae961c09901fb2ad44b7cee3e7556 Mon Sep 17 00:00:00 2001 From: devhl-labs Date: Mon, 11 Sep 2023 08:05:02 -0400 Subject: [PATCH 02/59] use TypeInfoResolver (#16548) --- .../languages/CSharpClientCodegen.java | 4 +- .../generichost/ApiResponse`1.mustache | 32 +-- .../libraries/generichost/AsModel.mustache | 10 - .../generichost/HostConfiguration.mustache | 22 +- .../SourceGenerationContext.mustache | 29 +- .../csharp/libraries/generichost/api.mustache | 47 +-- .../UnitTest1.cs | 67 ++--- .../UseSourceGeneration/Api/AnotherFakeApi.cs | 5 +- .../src/UseSourceGeneration/Api/DefaultApi.cs | 10 +- .../src/UseSourceGeneration/Api/FakeApi.cs | 15 +- .../Api/FakeClassnameTags123Api.cs | 5 +- .../src/UseSourceGeneration/Api/PetApi.cs | 12 +- .../src/UseSourceGeneration/Api/StoreApi.cs | 7 +- .../src/UseSourceGeneration/Api/UserApi.cs | 5 +- .../Client/ApiResponse`1.cs | 37 +-- .../Client/HostConfiguration.cs | 268 ++++++------------ .../src/UseSourceGeneration/Model/Activity.cs | 29 +- .../ActivityOutputElementRepresentation.cs | 29 +- .../Model/AdditionalPropertiesClass.cs | 29 +- .../src/UseSourceGeneration/Model/Animal.cs | 29 +- .../UseSourceGeneration/Model/ApiResponse.cs | 29 +- .../src/UseSourceGeneration/Model/Apple.cs | 29 +- .../src/UseSourceGeneration/Model/AppleReq.cs | 29 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 29 +- .../Model/ArrayOfNumberOnly.cs | 29 +- .../UseSourceGeneration/Model/ArrayTest.cs | 29 +- .../src/UseSourceGeneration/Model/Banana.cs | 29 +- .../UseSourceGeneration/Model/BananaReq.cs | 29 +- .../UseSourceGeneration/Model/BasquePig.cs | 29 +- .../Model/Capitalization.cs | 29 +- .../src/UseSourceGeneration/Model/Cat.cs | 29 +- .../src/UseSourceGeneration/Model/Category.cs | 29 +- .../src/UseSourceGeneration/Model/ChildCat.cs | 29 +- .../UseSourceGeneration/Model/ClassModel.cs | 29 +- .../Model/ComplexQuadrilateral.cs | 29 +- .../UseSourceGeneration/Model/DanishPig.cs | 29 +- .../Model/DateOnlyClass.cs | 29 +- .../Model/DeprecatedObject.cs | 29 +- .../src/UseSourceGeneration/Model/Dog.cs | 29 +- .../src/UseSourceGeneration/Model/Drawing.cs | 29 +- .../UseSourceGeneration/Model/EnumArrays.cs | 29 +- .../UseSourceGeneration/Model/EnumClass.cs | 29 +- .../src/UseSourceGeneration/Model/EnumTest.cs | 29 +- .../Model/EquilateralTriangle.cs | 29 +- .../src/UseSourceGeneration/Model/File.cs | 29 +- .../Model/FileSchemaTestClass.cs | 29 +- .../src/UseSourceGeneration/Model/Foo.cs | 29 +- .../Model/FooGetDefaultResponse.cs | 29 +- .../UseSourceGeneration/Model/FormatTest.cs | 29 +- .../src/UseSourceGeneration/Model/Fruit.cs | 29 +- .../src/UseSourceGeneration/Model/FruitReq.cs | 29 +- .../src/UseSourceGeneration/Model/GmFruit.cs | 29 +- .../Model/GrandparentAnimal.cs | 29 +- .../Model/HasOnlyReadOnly.cs | 29 +- .../Model/HealthCheckResult.cs | 29 +- .../Model/IsoscelesTriangle.cs | 29 +- .../src/UseSourceGeneration/Model/List.cs | 29 +- .../Model/LiteralStringClass.cs | 29 +- .../src/UseSourceGeneration/Model/Mammal.cs | 29 +- .../src/UseSourceGeneration/Model/MapTest.cs | 29 +- ...dPropertiesAndAdditionalPropertiesClass.cs | 29 +- .../Model/Model200Response.cs | 29 +- .../UseSourceGeneration/Model/ModelClient.cs | 29 +- .../src/UseSourceGeneration/Model/Name.cs | 29 +- ...cationtestGetElementsV1ResponseMPayload.cs | 29 +- .../Model/NullableClass.cs | 29 +- .../Model/NullableGuidClass.cs | 29 +- .../Model/NullableShape.cs | 29 +- .../UseSourceGeneration/Model/NumberOnly.cs | 29 +- .../Model/ObjectWithDeprecatedFields.cs | 29 +- .../UseSourceGeneration/Model/OneOfString.cs | 29 +- .../src/UseSourceGeneration/Model/Order.cs | 29 +- .../Model/OuterComposite.cs | 29 +- .../UseSourceGeneration/Model/OuterEnum.cs | 29 +- .../Model/OuterEnumDefaultValue.cs | 29 +- .../Model/OuterEnumInteger.cs | 29 +- .../Model/OuterEnumIntegerDefaultValue.cs | 29 +- .../Model/OuterEnumTest.cs | 29 +- .../UseSourceGeneration/Model/ParentPet.cs | 29 +- .../src/UseSourceGeneration/Model/Pet.cs | 29 +- .../src/UseSourceGeneration/Model/Pig.cs | 29 +- .../Model/PolymorphicProperty.cs | 29 +- .../Model/Quadrilateral.cs | 29 +- .../Model/QuadrilateralInterface.cs | 29 +- .../Model/ReadOnlyFirst.cs | 29 +- .../src/UseSourceGeneration/Model/Return.cs | 29 +- .../Model/RolesReportsHash.cs | 29 +- .../Model/RolesReportsHashRole.cs | 29 +- .../Model/ScaleneTriangle.cs | 29 +- .../src/UseSourceGeneration/Model/Shape.cs | 29 +- .../Model/ShapeInterface.cs | 29 +- .../UseSourceGeneration/Model/ShapeOrNull.cs | 29 +- .../Model/SimpleQuadrilateral.cs | 29 +- .../Model/SpecialModelName.cs | 29 +- .../src/UseSourceGeneration/Model/Tag.cs | 29 +- .../Model/TestCollectionEndingWithWordList.cs | 29 +- .../TestCollectionEndingWithWordListObject.cs | 29 +- .../src/UseSourceGeneration/Model/Triangle.cs | 29 +- .../Model/TriangleInterface.cs | 29 +- .../src/UseSourceGeneration/Model/User.cs | 29 +- .../src/UseSourceGeneration/Model/Whale.cs | 29 +- .../src/UseSourceGeneration/Model/Zebra.cs | 29 +- .../Model/ZeroBasedEnum.cs | 29 +- .../Model/ZeroBasedEnumClass.cs | 29 +- 104 files changed, 327 insertions(+), 2800 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index da64137b1844..bb27fe20f646 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -862,8 +862,8 @@ public void processOpts() { @Override public void setUseSourceGeneration(final Boolean useSourceGeneration) { - if (useSourceGeneration && !this.additionalProperties.containsKey(NET_60_OR_LATER)) { - throw new RuntimeException("Source generation is only compatible with .Net 6 or later."); + if (useSourceGeneration && !this.additionalProperties.containsKey(NET_70_OR_LATER)) { + throw new RuntimeException("Source generation is only compatible with .Net 7 or later."); } this.useSourceGeneration = useSourceGeneration; } diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ApiResponse`1.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ApiResponse`1.mustache index 292ea17cabd2..3a182e9f6946 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ApiResponse`1.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ApiResponse`1.mustache @@ -110,38 +110,8 @@ namespace {{packageName}}.{{clientPackage}} /// /// The JsonSerialzierOptions /// - private System.Text.Json.JsonSerializerOptions{{#useSourceGeneration}}{{nrt?}}{{/useSourceGeneration}} _jsonSerializerOptions; + private System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; - {{#useSourceGeneration}} - /// - /// The JsonTypeInfo - /// - private readonly System.Text.Json.Serialization.Metadata.JsonTypeInfo{{nrt?}} _typeInfo; - - /// - /// Construct the response using an HttpResponseMessage - /// - /// - /// - /// - /// - /// - /// - public ApiResponse(System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.Serialization.Metadata.JsonTypeInfo typeInfo) - { - StatusCode = httpResponseMessage.StatusCode; - Headers = httpResponseMessage.Headers; - IsSuccessStatusCode = httpResponseMessage.IsSuccessStatusCode; - ReasonPhrase = httpResponseMessage.ReasonPhrase; - RawContent = rawContent; - Path = path; - RequestUri = httpRequestMessage.RequestUri; - RequestedAt = requestedAt; - _typeInfo = typeInfo; - OnCreated(httpRequestMessage, httpResponseMessage); - } - - {{/useSourceGeneration}} /// /// Construct the response using an HttpResponseMessage /// diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/AsModel.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/AsModel.mustache index 4bffea0985d3..c4cc8d57a729 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/AsModel.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/AsModel.mustache @@ -1,14 +1,4 @@ // This logic may be modified with the AsModel.mustache template - {{^useSourceGeneration}} return IsSuccessStatusCode ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) : default(T); - {{/useSourceGeneration}} - {{#useSourceGeneration}} - if (!IsSuccessStatusCode) - return default(T); - - return _typeInfo == null - ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : System.Text.Json.JsonSerializer.Deserialize(RawContent, _typeInfo); - {{/useSourceGeneration}} diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/HostConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/HostConfiguration.mustache index 61c02557279a..1e848862a8bb 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/HostConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/HostConfiguration.mustache @@ -51,15 +51,23 @@ namespace {{packageName}}.{{clientPackage}} {{#useSourceGeneration}} {{#models}} - {{#model}} - _services.AddSingleton<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}SerializationContext>(); - {{/model}} + {{#-first}} + _jsonOptions.TypeInfoResolver = System.Text.Json.Serialization.Metadata.JsonTypeInfoResolver.Combine( + {{/-first}} {{/models}} - + {{#lambda.joinLinesWithComma}} + {{#models}} + {{#model}} + new {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}SerializationContext(){{#-last}},{{/-last}} + {{/model}} + {{/models}} + {{/lambda.joinLinesWithComma}} {{#models}} - {{#model}} - _services.AddSingleton<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}DeserializationContext>(); - {{/model}} + {{#-last}} + + new System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver() + ); + {{/-last}} {{/models}} {{/useSourceGeneration}} diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/SourceGenerationContext.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/SourceGenerationContext.mustache index 9e4612cfd891..b1798c98eb5e 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/SourceGenerationContext.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/SourceGenerationContext.mustache @@ -3,32 +3,7 @@ /// /// The {{classname}}SerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof({{classname}}))] - {{>visibility}} partial class {{classname}}SerializationContext : JsonSerializerContext - { - /// - /// The {{classname}}SerializationContext - /// - /// - public {{classname}}SerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// {{classname}}DeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof({{classname}}))] - {{>visibility}} partial class {{classname}}DeserializationContext : JsonSerializerContext - { - /// - /// {{classname}}DeserializationContext - /// - /// - public {{classname}}DeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + {{>visibility}} partial class {{classname}}SerializationContext : JsonSerializerContext { } {{/useSourceGeneration}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/api.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/api.mustache index 03f273af3af0..305f76b5f7ae 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/api.mustache @@ -103,19 +103,6 @@ namespace {{packageName}}.{{apiPackage}} {{>visibility}} sealed partial class {{classname}} : {{interfacePrefix}}{{classname}} { private JsonSerializerOptions _jsonSerializerOptions; - {{#useSourceGeneration}} - {{#lambda.uniqueLinesWithNewLine}} - {{#operation}} - {{#returnProperty}} - {{#isModel}} - {{#returnType}} - private {{{.}}}DeserializationContext _{{#lambda.camelcase_param}}{{{.}}}DeserializationContext{{/lambda.camelcase_param}}; - {{/returnType}} - {{/isModel}} - {{/returnProperty}} - {{/operation}} - {{/lambda.uniqueLinesWithNewLine}} - {{/useSourceGeneration}} /// /// The logger @@ -161,24 +148,7 @@ namespace {{packageName}}.{{apiPackage}} /// Initializes a new instance of the class. /// /// - public {{classname}}(ILogger<{{classname}}> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, {{classname}}Events {{#lambda.camelcase_param}}{{classname}}Events{{/lambda.camelcase_param}}{{#lambda.first}}{{#useSourceGeneration}}{{#operation}}{{#returnProperty}}{{#isModel}}, {{/isModel}}{{/returnProperty}}{{/operation}}{{/useSourceGeneration}}{{/lambda.first}}{{#lambda.trimTrailing}}{{#useSourceGeneration}} - {{#lambda.joinLinesWithComma}} - {{#lambda.uniqueLinesWithNewLine}} - {{#operation}} - {{#returnProperty}} - {{#isModel}} - {{#returnType}} - {{{.}}}DeserializationContext {{#lambda.camelcase_param}}{{{.}}}DeserializationContext{{/lambda.camelcase_param}} - {{/returnType}} - {{/isModel}} - {{/returnProperty}} - {{/operation}} - {{/lambda.uniqueLinesWithNewLine}} - {{/lambda.joinLinesWithComma}} - {{/useSourceGeneration}} - {{/lambda.trimTrailing}} - {{#hasApiKeyMethods}} -, + public {{classname}}(ILogger<{{classname}}> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, {{classname}}Events {{#lambda.camelcase_param}}{{classname}}Events{{/lambda.camelcase_param}}{{#hasApiKeyMethods}}, TokenProvider apiKeyProvider{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}}, TokenProvider bearerTokenProvider{{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}}, TokenProvider basicTokenProvider{{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}}, @@ -186,19 +156,6 @@ namespace {{packageName}}.{{apiPackage}} TokenProvider oauthTokenProvider{{/hasOAuthMethods}}) { _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; - {{#useSourceGeneration}} - {{#lambda.uniqueLinesWithNewLine}} - {{#operation}} - {{#returnProperty}} - {{#isModel}} - {{#returnType}} - _{{#lambda.camelcase_param}}{{{.}}}DeserializationContext{{/lambda.camelcase_param}} = {{#lambda.camelcase_param}}{{{.}}}DeserializationContext{{/lambda.camelcase_param}}; - {{/returnType}} - {{/isModel}} - {{/returnProperty}} - {{/operation}} - {{/lambda.uniqueLinesWithNewLine}} - {{/useSourceGeneration}} Logger = logger; HttpClient = httpClient; Events = {{#lambda.camelcase_param}}{{classname}}Events{{/lambda.camelcase_param}};{{#hasApiKeyMethods}} @@ -582,7 +539,7 @@ namespace {{packageName}}.{{apiPackage}} { string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync({{#net60OrLater}}cancellationToken{{/net60OrLater}}).ConfigureAwait(false); - ApiResponse<{{{returnType}}}{{^returnType}}object{{/returnType}}> apiResponseLocalVar = new ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "{{path}}", requestedAtLocalVar, {{^useSourceGeneration}}_jsonSerializerOptions{{/useSourceGeneration}}{{#useSourceGeneration}}{{^returnProperty}}_jsonSerializerOptions{{/returnProperty}}{{#returnProperty}}{{^isModel}}_jsonSerializerOptions{{/isModel}}{{#isModel}}_{{#lambda.camelcase_param}}{{{returnType}}}DeserializationContext{{/lambda.camelcase_param}}.{{{returnType}}}{{/isModel}}{{/returnProperty}}{{/useSourceGeneration}}); + ApiResponse<{{{returnType}}}{{^returnType}}object{{/returnType}}> apiResponseLocalVar = new ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "{{path}}", requestedAtLocalVar, _jsonSerializerOptions); After{{operationId}}DefaultImplementation({{#lambda.joinWithComma}}apiResponseLocalVar {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/ManualTests.Latest.UseSourceGeneration/UnitTest1.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/ManualTests.Latest.UseSourceGeneration/UnitTest1.cs index daaec806fa37..4e25bc4a95cd 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/ManualTests.Latest.UseSourceGeneration/UnitTest1.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/ManualTests.Latest.UseSourceGeneration/UnitTest1.cs @@ -15,6 +15,8 @@ public sealed class SerializationTests { private readonly IHost _host; + private readonly JsonSerializerOptions _jsonSerializerOptions; + public SerializationTests() { IHostBuilder hostBuild = Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, services, options) => @@ -42,17 +44,16 @@ public SerializationTests() }); _host = hostBuild.Build(); + + _jsonSerializerOptions = _host.Services.GetRequiredService().Options; } [TestMethod] public void Category() { - CategorySerializationContext serializationContext = _host.Services.GetRequiredService(); - CategoryDeserializationContext deserializationContext = _host.Services.GetRequiredService(); - Category category = new(1, "test"); - string categoryJson = JsonSerializer.Serialize(category, serializationContext.Category); - Category? category2 = JsonSerializer.Deserialize(categoryJson, deserializationContext.Category); + string categoryJson = JsonSerializer.Serialize(category, _jsonSerializerOptions); + Category? category2 = JsonSerializer.Deserialize(categoryJson, _jsonSerializerOptions); Assert.AreEqual(category.Id, category2?.Id); Assert.AreEqual(category.Name, category2?.Name); } @@ -60,25 +61,19 @@ public void Category() [TestMethod] public void Apple() { - AppleSerializationContext serializationContext = _host.Services.GetRequiredService(); - AppleDeserializationContext deserializationContext = _host.Services.GetRequiredService(); - Apple apple = new("#000000", "cultivar", "origin"); - string appleJson = JsonSerializer.Serialize(apple, serializationContext.Apple); - Apple? apple2 = JsonSerializer.Deserialize(appleJson, deserializationContext.Apple); + string appleJson = JsonSerializer.Serialize(apple, _jsonSerializerOptions); + Apple? apple2 = JsonSerializer.Deserialize(appleJson, _jsonSerializerOptions); Assert.IsTrue(apple2 != null && apple.Cultivar.Equals(apple2.Cultivar) && apple.Origin.Equals(apple2.Origin)); } [TestMethod] public void Pig() { - PigSerializationContext serializationContext = _host.Services.GetRequiredService(); - PigDeserializationContext deserializationContext = _host.Services.GetRequiredService(); - BasquePig basquePig = new("BasquePig"); Pig pig = new(basquePig, "BasquePig"); - string pigJson = JsonSerializer.Serialize(pig, serializationContext.Pig); - Pig? pig2 = JsonSerializer.Deserialize(pigJson, deserializationContext.Pig); + string pigJson = JsonSerializer.Serialize(pig, _jsonSerializerOptions); + Pig? pig2 = JsonSerializer.Deserialize(pigJson, _jsonSerializerOptions); Assert.IsTrue( pig.DanishPig == null && pig.BasquePig != null && @@ -91,26 +86,20 @@ public void Pig() [TestMethod] public void DanishPig() { - DanishPigSerializationContext serializationContext = _host.Services.GetRequiredService(); - DanishPigDeserializationContext deserializationContext = _host.Services.GetRequiredService(); - DanishPig danishPig = new("danishPig"); - string danishPigJson = JsonSerializer.Serialize(danishPig, serializationContext.DanishPig); - DanishPig? danishPig2 = JsonSerializer.Deserialize(danishPigJson, deserializationContext.DanishPig); + string danishPigJson = JsonSerializer.Serialize(danishPig, _jsonSerializerOptions); + DanishPig? danishPig2 = JsonSerializer.Deserialize(danishPigJson, _jsonSerializerOptions); Assert.IsTrue(danishPig2 != null && danishPig.ClassName.Equals(danishPig2.ClassName)); } [TestMethod] public void GmFruit() { - GmFruitSerializationContext serializationContext = _host.Services.GetRequiredService(); - GmFruitDeserializationContext deserializationContext = _host.Services.GetRequiredService(); - Apple apple = new("#000000", "cultivar", "origin"); Banana banana = new(10); GmFruit gmFruit = new(apple, banana, "yellow"); - string gmFruitJson = JsonSerializer.Serialize(gmFruit, serializationContext.GmFruit); - GmFruit? gmFruit2 = JsonSerializer.Deserialize(gmFruitJson, deserializationContext.GmFruit); + string gmFruitJson = JsonSerializer.Serialize(gmFruit, _jsonSerializerOptions); + GmFruit? gmFruit2 = JsonSerializer.Deserialize(gmFruitJson, _jsonSerializerOptions); Assert.IsTrue( gmFruit.Apple != null && gmFruit.Banana != null && @@ -129,25 +118,19 @@ public void GmFruit() [TestMethod] public void EquilateralTriangle() { - EquilateralTriangleSerializationContext serializationContext = _host.Services.GetRequiredService(); - EquilateralTriangleDeserializationContext deserializationContext = _host.Services.GetRequiredService(); - EquilateralTriangle equilateralTriangle = new("triangle", "equilateral"); - string equilateralTriangleJson = JsonSerializer.Serialize(equilateralTriangle, serializationContext.EquilateralTriangle); - EquilateralTriangle? equilateralTriangle2 = JsonSerializer.Deserialize(equilateralTriangleJson, deserializationContext.EquilateralTriangle); + string equilateralTriangleJson = JsonSerializer.Serialize(equilateralTriangle, _jsonSerializerOptions); + EquilateralTriangle? equilateralTriangle2 = JsonSerializer.Deserialize(equilateralTriangleJson, _jsonSerializerOptions); Assert.IsTrue(equilateralTriangle2 != null && equilateralTriangle.TriangleType.Equals(equilateralTriangle2.TriangleType) && equilateralTriangle.ShapeType.Equals(equilateralTriangle2.ShapeType)); } [TestMethod] public void Quadrilateral() { - QuadrilateralSerializationContext serializationContext = _host.Services.GetRequiredService(); - QuadrilateralDeserializationContext deserializationContext = _host.Services.GetRequiredService(); - ComplexQuadrilateral complexQuadrilateral = new("ComplexQuadrilateral", "shapeType"); Quadrilateral quadrilateral = new(complexQuadrilateral, "ComplexQuadrilateral"); - string quadrilateralJson = JsonSerializer.Serialize(quadrilateral, serializationContext.Quadrilateral); - Quadrilateral? quadrilateral2 = JsonSerializer.Deserialize(quadrilateralJson, deserializationContext.Quadrilateral); + string quadrilateralJson = JsonSerializer.Serialize(quadrilateral, _jsonSerializerOptions); + Quadrilateral? quadrilateral2 = JsonSerializer.Deserialize(quadrilateralJson, _jsonSerializerOptions); Assert.IsTrue( quadrilateral.ComplexQuadrilateral != null && quadrilateral2 != null && @@ -160,24 +143,18 @@ public void Quadrilateral() [TestMethod] public void ChildCatTest() { - ChildCatSerializationContext serializationContext = _host.Services.GetRequiredService(); - ChildCatDeserializationContext deserializationContext = _host.Services.GetRequiredService(); - ChildCat childCat = new("some name", ChildCat.PetTypeEnum.ChildCat); - string childCatJson = JsonSerializer.Serialize(childCat, serializationContext.ChildCat); - ChildCat? childCat2 = JsonSerializer.Deserialize(childCatJson, deserializationContext.ChildCat); + string childCatJson = JsonSerializer.Serialize(childCat, _jsonSerializerOptions); + ChildCat? childCat2 = JsonSerializer.Deserialize(childCatJson, _jsonSerializerOptions); Assert.IsTrue(childCat2 != null && childCat.PetType.Equals(childCat2.PetType) && childCat.Name.Equals(childCat2.Name)); } [TestMethod] public void Cat() { - CatSerializationContext serializationContext = _host.Services.GetRequiredService(); - CatDeserializationContext deserializationContext = _host.Services.GetRequiredService(); - Cat cat = new("cat", false, "black"); // TODO: where is the address property? - string catJson = JsonSerializer.Serialize(cat, serializationContext.Cat); - Cat? cat2 = JsonSerializer.Deserialize(catJson, deserializationContext.Cat); + string catJson = JsonSerializer.Serialize(cat, _jsonSerializerOptions); + Cat? cat2 = JsonSerializer.Deserialize(catJson, _jsonSerializerOptions); Assert.IsTrue(cat2 != null && cat.Declawed.Equals(cat2.Declawed) && cat.ClassName.Equals(cat2.ClassName) && cat.Color.Equals(cat2.Color)); // TODO: add the address property } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/AnotherFakeApi.cs index cf6063040ffd..e22c4a0605f7 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/AnotherFakeApi.cs @@ -92,7 +92,6 @@ internal void ExecuteOnErrorCall123TestSpecialTags(Exception exception) public sealed partial class AnotherFakeApi : IAnotherFakeApi { private JsonSerializerOptions _jsonSerializerOptions; - private ModelClientDeserializationContext _modelClientDeserializationContext; /// /// The logger @@ -139,7 +138,6 @@ public sealed partial class AnotherFakeApi : IAnotherFakeApi /// /// public AnotherFakeApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, AnotherFakeApiEvents anotherFakeApiEvents, - ModelClientDeserializationContext modelClientDeserializationContext, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, @@ -147,7 +145,6 @@ public AnotherFakeApi(ILogger logger, HttpClient httpClient, Jso TokenProvider oauthTokenProvider) { _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; - _modelClientDeserializationContext = modelClientDeserializationContext; Logger = logger; HttpClient = httpClient; Events = anotherFakeApiEvents; @@ -291,7 +288,7 @@ public async Task> Call123TestSpecialTagsAsync(ModelCli { string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/another-fake/dummy", requestedAtLocalVar, _modelClientDeserializationContext.ModelClient); + ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/another-fake/dummy", requestedAtLocalVar, _jsonSerializerOptions); AfterCall123TestSpecialTagsDefaultImplementation(apiResponseLocalVar, modelClient); diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/DefaultApi.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/DefaultApi.cs index 6a7814a941d5..fad0e0c577c4 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/DefaultApi.cs @@ -256,8 +256,6 @@ internal void ExecuteOnErrorTest(Exception exception) public sealed partial class DefaultApi : IDefaultApi { private JsonSerializerOptions _jsonSerializerOptions; - private FooGetDefaultResponseDeserializationContext _fooGetDefaultResponseDeserializationContext; - private NotificationtestGetElementsV1ResponseMPayloadDeserializationContext _notificationtestGetElementsV1ResponseMPayloadDeserializationContext; /// /// The logger @@ -304,8 +302,6 @@ public sealed partial class DefaultApi : IDefaultApi /// /// public DefaultApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, DefaultApiEvents defaultApiEvents, - FooGetDefaultResponseDeserializationContext fooGetDefaultResponseDeserializationContext, - NotificationtestGetElementsV1ResponseMPayloadDeserializationContext notificationtestGetElementsV1ResponseMPayloadDeserializationContext, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, @@ -313,8 +309,6 @@ public DefaultApi(ILogger logger, HttpClient httpClient, JsonSeriali TokenProvider oauthTokenProvider) { _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; - _fooGetDefaultResponseDeserializationContext = fooGetDefaultResponseDeserializationContext; - _notificationtestGetElementsV1ResponseMPayloadDeserializationContext = notificationtestGetElementsV1ResponseMPayloadDeserializationContext; Logger = logger; HttpClient = httpClient; Events = defaultApiEvents; @@ -422,7 +416,7 @@ public async Task> FooGetAsync(System.Threadi { string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/foo", requestedAtLocalVar, _fooGetDefaultResponseDeserializationContext.FooGetDefaultResponse); + ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/foo", requestedAtLocalVar, _jsonSerializerOptions); AfterFooGetDefaultImplementation(apiResponseLocalVar); @@ -915,7 +909,7 @@ public async Task> Te { string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/test", requestedAtLocalVar, _notificationtestGetElementsV1ResponseMPayloadDeserializationContext.NotificationtestGetElementsV1ResponseMPayload); + ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/test", requestedAtLocalVar, _jsonSerializerOptions); AfterTestDefaultImplementation(apiResponseLocalVar); diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/FakeApi.cs index 0e32bae17000..d1d53093f5b7 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/FakeApi.cs @@ -762,9 +762,6 @@ internal void ExecuteOnErrorTestQueryParameterCollectionFormat(Exception excepti public sealed partial class FakeApi : IFakeApi { private JsonSerializerOptions _jsonSerializerOptions; - private HealthCheckResultDeserializationContext _healthCheckResultDeserializationContext; - private OuterCompositeDeserializationContext _outerCompositeDeserializationContext; - private ModelClientDeserializationContext _modelClientDeserializationContext; /// /// The logger @@ -811,9 +808,6 @@ public sealed partial class FakeApi : IFakeApi /// /// public FakeApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, FakeApiEvents fakeApiEvents, - HealthCheckResultDeserializationContext healthCheckResultDeserializationContext, - OuterCompositeDeserializationContext outerCompositeDeserializationContext, - ModelClientDeserializationContext modelClientDeserializationContext, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, @@ -821,9 +815,6 @@ public FakeApi(ILogger logger, HttpClient httpClient, JsonSerializerOpt TokenProvider oauthTokenProvider) { _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; - _healthCheckResultDeserializationContext = healthCheckResultDeserializationContext; - _outerCompositeDeserializationContext = outerCompositeDeserializationContext; - _modelClientDeserializationContext = modelClientDeserializationContext; Logger = logger; HttpClient = httpClient; Events = fakeApiEvents; @@ -931,7 +922,7 @@ public async Task> FakeHealthGetAsync(System.Thre { string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/health", requestedAtLocalVar, _healthCheckResultDeserializationContext.HealthCheckResult); + ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/health", requestedAtLocalVar, _jsonSerializerOptions); AfterFakeHealthGetDefaultImplementation(apiResponseLocalVar); @@ -1222,7 +1213,7 @@ public async Task> FakeOuterCompositeSerializeAsync( { string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/outer/composite", requestedAtLocalVar, _outerCompositeDeserializationContext.OuterComposite); + ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/outer/composite", requestedAtLocalVar, _jsonSerializerOptions); AfterFakeOuterCompositeSerializeDefaultImplementation(apiResponseLocalVar, outerComposite); @@ -2091,7 +2082,7 @@ public async Task> TestClientModelAsync(ModelClient mod { string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _modelClientDeserializationContext.ModelClient); + ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake", requestedAtLocalVar, _jsonSerializerOptions); AfterTestClientModelDefaultImplementation(apiResponseLocalVar, modelClient); diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/FakeClassnameTags123Api.cs index 43825e1856ba..b89b8cc8b5ea 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/FakeClassnameTags123Api.cs @@ -92,7 +92,6 @@ internal void ExecuteOnErrorTestClassname(Exception exception) public sealed partial class FakeClassnameTags123Api : IFakeClassnameTags123Api { private JsonSerializerOptions _jsonSerializerOptions; - private ModelClientDeserializationContext _modelClientDeserializationContext; /// /// The logger @@ -139,7 +138,6 @@ public sealed partial class FakeClassnameTags123Api : IFakeClassnameTags123Api /// /// public FakeClassnameTags123Api(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, FakeClassnameTags123ApiEvents fakeClassnameTags123ApiEvents, - ModelClientDeserializationContext modelClientDeserializationContext, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, @@ -147,7 +145,6 @@ public FakeClassnameTags123Api(ILogger logger, HttpClie TokenProvider oauthTokenProvider) { _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; - _modelClientDeserializationContext = modelClientDeserializationContext; Logger = logger; HttpClient = httpClient; Events = fakeClassnameTags123ApiEvents; @@ -302,7 +299,7 @@ public async Task> TestClassnameAsync(ModelClient model { string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake_classname_test", requestedAtLocalVar, _modelClientDeserializationContext.ModelClient); + ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake_classname_test", requestedAtLocalVar, _jsonSerializerOptions); AfterTestClassnameDefaultImplementation(apiResponseLocalVar, modelClient); diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/PetApi.cs index 6ce306fc7db7..939b71c5cddd 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/PetApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/PetApi.cs @@ -450,8 +450,6 @@ internal void ExecuteOnErrorUploadFileWithRequiredFile(Exception exception) public sealed partial class PetApi : IPetApi { private JsonSerializerOptions _jsonSerializerOptions; - private PetDeserializationContext _petDeserializationContext; - private ApiResponseDeserializationContext _apiResponseDeserializationContext; /// /// The logger @@ -498,8 +496,6 @@ public sealed partial class PetApi : IPetApi /// /// public PetApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, PetApiEvents petApiEvents, - PetDeserializationContext petDeserializationContext, - ApiResponseDeserializationContext apiResponseDeserializationContext, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, @@ -507,8 +503,6 @@ public PetApi(ILogger logger, HttpClient httpClient, JsonSerializerOptio TokenProvider oauthTokenProvider) { _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; - _petDeserializationContext = petDeserializationContext; - _apiResponseDeserializationContext = apiResponseDeserializationContext; Logger = logger; HttpClient = httpClient; Events = petApiEvents; @@ -1298,7 +1292,7 @@ public async Task> GetPetByIdAsync(long petId, System.Threading { string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/pet/{petId}", requestedAtLocalVar, _petDeserializationContext.Pet); + ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/pet/{petId}", requestedAtLocalVar, _jsonSerializerOptions); AfterGetPetByIdDefaultImplementation(apiResponseLocalVar, petId); @@ -1834,7 +1828,7 @@ public async Task> UploadFileAsync(long petId, Option apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/pet/{petId}/uploadImage", requestedAtLocalVar, _apiResponseDeserializationContext.ApiResponse); + ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/pet/{petId}/uploadImage", requestedAtLocalVar, _jsonSerializerOptions); AfterUploadFileDefaultImplementation(apiResponseLocalVar, petId, file, additionalMetadata); @@ -2022,7 +2016,7 @@ public async Task> UploadFileWithRequiredFileAsync(Syst { string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/{petId}/uploadImageWithRequiredFile", requestedAtLocalVar, _apiResponseDeserializationContext.ApiResponse); + ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/{petId}/uploadImageWithRequiredFile", requestedAtLocalVar, _jsonSerializerOptions); AfterUploadFileWithRequiredFileDefaultImplementation(apiResponseLocalVar, requiredFile, petId, additionalMetadata); diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/StoreApi.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/StoreApi.cs index 78c789c85b7b..658e538224cf 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/StoreApi.cs @@ -219,7 +219,6 @@ internal void ExecuteOnErrorPlaceOrder(Exception exception) public sealed partial class StoreApi : IStoreApi { private JsonSerializerOptions _jsonSerializerOptions; - private OrderDeserializationContext _orderDeserializationContext; /// /// The logger @@ -266,7 +265,6 @@ public sealed partial class StoreApi : IStoreApi /// /// public StoreApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, StoreApiEvents storeApiEvents, - OrderDeserializationContext orderDeserializationContext, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, @@ -274,7 +272,6 @@ public StoreApi(ILogger logger, HttpClient httpClient, JsonSerializerO TokenProvider oauthTokenProvider) { _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; - _orderDeserializationContext = orderDeserializationContext; Logger = logger; HttpClient = httpClient; Events = storeApiEvents; @@ -651,7 +648,7 @@ public async Task> GetOrderByIdAsync(long orderId, System.Thr { string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/store/order/{order_id}", requestedAtLocalVar, _orderDeserializationContext.Order); + ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/store/order/{order_id}", requestedAtLocalVar, _jsonSerializerOptions); AfterGetOrderByIdDefaultImplementation(apiResponseLocalVar, orderId); @@ -803,7 +800,7 @@ public async Task> PlaceOrderAsync(Order order, System.Thread { string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/store/order", requestedAtLocalVar, _orderDeserializationContext.Order); + ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/store/order", requestedAtLocalVar, _jsonSerializerOptions); AfterPlaceOrderDefaultImplementation(apiResponseLocalVar, order); diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/UserApi.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/UserApi.cs index 48f91095f805..a4bc885856b9 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/UserApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Api/UserApi.cs @@ -395,7 +395,6 @@ internal void ExecuteOnErrorUpdateUser(Exception exception) public sealed partial class UserApi : IUserApi { private JsonSerializerOptions _jsonSerializerOptions; - private UserDeserializationContext _userDeserializationContext; /// /// The logger @@ -442,7 +441,6 @@ public sealed partial class UserApi : IUserApi /// /// public UserApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, UserApiEvents userApiEvents, - UserDeserializationContext userDeserializationContext, TokenProvider apiKeyProvider, TokenProvider bearerTokenProvider, TokenProvider basicTokenProvider, @@ -450,7 +448,6 @@ public UserApi(ILogger logger, HttpClient httpClient, JsonSerializerOpt TokenProvider oauthTokenProvider) { _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; - _userDeserializationContext = userDeserializationContext; Logger = logger; HttpClient = httpClient; Events = userApiEvents; @@ -1139,7 +1136,7 @@ public async Task> GetUserByNameAsync(string username, System. { string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/{username}", requestedAtLocalVar, _userDeserializationContext.User); + ApiResponse apiResponseLocalVar = new ApiResponse(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/user/{username}", requestedAtLocalVar, _jsonSerializerOptions); AfterGetUserByNameDefaultImplementation(apiResponseLocalVar, username); diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Client/ApiResponse`1.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Client/ApiResponse`1.cs index 72cffa4c55cb..96d5e92383e5 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Client/ApiResponse`1.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Client/ApiResponse`1.cs @@ -116,35 +116,7 @@ public Type ResponseType /// /// The JsonSerialzierOptions /// - private System.Text.Json.JsonSerializerOptions? _jsonSerializerOptions; - - /// - /// The JsonTypeInfo - /// - private readonly System.Text.Json.Serialization.Metadata.JsonTypeInfo? _typeInfo; - - /// - /// Construct the response using an HttpResponseMessage - /// - /// - /// - /// - /// - /// - /// - public ApiResponse(System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.Serialization.Metadata.JsonTypeInfo typeInfo) - { - StatusCode = httpResponseMessage.StatusCode; - Headers = httpResponseMessage.Headers; - IsSuccessStatusCode = httpResponseMessage.IsSuccessStatusCode; - ReasonPhrase = httpResponseMessage.ReasonPhrase; - RawContent = rawContent; - Path = path; - RequestUri = httpRequestMessage.RequestUri; - RequestedAt = requestedAt; - _typeInfo = typeInfo; - OnCreated(httpRequestMessage, httpResponseMessage); - } + private System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; /// /// Construct the response using an HttpResponseMessage @@ -177,12 +149,9 @@ public ApiResponse(System.Net.Http.HttpRequestMessage httpRequestMessage, System public T? AsModel() { // This logic may be modified with the AsModel.mustache template - if (!IsSuccessStatusCode) - return default(T); - - return _typeInfo == null + return IsSuccessStatusCode ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : System.Text.Json.JsonSerializer.Deserialize(RawContent, _typeInfo); + : default(T); } /// diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Client/HostConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Client/HostConfiguration.cs index d49c84acdea2..e173927d9f76 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Client/HostConfiguration.cs @@ -139,183 +139,97 @@ public HostConfiguration(IServiceCollection services) JsonSerializerOptionsProvider jsonSerializerOptionsProvider = new(_jsonOptions); _services.AddSingleton(jsonSerializerOptionsProvider); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); + _jsonOptions.TypeInfoResolver = System.Text.Json.Serialization.Metadata.JsonTypeInfoResolver.Combine( + new ActivitySerializationContext(), + new ActivityOutputElementRepresentationSerializationContext(), + new AdditionalPropertiesClassSerializationContext(), + new AnimalSerializationContext(), + new ApiResponseSerializationContext(), + new AppleSerializationContext(), + new AppleReqSerializationContext(), + new ArrayOfArrayOfNumberOnlySerializationContext(), + new ArrayOfNumberOnlySerializationContext(), + new ArrayTestSerializationContext(), + new BananaSerializationContext(), + new BananaReqSerializationContext(), + new BasquePigSerializationContext(), + new CapitalizationSerializationContext(), + new CatSerializationContext(), + new CategorySerializationContext(), + new ChildCatSerializationContext(), + new ClassModelSerializationContext(), + new ComplexQuadrilateralSerializationContext(), + new DanishPigSerializationContext(), + new DateOnlyClassSerializationContext(), + new DeprecatedObjectSerializationContext(), + new DogSerializationContext(), + new DrawingSerializationContext(), + new EnumArraysSerializationContext(), + new EnumClassSerializationContext(), + new EnumTestSerializationContext(), + new EquilateralTriangleSerializationContext(), + new FileSerializationContext(), + new FileSchemaTestClassSerializationContext(), + new FooSerializationContext(), + new FooGetDefaultResponseSerializationContext(), + new FormatTestSerializationContext(), + new FruitSerializationContext(), + new FruitReqSerializationContext(), + new GmFruitSerializationContext(), + new GrandparentAnimalSerializationContext(), + new HasOnlyReadOnlySerializationContext(), + new HealthCheckResultSerializationContext(), + new IsoscelesTriangleSerializationContext(), + new ListSerializationContext(), + new LiteralStringClassSerializationContext(), + new MammalSerializationContext(), + new MapTestSerializationContext(), + new MixedPropertiesAndAdditionalPropertiesClassSerializationContext(), + new Model200ResponseSerializationContext(), + new ModelClientSerializationContext(), + new NameSerializationContext(), + new NotificationtestGetElementsV1ResponseMPayloadSerializationContext(), + new NullableClassSerializationContext(), + new NullableGuidClassSerializationContext(), + new NullableShapeSerializationContext(), + new NumberOnlySerializationContext(), + new ObjectWithDeprecatedFieldsSerializationContext(), + new OneOfStringSerializationContext(), + new OrderSerializationContext(), + new OuterCompositeSerializationContext(), + new OuterEnumSerializationContext(), + new OuterEnumDefaultValueSerializationContext(), + new OuterEnumIntegerSerializationContext(), + new OuterEnumIntegerDefaultValueSerializationContext(), + new OuterEnumTestSerializationContext(), + new ParentPetSerializationContext(), + new PetSerializationContext(), + new PigSerializationContext(), + new PolymorphicPropertySerializationContext(), + new QuadrilateralSerializationContext(), + new QuadrilateralInterfaceSerializationContext(), + new ReadOnlyFirstSerializationContext(), + new ReturnSerializationContext(), + new RolesReportsHashSerializationContext(), + new RolesReportsHashRoleSerializationContext(), + new ScaleneTriangleSerializationContext(), + new ShapeSerializationContext(), + new ShapeInterfaceSerializationContext(), + new ShapeOrNullSerializationContext(), + new SimpleQuadrilateralSerializationContext(), + new SpecialModelNameSerializationContext(), + new TagSerializationContext(), + new TestCollectionEndingWithWordListSerializationContext(), + new TestCollectionEndingWithWordListObjectSerializationContext(), + new TriangleSerializationContext(), + new TriangleInterfaceSerializationContext(), + new UserSerializationContext(), + new WhaleSerializationContext(), + new ZebraSerializationContext(), + new ZeroBasedEnumSerializationContext(), + new ZeroBasedEnumClassSerializationContext(), + new System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver() + ); _services.AddSingleton(); _services.AddSingleton(); diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Activity.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Activity.cs index 5753aac96350..21b946eba142 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Activity.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Activity.cs @@ -169,32 +169,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Activity activity, JsonSe /// /// The ActivitySerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Activity))] - public partial class ActivitySerializationContext : JsonSerializerContext - { - /// - /// The ActivitySerializationContext - /// - /// - public ActivitySerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ActivityDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Activity))] - public partial class ActivityDeserializationContext : JsonSerializerContext - { - /// - /// ActivityDeserializationContext - /// - /// - public ActivityDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ActivitySerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ActivityOutputElementRepresentation.cs index f663e566b3f7..7d7042c48e51 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ActivityOutputElementRepresentation.cs @@ -186,32 +186,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, ActivityOutputElementRepr /// /// The ActivityOutputElementRepresentationSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(ActivityOutputElementRepresentation))] - public partial class ActivityOutputElementRepresentationSerializationContext : JsonSerializerContext - { - /// - /// The ActivityOutputElementRepresentationSerializationContext - /// - /// - public ActivityOutputElementRepresentationSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ActivityOutputElementRepresentationDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(ActivityOutputElementRepresentation))] - public partial class ActivityOutputElementRepresentationDeserializationContext : JsonSerializerContext - { - /// - /// ActivityOutputElementRepresentationDeserializationContext - /// - /// - public ActivityOutputElementRepresentationDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ActivityOutputElementRepresentationSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/AdditionalPropertiesClass.cs index 8248ed1274d8..09b3dd1d2611 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/AdditionalPropertiesClass.cs @@ -300,32 +300,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, AdditionalPropertiesClass /// /// The AdditionalPropertiesClassSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(AdditionalPropertiesClass))] - public partial class AdditionalPropertiesClassSerializationContext : JsonSerializerContext - { - /// - /// The AdditionalPropertiesClassSerializationContext - /// - /// - public AdditionalPropertiesClassSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// AdditionalPropertiesClassDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(AdditionalPropertiesClass))] - public partial class AdditionalPropertiesClassDeserializationContext : JsonSerializerContext - { - /// - /// AdditionalPropertiesClassDeserializationContext - /// - /// - public AdditionalPropertiesClassDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class AdditionalPropertiesClassSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Animal.cs index ad4d3be58666..6beaaf3e97ce 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Animal.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Animal.cs @@ -194,32 +194,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Animal animal, JsonSerial /// /// The AnimalSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Animal))] - public partial class AnimalSerializationContext : JsonSerializerContext - { - /// - /// The AnimalSerializationContext - /// - /// - public AnimalSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// AnimalDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Animal))] - public partial class AnimalDeserializationContext : JsonSerializerContext - { - /// - /// AnimalDeserializationContext - /// - /// - public AnimalDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class AnimalSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ApiResponse.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ApiResponse.cs index 3593d36382e9..44f22494b301 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ApiResponse.cs @@ -202,32 +202,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, ApiResponse apiResponse, /// /// The ApiResponseSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(ApiResponse))] - public partial class ApiResponseSerializationContext : JsonSerializerContext - { - /// - /// The ApiResponseSerializationContext - /// - /// - public ApiResponseSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ApiResponseDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(ApiResponse))] - public partial class ApiResponseDeserializationContext : JsonSerializerContext - { - /// - /// ApiResponseDeserializationContext - /// - /// - public ApiResponseDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ApiResponseSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Apple.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Apple.cs index 10f265c70b55..f163ab1d0ba5 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Apple.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Apple.cs @@ -228,32 +228,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Apple apple, JsonSerializ /// /// The AppleSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Apple))] - public partial class AppleSerializationContext : JsonSerializerContext - { - /// - /// The AppleSerializationContext - /// - /// - public AppleSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// AppleDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Apple))] - public partial class AppleDeserializationContext : JsonSerializerContext - { - /// - /// AppleDeserializationContext - /// - /// - public AppleDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class AppleSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/AppleReq.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/AppleReq.cs index 73317b812bb6..52d9af2f3611 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/AppleReq.cs @@ -178,32 +178,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, AppleReq appleReq, JsonSe /// /// The AppleReqSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(AppleReq))] - public partial class AppleReqSerializationContext : JsonSerializerContext - { - /// - /// The AppleReqSerializationContext - /// - /// - public AppleReqSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// AppleReqDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(AppleReq))] - public partial class AppleReqDeserializationContext : JsonSerializerContext - { - /// - /// AppleReqDeserializationContext - /// - /// - public AppleReqDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class AppleReqSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ArrayOfArrayOfNumberOnly.cs index 3436dbbc9e78..96905a9ad00d 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ArrayOfArrayOfNumberOnly.cs @@ -169,32 +169,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, ArrayOfArrayOfNumberOnly /// /// The ArrayOfArrayOfNumberOnlySerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(ArrayOfArrayOfNumberOnly))] - public partial class ArrayOfArrayOfNumberOnlySerializationContext : JsonSerializerContext - { - /// - /// The ArrayOfArrayOfNumberOnlySerializationContext - /// - /// - public ArrayOfArrayOfNumberOnlySerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ArrayOfArrayOfNumberOnlyDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(ArrayOfArrayOfNumberOnly))] - public partial class ArrayOfArrayOfNumberOnlyDeserializationContext : JsonSerializerContext - { - /// - /// ArrayOfArrayOfNumberOnlyDeserializationContext - /// - /// - public ArrayOfArrayOfNumberOnlyDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ArrayOfArrayOfNumberOnlySerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ArrayOfNumberOnly.cs index 58fd354388ef..2fc3f9aa15b3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ArrayOfNumberOnly.cs @@ -169,32 +169,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, ArrayOfNumberOnly arrayOf /// /// The ArrayOfNumberOnlySerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(ArrayOfNumberOnly))] - public partial class ArrayOfNumberOnlySerializationContext : JsonSerializerContext - { - /// - /// The ArrayOfNumberOnlySerializationContext - /// - /// - public ArrayOfNumberOnlySerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ArrayOfNumberOnlyDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(ArrayOfNumberOnly))] - public partial class ArrayOfNumberOnlyDeserializationContext : JsonSerializerContext - { - /// - /// ArrayOfNumberOnlyDeserializationContext - /// - /// - public ArrayOfNumberOnlyDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ArrayOfNumberOnlySerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ArrayTest.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ArrayTest.cs index 933fda6ab8f3..5923398e2cac 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ArrayTest.cs @@ -207,32 +207,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, ArrayTest arrayTest, Json /// /// The ArrayTestSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(ArrayTest))] - public partial class ArrayTestSerializationContext : JsonSerializerContext - { - /// - /// The ArrayTestSerializationContext - /// - /// - public ArrayTestSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ArrayTestDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(ArrayTest))] - public partial class ArrayTestDeserializationContext : JsonSerializerContext - { - /// - /// ArrayTestDeserializationContext - /// - /// - public ArrayTestDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ArrayTestSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Banana.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Banana.cs index 96ebf1eb703e..5528e531ea89 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Banana.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Banana.cs @@ -168,32 +168,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Banana banana, JsonSerial /// /// The BananaSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Banana))] - public partial class BananaSerializationContext : JsonSerializerContext - { - /// - /// The BananaSerializationContext - /// - /// - public BananaSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// BananaDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Banana))] - public partial class BananaDeserializationContext : JsonSerializerContext - { - /// - /// BananaDeserializationContext - /// - /// - public BananaDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class BananaSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/BananaReq.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/BananaReq.cs index e39fb405511c..7b5186114050 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/BananaReq.cs @@ -179,32 +179,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, BananaReq bananaReq, Json /// /// The BananaReqSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(BananaReq))] - public partial class BananaReqSerializationContext : JsonSerializerContext - { - /// - /// The BananaReqSerializationContext - /// - /// - public BananaReqSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// BananaReqDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(BananaReq))] - public partial class BananaReqDeserializationContext : JsonSerializerContext - { - /// - /// BananaReqDeserializationContext - /// - /// - public BananaReqDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class BananaReqSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/BasquePig.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/BasquePig.cs index cf774084149b..4721383c8969 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/BasquePig.cs @@ -167,32 +167,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, BasquePig basquePig, Json /// /// The BasquePigSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(BasquePig))] - public partial class BasquePigSerializationContext : JsonSerializerContext - { - /// - /// The BasquePigSerializationContext - /// - /// - public BasquePigSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// BasquePigDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(BasquePig))] - public partial class BasquePigDeserializationContext : JsonSerializerContext - { - /// - /// BasquePigDeserializationContext - /// - /// - public BasquePigDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class BasquePigSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Capitalization.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Capitalization.cs index 0cc55ad39e66..b0cc3ec0d597 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Capitalization.cs @@ -253,32 +253,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Capitalization capitaliza /// /// The CapitalizationSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Capitalization))] - public partial class CapitalizationSerializationContext : JsonSerializerContext - { - /// - /// The CapitalizationSerializationContext - /// - /// - public CapitalizationSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// CapitalizationDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Capitalization))] - public partial class CapitalizationDeserializationContext : JsonSerializerContext - { - /// - /// CapitalizationDeserializationContext - /// - /// - public CapitalizationDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class CapitalizationSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Cat.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Cat.cs index 4d14aac0664f..9535772c5069 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Cat.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Cat.cs @@ -170,32 +170,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Cat cat, JsonSerializerOp /// /// The CatSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Cat))] - public partial class CatSerializationContext : JsonSerializerContext - { - /// - /// The CatSerializationContext - /// - /// - public CatSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// CatDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Cat))] - public partial class CatDeserializationContext : JsonSerializerContext - { - /// - /// CatDeserializationContext - /// - /// - public CatDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class CatSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Category.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Category.cs index a01ca0206bd0..1c1133055c7c 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Category.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Category.cs @@ -185,32 +185,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Category category, JsonSe /// /// The CategorySerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Category))] - public partial class CategorySerializationContext : JsonSerializerContext - { - /// - /// The CategorySerializationContext - /// - /// - public CategorySerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// CategoryDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Category))] - public partial class CategoryDeserializationContext : JsonSerializerContext - { - /// - /// CategoryDeserializationContext - /// - /// - public CategoryDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class CategorySerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ChildCat.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ChildCat.cs index c2d70d4488a2..7ef472d82939 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ChildCat.cs @@ -228,32 +228,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, ChildCat childCat, JsonSe /// /// The ChildCatSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(ChildCat))] - public partial class ChildCatSerializationContext : JsonSerializerContext - { - /// - /// The ChildCatSerializationContext - /// - /// - public ChildCatSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ChildCatDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(ChildCat))] - public partial class ChildCatDeserializationContext : JsonSerializerContext - { - /// - /// ChildCatDeserializationContext - /// - /// - public ChildCatDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ChildCatSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ClassModel.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ClassModel.cs index 8accbfa81d69..af9e0c3d1c52 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ClassModel.cs @@ -167,32 +167,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, ClassModel classModel, Js /// /// The ClassModelSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(ClassModel))] - public partial class ClassModelSerializationContext : JsonSerializerContext - { - /// - /// The ClassModelSerializationContext - /// - /// - public ClassModelSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ClassModelDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(ClassModel))] - public partial class ClassModelDeserializationContext : JsonSerializerContext - { - /// - /// ClassModelDeserializationContext - /// - /// - public ClassModelDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ClassModelSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ComplexQuadrilateral.cs index e831cef57624..3d57316efa89 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ComplexQuadrilateral.cs @@ -184,32 +184,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, ComplexQuadrilateral comp /// /// The ComplexQuadrilateralSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(ComplexQuadrilateral))] - public partial class ComplexQuadrilateralSerializationContext : JsonSerializerContext - { - /// - /// The ComplexQuadrilateralSerializationContext - /// - /// - public ComplexQuadrilateralSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ComplexQuadrilateralDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(ComplexQuadrilateral))] - public partial class ComplexQuadrilateralDeserializationContext : JsonSerializerContext - { - /// - /// ComplexQuadrilateralDeserializationContext - /// - /// - public ComplexQuadrilateralDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ComplexQuadrilateralSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/DanishPig.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/DanishPig.cs index e67e90ff44b3..8734f04bad7e 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/DanishPig.cs @@ -167,32 +167,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, DanishPig danishPig, Json /// /// The DanishPigSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(DanishPig))] - public partial class DanishPigSerializationContext : JsonSerializerContext - { - /// - /// The DanishPigSerializationContext - /// - /// - public DanishPigSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// DanishPigDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(DanishPig))] - public partial class DanishPigDeserializationContext : JsonSerializerContext - { - /// - /// DanishPigDeserializationContext - /// - /// - public DanishPigDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class DanishPigSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/DateOnlyClass.cs index 645d84b7a14e..bd4801d771cb 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/DateOnlyClass.cs @@ -174,32 +174,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, DateOnlyClass dateOnlyCla /// /// The DateOnlyClassSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(DateOnlyClass))] - public partial class DateOnlyClassSerializationContext : JsonSerializerContext - { - /// - /// The DateOnlyClassSerializationContext - /// - /// - public DateOnlyClassSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// DateOnlyClassDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(DateOnlyClass))] - public partial class DateOnlyClassDeserializationContext : JsonSerializerContext - { - /// - /// DateOnlyClassDeserializationContext - /// - /// - public DateOnlyClassDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class DateOnlyClassSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/DeprecatedObject.cs index d1f20b4cf536..1783c3add71c 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/DeprecatedObject.cs @@ -167,32 +167,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, DeprecatedObject deprecat /// /// The DeprecatedObjectSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(DeprecatedObject))] - public partial class DeprecatedObjectSerializationContext : JsonSerializerContext - { - /// - /// The DeprecatedObjectSerializationContext - /// - /// - public DeprecatedObjectSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// DeprecatedObjectDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(DeprecatedObject))] - public partial class DeprecatedObjectDeserializationContext : JsonSerializerContext - { - /// - /// DeprecatedObjectDeserializationContext - /// - /// - public DeprecatedObjectDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class DeprecatedObjectSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Dog.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Dog.cs index bb77154d9b47..70beb60686ba 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Dog.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Dog.cs @@ -169,32 +169,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Dog dog, JsonSerializerOp /// /// The DogSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Dog))] - public partial class DogSerializationContext : JsonSerializerContext - { - /// - /// The DogSerializationContext - /// - /// - public DogSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// DogDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Dog))] - public partial class DogDeserializationContext : JsonSerializerContext - { - /// - /// DogDeserializationContext - /// - /// - public DogDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class DogSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Drawing.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Drawing.cs index eee5adff9439..955f0571e1d9 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Drawing.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Drawing.cs @@ -231,32 +231,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Drawing drawing, JsonSeri /// /// The DrawingSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Drawing))] - public partial class DrawingSerializationContext : JsonSerializerContext - { - /// - /// The DrawingSerializationContext - /// - /// - public DrawingSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// DrawingDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Drawing))] - public partial class DrawingDeserializationContext : JsonSerializerContext - { - /// - /// DrawingDeserializationContext - /// - /// - public DrawingDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class DrawingSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/EnumArrays.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/EnumArrays.cs index 2456ab098723..b450ddadfb17 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/EnumArrays.cs @@ -326,32 +326,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, EnumArrays enumArrays, Js /// /// The EnumArraysSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(EnumArrays))] - public partial class EnumArraysSerializationContext : JsonSerializerContext - { - /// - /// The EnumArraysSerializationContext - /// - /// - public EnumArraysSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// EnumArraysDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(EnumArrays))] - public partial class EnumArraysDeserializationContext : JsonSerializerContext - { - /// - /// EnumArraysDeserializationContext - /// - /// - public EnumArraysDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class EnumArraysSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/EnumClass.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/EnumClass.cs index 2d23eb5113db..7f2d90590a67 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/EnumClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/EnumClass.cs @@ -193,32 +193,7 @@ public override void Write(Utf8JsonWriter writer, EnumClass? enumClass, JsonSeri /// /// The EnumClassSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(EnumClass))] - public partial class EnumClassSerializationContext : JsonSerializerContext - { - /// - /// The EnumClassSerializationContext - /// - /// - public EnumClassSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// EnumClassDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(EnumClass))] - public partial class EnumClassDeserializationContext : JsonSerializerContext - { - /// - /// EnumClassDeserializationContext - /// - /// - public EnumClassDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class EnumClassSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/EnumTest.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/EnumTest.cs index ccf47d85d816..88fa5ff18a16 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/EnumTest.cs @@ -834,32 +834,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, EnumTest enumTest, JsonSe /// /// The EnumTestSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(EnumTest))] - public partial class EnumTestSerializationContext : JsonSerializerContext - { - /// - /// The EnumTestSerializationContext - /// - /// - public EnumTestSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// EnumTestDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(EnumTest))] - public partial class EnumTestDeserializationContext : JsonSerializerContext - { - /// - /// EnumTestDeserializationContext - /// - /// - public EnumTestDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class EnumTestSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/EquilateralTriangle.cs index 21835e24e30e..b161cd58e182 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/EquilateralTriangle.cs @@ -184,32 +184,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, EquilateralTriangle equil /// /// The EquilateralTriangleSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(EquilateralTriangle))] - public partial class EquilateralTriangleSerializationContext : JsonSerializerContext - { - /// - /// The EquilateralTriangleSerializationContext - /// - /// - public EquilateralTriangleSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// EquilateralTriangleDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(EquilateralTriangle))] - public partial class EquilateralTriangleDeserializationContext : JsonSerializerContext - { - /// - /// EquilateralTriangleDeserializationContext - /// - /// - public EquilateralTriangleDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class EquilateralTriangleSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/File.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/File.cs index 0af05bc9a538..bc7f05fae9e0 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/File.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/File.cs @@ -168,32 +168,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, File file, JsonSerializer /// /// The FileSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(File))] - public partial class FileSerializationContext : JsonSerializerContext - { - /// - /// The FileSerializationContext - /// - /// - public FileSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// FileDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(File))] - public partial class FileDeserializationContext : JsonSerializerContext - { - /// - /// FileDeserializationContext - /// - /// - public FileDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class FileSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/FileSchemaTestClass.cs index 40925985a151..68d2af61dbc1 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/FileSchemaTestClass.cs @@ -188,32 +188,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, FileSchemaTestClass fileS /// /// The FileSchemaTestClassSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(FileSchemaTestClass))] - public partial class FileSchemaTestClassSerializationContext : JsonSerializerContext - { - /// - /// The FileSchemaTestClassSerializationContext - /// - /// - public FileSchemaTestClassSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// FileSchemaTestClassDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(FileSchemaTestClass))] - public partial class FileSchemaTestClassDeserializationContext : JsonSerializerContext - { - /// - /// FileSchemaTestClassDeserializationContext - /// - /// - public FileSchemaTestClassDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class FileSchemaTestClassSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Foo.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Foo.cs index e03bcf0b739c..dbedd34f861d 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Foo.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Foo.cs @@ -167,32 +167,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Foo foo, JsonSerializerOp /// /// The FooSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Foo))] - public partial class FooSerializationContext : JsonSerializerContext - { - /// - /// The FooSerializationContext - /// - /// - public FooSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// FooDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Foo))] - public partial class FooDeserializationContext : JsonSerializerContext - { - /// - /// FooDeserializationContext - /// - /// - public FooDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class FooSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/FooGetDefaultResponse.cs index 7230cd7bd895..dabc1bd83dbf 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/FooGetDefaultResponse.cs @@ -169,32 +169,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, FooGetDefaultResponse foo /// /// The FooGetDefaultResponseSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(FooGetDefaultResponse))] - public partial class FooGetDefaultResponseSerializationContext : JsonSerializerContext - { - /// - /// The FooGetDefaultResponseSerializationContext - /// - /// - public FooGetDefaultResponseSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// FooGetDefaultResponseDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(FooGetDefaultResponse))] - public partial class FooGetDefaultResponseDeserializationContext : JsonSerializerContext - { - /// - /// FooGetDefaultResponseDeserializationContext - /// - /// - public FooGetDefaultResponseDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class FooGetDefaultResponseSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/FormatTest.cs index 770808322b90..d45a83b0f1d7 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/FormatTest.cs @@ -626,32 +626,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, FormatTest formatTest, Js /// /// The FormatTestSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(FormatTest))] - public partial class FormatTestSerializationContext : JsonSerializerContext - { - /// - /// The FormatTestSerializationContext - /// - /// - public FormatTestSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// FormatTestDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(FormatTest))] - public partial class FormatTestDeserializationContext : JsonSerializerContext - { - /// - /// FormatTestDeserializationContext - /// - /// - public FormatTestDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class FormatTestSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Fruit.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Fruit.cs index a810386beafc..be945563eba9 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Fruit.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Fruit.cs @@ -211,32 +211,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Fruit fruit, JsonSerializ /// /// The FruitSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Fruit))] - public partial class FruitSerializationContext : JsonSerializerContext - { - /// - /// The FruitSerializationContext - /// - /// - public FruitSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// FruitDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Fruit))] - public partial class FruitDeserializationContext : JsonSerializerContext - { - /// - /// FruitDeserializationContext - /// - /// - public FruitDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class FruitSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/FruitReq.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/FruitReq.cs index 0023f401421f..797f263735e0 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/FruitReq.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/FruitReq.cs @@ -192,32 +192,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, FruitReq fruitReq, JsonSe /// /// The FruitReqSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(FruitReq))] - public partial class FruitReqSerializationContext : JsonSerializerContext - { - /// - /// The FruitReqSerializationContext - /// - /// - public FruitReqSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// FruitReqDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(FruitReq))] - public partial class FruitReqDeserializationContext : JsonSerializerContext - { - /// - /// FruitReqDeserializationContext - /// - /// - public FruitReqDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class FruitReqSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/GmFruit.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/GmFruit.cs index 39c587c1fb7c..fea0b966137f 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/GmFruit.cs @@ -207,32 +207,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, GmFruit gmFruit, JsonSeri /// /// The GmFruitSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(GmFruit))] - public partial class GmFruitSerializationContext : JsonSerializerContext - { - /// - /// The GmFruitSerializationContext - /// - /// - public GmFruitSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// GmFruitDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(GmFruit))] - public partial class GmFruitDeserializationContext : JsonSerializerContext - { - /// - /// GmFruitDeserializationContext - /// - /// - public GmFruitDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class GmFruitSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/GrandparentAnimal.cs index b780f97321e4..d4a0752699b2 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/GrandparentAnimal.cs @@ -177,32 +177,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, GrandparentAnimal grandpa /// /// The GrandparentAnimalSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(GrandparentAnimal))] - public partial class GrandparentAnimalSerializationContext : JsonSerializerContext - { - /// - /// The GrandparentAnimalSerializationContext - /// - /// - public GrandparentAnimalSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// GrandparentAnimalDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(GrandparentAnimal))] - public partial class GrandparentAnimalDeserializationContext : JsonSerializerContext - { - /// - /// GrandparentAnimalDeserializationContext - /// - /// - public GrandparentAnimalDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class GrandparentAnimalSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/HasOnlyReadOnly.cs index 2ab0e394c23b..0ba58633d833 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/HasOnlyReadOnly.cs @@ -221,32 +221,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, HasOnlyReadOnly hasOnlyRe /// /// The HasOnlyReadOnlySerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(HasOnlyReadOnly))] - public partial class HasOnlyReadOnlySerializationContext : JsonSerializerContext - { - /// - /// The HasOnlyReadOnlySerializationContext - /// - /// - public HasOnlyReadOnlySerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// HasOnlyReadOnlyDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(HasOnlyReadOnly))] - public partial class HasOnlyReadOnlyDeserializationContext : JsonSerializerContext - { - /// - /// HasOnlyReadOnlyDeserializationContext - /// - /// - public HasOnlyReadOnlyDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class HasOnlyReadOnlySerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/HealthCheckResult.cs index 7650da555ce1..b0753cea2a42 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/HealthCheckResult.cs @@ -164,32 +164,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, HealthCheckResult healthC /// /// The HealthCheckResultSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(HealthCheckResult))] - public partial class HealthCheckResultSerializationContext : JsonSerializerContext - { - /// - /// The HealthCheckResultSerializationContext - /// - /// - public HealthCheckResultSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// HealthCheckResultDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(HealthCheckResult))] - public partial class HealthCheckResultDeserializationContext : JsonSerializerContext - { - /// - /// HealthCheckResultDeserializationContext - /// - /// - public HealthCheckResultDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class HealthCheckResultSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/IsoscelesTriangle.cs index 7580d210523c..e54fa76f0663 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/IsoscelesTriangle.cs @@ -177,32 +177,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, IsoscelesTriangle isoscel /// /// The IsoscelesTriangleSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(IsoscelesTriangle))] - public partial class IsoscelesTriangleSerializationContext : JsonSerializerContext - { - /// - /// The IsoscelesTriangleSerializationContext - /// - /// - public IsoscelesTriangleSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// IsoscelesTriangleDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(IsoscelesTriangle))] - public partial class IsoscelesTriangleDeserializationContext : JsonSerializerContext - { - /// - /// IsoscelesTriangleDeserializationContext - /// - /// - public IsoscelesTriangleDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class IsoscelesTriangleSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/List.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/List.cs index 96853a9b8fc4..031e16c39a57 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/List.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/List.cs @@ -167,32 +167,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, List list, JsonSerializer /// /// The ListSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(List))] - public partial class ListSerializationContext : JsonSerializerContext - { - /// - /// The ListSerializationContext - /// - /// - public ListSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ListDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(List))] - public partial class ListDeserializationContext : JsonSerializerContext - { - /// - /// ListDeserializationContext - /// - /// - public ListDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ListSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/LiteralStringClass.cs index 19e6efb26eb4..46ae1dc05ae3 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/LiteralStringClass.cs @@ -184,32 +184,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, LiteralStringClass litera /// /// The LiteralStringClassSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(LiteralStringClass))] - public partial class LiteralStringClassSerializationContext : JsonSerializerContext - { - /// - /// The LiteralStringClassSerializationContext - /// - /// - public LiteralStringClassSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// LiteralStringClassDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(LiteralStringClass))] - public partial class LiteralStringClassDeserializationContext : JsonSerializerContext - { - /// - /// LiteralStringClassDeserializationContext - /// - /// - public LiteralStringClassDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class LiteralStringClassSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Mammal.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Mammal.cs index 7651c351b18e..fcc1424f2c19 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Mammal.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Mammal.cs @@ -280,32 +280,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Mammal mammal, JsonSerial /// /// The MammalSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Mammal))] - public partial class MammalSerializationContext : JsonSerializerContext - { - /// - /// The MammalSerializationContext - /// - /// - public MammalSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// MammalDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Mammal))] - public partial class MammalDeserializationContext : JsonSerializerContext - { - /// - /// MammalDeserializationContext - /// - /// - public MammalDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class MammalSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/MapTest.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/MapTest.cs index f8565b5bf5fe..6ed69e85cf4a 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/MapTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/MapTest.cs @@ -292,32 +292,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, MapTest mapTest, JsonSeri /// /// The MapTestSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(MapTest))] - public partial class MapTestSerializationContext : JsonSerializerContext - { - /// - /// The MapTestSerializationContext - /// - /// - public MapTestSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// MapTestDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(MapTest))] - public partial class MapTestDeserializationContext : JsonSerializerContext - { - /// - /// MapTestDeserializationContext - /// - /// - public MapTestDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class MapTestSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 96d886719f46..25ea1076cd59 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -234,32 +234,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, MixedPropertiesAndAdditio /// /// The MixedPropertiesAndAdditionalPropertiesClassSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(MixedPropertiesAndAdditionalPropertiesClass))] - public partial class MixedPropertiesAndAdditionalPropertiesClassSerializationContext : JsonSerializerContext - { - /// - /// The MixedPropertiesAndAdditionalPropertiesClassSerializationContext - /// - /// - public MixedPropertiesAndAdditionalPropertiesClassSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// MixedPropertiesAndAdditionalPropertiesClassDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(MixedPropertiesAndAdditionalPropertiesClass))] - public partial class MixedPropertiesAndAdditionalPropertiesClassDeserializationContext : JsonSerializerContext - { - /// - /// MixedPropertiesAndAdditionalPropertiesClassDeserializationContext - /// - /// - public MixedPropertiesAndAdditionalPropertiesClassDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class MixedPropertiesAndAdditionalPropertiesClassSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Model200Response.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Model200Response.cs index ccda51e8dd93..74f7acb1e828 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Model200Response.cs @@ -185,32 +185,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Model200Response model200 /// /// The Model200ResponseSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Model200Response))] - public partial class Model200ResponseSerializationContext : JsonSerializerContext - { - /// - /// The Model200ResponseSerializationContext - /// - /// - public Model200ResponseSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// Model200ResponseDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Model200Response))] - public partial class Model200ResponseDeserializationContext : JsonSerializerContext - { - /// - /// Model200ResponseDeserializationContext - /// - /// - public Model200ResponseDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class Model200ResponseSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ModelClient.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ModelClient.cs index 07f7e3f307f9..5bc60589f350 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ModelClient.cs @@ -167,32 +167,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, ModelClient modelClient, /// /// The ModelClientSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(ModelClient))] - public partial class ModelClientSerializationContext : JsonSerializerContext - { - /// - /// The ModelClientSerializationContext - /// - /// - public ModelClientSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ModelClientDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(ModelClient))] - public partial class ModelClientDeserializationContext : JsonSerializerContext - { - /// - /// ModelClientDeserializationContext - /// - /// - public ModelClientDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ModelClientSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Name.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Name.cs index dba772091421..4648cf04f7d2 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Name.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Name.cs @@ -258,32 +258,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Name name, JsonSerializer /// /// The NameSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Name))] - public partial class NameSerializationContext : JsonSerializerContext - { - /// - /// The NameSerializationContext - /// - /// - public NameSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// NameDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Name))] - public partial class NameDeserializationContext : JsonSerializerContext - { - /// - /// NameDeserializationContext - /// - /// - public NameDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class NameSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 5168d24402e6..ed43ab9fcd27 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -187,32 +187,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, NotificationtestGetElemen /// /// The NotificationtestGetElementsV1ResponseMPayloadSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(NotificationtestGetElementsV1ResponseMPayload))] - public partial class NotificationtestGetElementsV1ResponseMPayloadSerializationContext : JsonSerializerContext - { - /// - /// The NotificationtestGetElementsV1ResponseMPayloadSerializationContext - /// - /// - public NotificationtestGetElementsV1ResponseMPayloadSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// NotificationtestGetElementsV1ResponseMPayloadDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(NotificationtestGetElementsV1ResponseMPayload))] - public partial class NotificationtestGetElementsV1ResponseMPayloadDeserializationContext : JsonSerializerContext - { - /// - /// NotificationtestGetElementsV1ResponseMPayloadDeserializationContext - /// - /// - public NotificationtestGetElementsV1ResponseMPayloadDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class NotificationtestGetElementsV1ResponseMPayloadSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NullableClass.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NullableClass.cs index d91c6c812b1b..5374e7a890e8 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NullableClass.cs @@ -383,32 +383,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, NullableClass nullableCla /// /// The NullableClassSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(NullableClass))] - public partial class NullableClassSerializationContext : JsonSerializerContext - { - /// - /// The NullableClassSerializationContext - /// - /// - public NullableClassSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// NullableClassDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(NullableClass))] - public partial class NullableClassDeserializationContext : JsonSerializerContext - { - /// - /// NullableClassDeserializationContext - /// - /// - public NullableClassDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class NullableClassSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NullableGuidClass.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NullableGuidClass.cs index fd0d03663ad1..eb5434dc5ba1 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NullableGuidClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NullableGuidClass.cs @@ -170,32 +170,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, NullableGuidClass nullabl /// /// The NullableGuidClassSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(NullableGuidClass))] - public partial class NullableGuidClassSerializationContext : JsonSerializerContext - { - /// - /// The NullableGuidClassSerializationContext - /// - /// - public NullableGuidClassSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// NullableGuidClassDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(NullableGuidClass))] - public partial class NullableGuidClassDeserializationContext : JsonSerializerContext - { - /// - /// NullableGuidClassDeserializationContext - /// - /// - public NullableGuidClassDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class NullableGuidClassSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NullableShape.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NullableShape.cs index b5fc16fb2692..8a1f0995af65 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NullableShape.cs @@ -249,32 +249,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, NullableShape nullableSha /// /// The NullableShapeSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(NullableShape))] - public partial class NullableShapeSerializationContext : JsonSerializerContext - { - /// - /// The NullableShapeSerializationContext - /// - /// - public NullableShapeSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// NullableShapeDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(NullableShape))] - public partial class NullableShapeDeserializationContext : JsonSerializerContext - { - /// - /// NullableShapeDeserializationContext - /// - /// - public NullableShapeDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class NullableShapeSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NumberOnly.cs index 06be98cd53c8..740f496eb9d7 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/NumberOnly.cs @@ -168,32 +168,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, NumberOnly numberOnly, Js /// /// The NumberOnlySerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(NumberOnly))] - public partial class NumberOnlySerializationContext : JsonSerializerContext - { - /// - /// The NumberOnlySerializationContext - /// - /// - public NumberOnlySerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// NumberOnlyDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(NumberOnly))] - public partial class NumberOnlyDeserializationContext : JsonSerializerContext - { - /// - /// NumberOnlyDeserializationContext - /// - /// - public NumberOnlyDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class NumberOnlySerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ObjectWithDeprecatedFields.cs index d39c47a5f437..729b057bdb4e 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ObjectWithDeprecatedFields.cs @@ -226,32 +226,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, ObjectWithDeprecatedField /// /// The ObjectWithDeprecatedFieldsSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(ObjectWithDeprecatedFields))] - public partial class ObjectWithDeprecatedFieldsSerializationContext : JsonSerializerContext - { - /// - /// The ObjectWithDeprecatedFieldsSerializationContext - /// - /// - public ObjectWithDeprecatedFieldsSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ObjectWithDeprecatedFieldsDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(ObjectWithDeprecatedFields))] - public partial class ObjectWithDeprecatedFieldsDeserializationContext : JsonSerializerContext - { - /// - /// ObjectWithDeprecatedFieldsDeserializationContext - /// - /// - public ObjectWithDeprecatedFieldsDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ObjectWithDeprecatedFieldsSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OneOfString.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OneOfString.cs index 1c4b8334db2c..e2c6672e77d8 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OneOfString.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OneOfString.cs @@ -164,32 +164,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, OneOfString oneOfString, /// /// The OneOfStringSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(OneOfString))] - public partial class OneOfStringSerializationContext : JsonSerializerContext - { - /// - /// The OneOfStringSerializationContext - /// - /// - public OneOfStringSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// OneOfStringDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(OneOfString))] - public partial class OneOfStringDeserializationContext : JsonSerializerContext - { - /// - /// OneOfStringDeserializationContext - /// - /// - public OneOfStringDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class OneOfStringSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Order.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Order.cs index 4297b4583940..add01056906b 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Order.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Order.cs @@ -354,32 +354,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Order order, JsonSerializ /// /// The OrderSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Order))] - public partial class OrderSerializationContext : JsonSerializerContext - { - /// - /// The OrderSerializationContext - /// - /// - public OrderSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// OrderDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Order))] - public partial class OrderDeserializationContext : JsonSerializerContext - { - /// - /// OrderDeserializationContext - /// - /// - public OrderDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class OrderSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterComposite.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterComposite.cs index 6443b1b88d13..87526afade06 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterComposite.cs @@ -203,32 +203,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, OuterComposite outerCompo /// /// The OuterCompositeSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(OuterComposite))] - public partial class OuterCompositeSerializationContext : JsonSerializerContext - { - /// - /// The OuterCompositeSerializationContext - /// - /// - public OuterCompositeSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// OuterCompositeDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(OuterComposite))] - public partial class OuterCompositeDeserializationContext : JsonSerializerContext - { - /// - /// OuterCompositeDeserializationContext - /// - /// - public OuterCompositeDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class OuterCompositeSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnum.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnum.cs index c1156ffc4648..6bb401613ab4 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnum.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnum.cs @@ -193,32 +193,7 @@ public override void Write(Utf8JsonWriter writer, OuterEnum? outerEnum, JsonSeri /// /// The OuterEnumSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(OuterEnum))] - public partial class OuterEnumSerializationContext : JsonSerializerContext - { - /// - /// The OuterEnumSerializationContext - /// - /// - public OuterEnumSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// OuterEnumDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(OuterEnum))] - public partial class OuterEnumDeserializationContext : JsonSerializerContext - { - /// - /// OuterEnumDeserializationContext - /// - /// - public OuterEnumDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class OuterEnumSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnumDefaultValue.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnumDefaultValue.cs index 5838e6dc83e7..ad18f34631c5 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnumDefaultValue.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnumDefaultValue.cs @@ -193,32 +193,7 @@ public override void Write(Utf8JsonWriter writer, OuterEnumDefaultValue? outerEn /// /// The OuterEnumDefaultValueSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(OuterEnumDefaultValue))] - public partial class OuterEnumDefaultValueSerializationContext : JsonSerializerContext - { - /// - /// The OuterEnumDefaultValueSerializationContext - /// - /// - public OuterEnumDefaultValueSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// OuterEnumDefaultValueDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(OuterEnumDefaultValue))] - public partial class OuterEnumDefaultValueDeserializationContext : JsonSerializerContext - { - /// - /// OuterEnumDefaultValueDeserializationContext - /// - /// - public OuterEnumDefaultValueDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class OuterEnumDefaultValueSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnumInteger.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnumInteger.cs index 8b5cc0590025..f0575d6df270 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnumInteger.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnumInteger.cs @@ -184,32 +184,7 @@ public override void Write(Utf8JsonWriter writer, OuterEnumInteger? outerEnumInt /// /// The OuterEnumIntegerSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(OuterEnumInteger))] - public partial class OuterEnumIntegerSerializationContext : JsonSerializerContext - { - /// - /// The OuterEnumIntegerSerializationContext - /// - /// - public OuterEnumIntegerSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// OuterEnumIntegerDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(OuterEnumInteger))] - public partial class OuterEnumIntegerDeserializationContext : JsonSerializerContext - { - /// - /// OuterEnumIntegerDeserializationContext - /// - /// - public OuterEnumIntegerDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class OuterEnumIntegerSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnumIntegerDefaultValue.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnumIntegerDefaultValue.cs index 53e7411cb248..e915facdbba7 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnumIntegerDefaultValue.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnumIntegerDefaultValue.cs @@ -184,32 +184,7 @@ public override void Write(Utf8JsonWriter writer, OuterEnumIntegerDefaultValue? /// /// The OuterEnumIntegerDefaultValueSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(OuterEnumIntegerDefaultValue))] - public partial class OuterEnumIntegerDefaultValueSerializationContext : JsonSerializerContext - { - /// - /// The OuterEnumIntegerDefaultValueSerializationContext - /// - /// - public OuterEnumIntegerDefaultValueSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// OuterEnumIntegerDefaultValueDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(OuterEnumIntegerDefaultValue))] - public partial class OuterEnumIntegerDefaultValueDeserializationContext : JsonSerializerContext - { - /// - /// OuterEnumIntegerDefaultValueDeserializationContext - /// - /// - public OuterEnumIntegerDefaultValueDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class OuterEnumIntegerDefaultValueSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnumTest.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnumTest.cs index dde6eaa61867..eb1bbbd91cdf 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnumTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/OuterEnumTest.cs @@ -263,32 +263,7 @@ public override void Write(Utf8JsonWriter writer, OuterEnumTest? outerEnumTest, /// /// The OuterEnumTestSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(OuterEnumTest))] - public partial class OuterEnumTestSerializationContext : JsonSerializerContext - { - /// - /// The OuterEnumTestSerializationContext - /// - /// - public OuterEnumTestSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// OuterEnumTestDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(OuterEnumTest))] - public partial class OuterEnumTestDeserializationContext : JsonSerializerContext - { - /// - /// OuterEnumTestDeserializationContext - /// - /// - public OuterEnumTestDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class OuterEnumTestSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ParentPet.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ParentPet.cs index ab38fd96c8e2..1162f9a2a32d 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ParentPet.cs @@ -143,32 +143,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, ParentPet parentPet, Json /// /// The ParentPetSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(ParentPet))] - public partial class ParentPetSerializationContext : JsonSerializerContext - { - /// - /// The ParentPetSerializationContext - /// - /// - public ParentPetSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ParentPetDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(ParentPet))] - public partial class ParentPetDeserializationContext : JsonSerializerContext - { - /// - /// ParentPetDeserializationContext - /// - /// - public ParentPetDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ParentPetSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Pet.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Pet.cs index 9d504ea689e7..e012ef64c9cb 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Pet.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Pet.cs @@ -351,32 +351,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Pet pet, JsonSerializerOp /// /// The PetSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Pet))] - public partial class PetSerializationContext : JsonSerializerContext - { - /// - /// The PetSerializationContext - /// - /// - public PetSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// PetDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Pet))] - public partial class PetDeserializationContext : JsonSerializerContext - { - /// - /// PetDeserializationContext - /// - /// - public PetDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class PetSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Pig.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Pig.cs index 517b9c8ebc75..3f9fdf20cd85 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Pig.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Pig.cs @@ -249,32 +249,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Pig pig, JsonSerializerOp /// /// The PigSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Pig))] - public partial class PigSerializationContext : JsonSerializerContext - { - /// - /// The PigSerializationContext - /// - /// - public PigSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// PigDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Pig))] - public partial class PigDeserializationContext : JsonSerializerContext - { - /// - /// PigDeserializationContext - /// - /// - public PigDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class PigSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/PolymorphicProperty.cs index 5bbdeac532f6..5eb22871d845 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/PolymorphicProperty.cs @@ -243,32 +243,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, PolymorphicProperty polym /// /// The PolymorphicPropertySerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(PolymorphicProperty))] - public partial class PolymorphicPropertySerializationContext : JsonSerializerContext - { - /// - /// The PolymorphicPropertySerializationContext - /// - /// - public PolymorphicPropertySerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// PolymorphicPropertyDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(PolymorphicProperty))] - public partial class PolymorphicPropertyDeserializationContext : JsonSerializerContext - { - /// - /// PolymorphicPropertyDeserializationContext - /// - /// - public PolymorphicPropertyDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class PolymorphicPropertySerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Quadrilateral.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Quadrilateral.cs index d082a184fa04..8b6c244ab73d 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Quadrilateral.cs @@ -249,32 +249,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Quadrilateral quadrilater /// /// The QuadrilateralSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Quadrilateral))] - public partial class QuadrilateralSerializationContext : JsonSerializerContext - { - /// - /// The QuadrilateralSerializationContext - /// - /// - public QuadrilateralSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// QuadrilateralDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Quadrilateral))] - public partial class QuadrilateralDeserializationContext : JsonSerializerContext - { - /// - /// QuadrilateralDeserializationContext - /// - /// - public QuadrilateralDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class QuadrilateralSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/QuadrilateralInterface.cs index 6c288857e7c6..91f6a55eb207 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/QuadrilateralInterface.cs @@ -167,32 +167,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, QuadrilateralInterface qu /// /// The QuadrilateralInterfaceSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(QuadrilateralInterface))] - public partial class QuadrilateralInterfaceSerializationContext : JsonSerializerContext - { - /// - /// The QuadrilateralInterfaceSerializationContext - /// - /// - public QuadrilateralInterfaceSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// QuadrilateralInterfaceDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(QuadrilateralInterface))] - public partial class QuadrilateralInterfaceDeserializationContext : JsonSerializerContext - { - /// - /// QuadrilateralInterfaceDeserializationContext - /// - /// - public QuadrilateralInterfaceDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class QuadrilateralInterfaceSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ReadOnlyFirst.cs index 6aa84200207f..5ecf54003200 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ReadOnlyFirst.cs @@ -220,32 +220,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, ReadOnlyFirst readOnlyFir /// /// The ReadOnlyFirstSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(ReadOnlyFirst))] - public partial class ReadOnlyFirstSerializationContext : JsonSerializerContext - { - /// - /// The ReadOnlyFirstSerializationContext - /// - /// - public ReadOnlyFirstSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ReadOnlyFirstDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(ReadOnlyFirst))] - public partial class ReadOnlyFirstDeserializationContext : JsonSerializerContext - { - /// - /// ReadOnlyFirstDeserializationContext - /// - /// - public ReadOnlyFirstDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ReadOnlyFirstSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Return.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Return.cs index ebb78ff2cde8..454e16dd0f52 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Return.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Return.cs @@ -168,32 +168,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Return varReturn, JsonSer /// /// The ReturnSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Return))] - public partial class ReturnSerializationContext : JsonSerializerContext - { - /// - /// The ReturnSerializationContext - /// - /// - public ReturnSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ReturnDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Return))] - public partial class ReturnDeserializationContext : JsonSerializerContext - { - /// - /// ReturnDeserializationContext - /// - /// - public ReturnDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ReturnSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/RolesReportsHash.cs index ceceff5abcc0..3485ce95577c 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/RolesReportsHash.cs @@ -187,32 +187,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, RolesReportsHash rolesRep /// /// The RolesReportsHashSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(RolesReportsHash))] - public partial class RolesReportsHashSerializationContext : JsonSerializerContext - { - /// - /// The RolesReportsHashSerializationContext - /// - /// - public RolesReportsHashSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// RolesReportsHashDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(RolesReportsHash))] - public partial class RolesReportsHashDeserializationContext : JsonSerializerContext - { - /// - /// RolesReportsHashDeserializationContext - /// - /// - public RolesReportsHashDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class RolesReportsHashSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/RolesReportsHashRole.cs index 88d5afc2b70e..9c20ab46bad7 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/RolesReportsHashRole.cs @@ -167,32 +167,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, RolesReportsHashRole role /// /// The RolesReportsHashRoleSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(RolesReportsHashRole))] - public partial class RolesReportsHashRoleSerializationContext : JsonSerializerContext - { - /// - /// The RolesReportsHashRoleSerializationContext - /// - /// - public RolesReportsHashRoleSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// RolesReportsHashRoleDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(RolesReportsHashRole))] - public partial class RolesReportsHashRoleDeserializationContext : JsonSerializerContext - { - /// - /// RolesReportsHashRoleDeserializationContext - /// - /// - public RolesReportsHashRoleDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class RolesReportsHashRoleSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ScaleneTriangle.cs index 5aa209d7f2a4..39f7d8cc72f2 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ScaleneTriangle.cs @@ -184,32 +184,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, ScaleneTriangle scaleneTr /// /// The ScaleneTriangleSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(ScaleneTriangle))] - public partial class ScaleneTriangleSerializationContext : JsonSerializerContext - { - /// - /// The ScaleneTriangleSerializationContext - /// - /// - public ScaleneTriangleSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ScaleneTriangleDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(ScaleneTriangle))] - public partial class ScaleneTriangleDeserializationContext : JsonSerializerContext - { - /// - /// ScaleneTriangleDeserializationContext - /// - /// - public ScaleneTriangleDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ScaleneTriangleSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Shape.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Shape.cs index 8a873c3fc15f..7100b878d3bd 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Shape.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Shape.cs @@ -249,32 +249,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Shape shape, JsonSerializ /// /// The ShapeSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Shape))] - public partial class ShapeSerializationContext : JsonSerializerContext - { - /// - /// The ShapeSerializationContext - /// - /// - public ShapeSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ShapeDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Shape))] - public partial class ShapeDeserializationContext : JsonSerializerContext - { - /// - /// ShapeDeserializationContext - /// - /// - public ShapeDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ShapeSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ShapeInterface.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ShapeInterface.cs index f62373127466..0a994154af08 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ShapeInterface.cs @@ -167,32 +167,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, ShapeInterface shapeInter /// /// The ShapeInterfaceSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(ShapeInterface))] - public partial class ShapeInterfaceSerializationContext : JsonSerializerContext - { - /// - /// The ShapeInterfaceSerializationContext - /// - /// - public ShapeInterfaceSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ShapeInterfaceDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(ShapeInterface))] - public partial class ShapeInterfaceDeserializationContext : JsonSerializerContext - { - /// - /// ShapeInterfaceDeserializationContext - /// - /// - public ShapeInterfaceDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ShapeInterfaceSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ShapeOrNull.cs index 4166ed333081..c0b313a2f362 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ShapeOrNull.cs @@ -249,32 +249,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, ShapeOrNull shapeOrNull, /// /// The ShapeOrNullSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(ShapeOrNull))] - public partial class ShapeOrNullSerializationContext : JsonSerializerContext - { - /// - /// The ShapeOrNullSerializationContext - /// - /// - public ShapeOrNullSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ShapeOrNullDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(ShapeOrNull))] - public partial class ShapeOrNullDeserializationContext : JsonSerializerContext - { - /// - /// ShapeOrNullDeserializationContext - /// - /// - public ShapeOrNullDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ShapeOrNullSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/SimpleQuadrilateral.cs index 2bee03bd5932..c41dcdc9dcf6 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/SimpleQuadrilateral.cs @@ -184,32 +184,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, SimpleQuadrilateral simpl /// /// The SimpleQuadrilateralSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(SimpleQuadrilateral))] - public partial class SimpleQuadrilateralSerializationContext : JsonSerializerContext - { - /// - /// The SimpleQuadrilateralSerializationContext - /// - /// - public SimpleQuadrilateralSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// SimpleQuadrilateralDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(SimpleQuadrilateral))] - public partial class SimpleQuadrilateralDeserializationContext : JsonSerializerContext - { - /// - /// SimpleQuadrilateralDeserializationContext - /// - /// - public SimpleQuadrilateralDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class SimpleQuadrilateralSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/SpecialModelName.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/SpecialModelName.cs index 3b62d460a477..06b9d48e4696 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/SpecialModelName.cs @@ -185,32 +185,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, SpecialModelName specialM /// /// The SpecialModelNameSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(SpecialModelName))] - public partial class SpecialModelNameSerializationContext : JsonSerializerContext - { - /// - /// The SpecialModelNameSerializationContext - /// - /// - public SpecialModelNameSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// SpecialModelNameDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(SpecialModelName))] - public partial class SpecialModelNameDeserializationContext : JsonSerializerContext - { - /// - /// SpecialModelNameDeserializationContext - /// - /// - public SpecialModelNameDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class SpecialModelNameSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Tag.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Tag.cs index db53dd6b139f..1bf8c4ad9a0b 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Tag.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Tag.cs @@ -185,32 +185,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Tag tag, JsonSerializerOp /// /// The TagSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Tag))] - public partial class TagSerializationContext : JsonSerializerContext - { - /// - /// The TagSerializationContext - /// - /// - public TagSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// TagDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Tag))] - public partial class TagDeserializationContext : JsonSerializerContext - { - /// - /// TagDeserializationContext - /// - /// - public TagDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class TagSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/TestCollectionEndingWithWordList.cs index 8083f3c0a78f..4249ff2fb47b 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/TestCollectionEndingWithWordList.cs @@ -167,32 +167,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, TestCollectionEndingWithW /// /// The TestCollectionEndingWithWordListSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(TestCollectionEndingWithWordList))] - public partial class TestCollectionEndingWithWordListSerializationContext : JsonSerializerContext - { - /// - /// The TestCollectionEndingWithWordListSerializationContext - /// - /// - public TestCollectionEndingWithWordListSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// TestCollectionEndingWithWordListDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(TestCollectionEndingWithWordList))] - public partial class TestCollectionEndingWithWordListDeserializationContext : JsonSerializerContext - { - /// - /// TestCollectionEndingWithWordListDeserializationContext - /// - /// - public TestCollectionEndingWithWordListDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class TestCollectionEndingWithWordListSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/TestCollectionEndingWithWordListObject.cs index 6b4a6a6c4fd1..ed130760a758 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/TestCollectionEndingWithWordListObject.cs @@ -169,32 +169,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, TestCollectionEndingWithW /// /// The TestCollectionEndingWithWordListObjectSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(TestCollectionEndingWithWordListObject))] - public partial class TestCollectionEndingWithWordListObjectSerializationContext : JsonSerializerContext - { - /// - /// The TestCollectionEndingWithWordListObjectSerializationContext - /// - /// - public TestCollectionEndingWithWordListObjectSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// TestCollectionEndingWithWordListObjectDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(TestCollectionEndingWithWordListObject))] - public partial class TestCollectionEndingWithWordListObjectDeserializationContext : JsonSerializerContext - { - /// - /// TestCollectionEndingWithWordListObjectDeserializationContext - /// - /// - public TestCollectionEndingWithWordListObjectDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class TestCollectionEndingWithWordListObjectSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Triangle.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Triangle.cs index c013be07a19e..bddcf663a293 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Triangle.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Triangle.cs @@ -280,32 +280,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Triangle triangle, JsonSe /// /// The TriangleSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Triangle))] - public partial class TriangleSerializationContext : JsonSerializerContext - { - /// - /// The TriangleSerializationContext - /// - /// - public TriangleSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// TriangleDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Triangle))] - public partial class TriangleDeserializationContext : JsonSerializerContext - { - /// - /// TriangleDeserializationContext - /// - /// - public TriangleDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class TriangleSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/TriangleInterface.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/TriangleInterface.cs index cea3122195bc..adc70c646cb9 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/TriangleInterface.cs @@ -167,32 +167,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, TriangleInterface triangl /// /// The TriangleInterfaceSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(TriangleInterface))] - public partial class TriangleInterfaceSerializationContext : JsonSerializerContext - { - /// - /// The TriangleInterfaceSerializationContext - /// - /// - public TriangleInterfaceSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// TriangleInterfaceDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(TriangleInterface))] - public partial class TriangleInterfaceDeserializationContext : JsonSerializerContext - { - /// - /// TriangleInterfaceDeserializationContext - /// - /// - public TriangleInterfaceDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class TriangleInterfaceSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/User.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/User.cs index 0c72a6460e5c..684c3ff5a2e0 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/User.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/User.cs @@ -360,32 +360,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, User user, JsonSerializer /// /// The UserSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(User))] - public partial class UserSerializationContext : JsonSerializerContext - { - /// - /// The UserSerializationContext - /// - /// - public UserSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// UserDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(User))] - public partial class UserDeserializationContext : JsonSerializerContext - { - /// - /// UserDeserializationContext - /// - /// - public UserDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class UserSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Whale.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Whale.cs index 145c238351a3..7d320ced8bb2 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Whale.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Whale.cs @@ -203,32 +203,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Whale whale, JsonSerializ /// /// The WhaleSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Whale))] - public partial class WhaleSerializationContext : JsonSerializerContext - { - /// - /// The WhaleSerializationContext - /// - /// - public WhaleSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// WhaleDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Whale))] - public partial class WhaleDeserializationContext : JsonSerializerContext - { - /// - /// WhaleDeserializationContext - /// - /// - public WhaleDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class WhaleSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Zebra.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Zebra.cs index 13ba96492f45..6e1c25bb5df0 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Zebra.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/Zebra.cs @@ -283,32 +283,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, Zebra zebra, JsonSerializ /// /// The ZebraSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(Zebra))] - public partial class ZebraSerializationContext : JsonSerializerContext - { - /// - /// The ZebraSerializationContext - /// - /// - public ZebraSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ZebraDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(Zebra))] - public partial class ZebraDeserializationContext : JsonSerializerContext - { - /// - /// ZebraDeserializationContext - /// - /// - public ZebraDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ZebraSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ZeroBasedEnum.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ZeroBasedEnum.cs index 53b58db3e06c..743605183d37 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ZeroBasedEnum.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ZeroBasedEnum.cs @@ -179,32 +179,7 @@ public override void Write(Utf8JsonWriter writer, ZeroBasedEnum? zeroBasedEnum, /// /// The ZeroBasedEnumSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(ZeroBasedEnum))] - public partial class ZeroBasedEnumSerializationContext : JsonSerializerContext - { - /// - /// The ZeroBasedEnumSerializationContext - /// - /// - public ZeroBasedEnumSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ZeroBasedEnumDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(ZeroBasedEnum))] - public partial class ZeroBasedEnumDeserializationContext : JsonSerializerContext - { - /// - /// ZeroBasedEnumDeserializationContext - /// - /// - public ZeroBasedEnumDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ZeroBasedEnumSerializationContext : JsonSerializerContext { } } diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ZeroBasedEnumClass.cs index 502739fecd38..e8e474a4a69f 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration/Model/ZeroBasedEnumClass.cs @@ -241,32 +241,7 @@ public void WriteProperties(ref Utf8JsonWriter writer, ZeroBasedEnumClass zeroBa /// /// The ZeroBasedEnumClassSerializationContext /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)] + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] [JsonSerializable(typeof(ZeroBasedEnumClass))] - public partial class ZeroBasedEnumClassSerializationContext : JsonSerializerContext - { - /// - /// The ZeroBasedEnumClassSerializationContext - /// - /// - public ZeroBasedEnumClassSerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } - - /// - /// ZeroBasedEnumClassDeserializationContext - /// - [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)] - [JsonSerializable(typeof(ZeroBasedEnumClass))] - public partial class ZeroBasedEnumClassDeserializationContext : JsonSerializerContext - { - /// - /// ZeroBasedEnumClassDeserializationContext - /// - /// - public ZeroBasedEnumClassDeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options)) - { - } - } + public partial class ZeroBasedEnumClassSerializationContext : JsonSerializerContext { } } From 8b15d4820ed1ee206e2aab99e8f55dc27bed3e82 Mon Sep 17 00:00:00 2001 From: Julian Vennen Date: Mon, 11 Sep 2023 14:06:50 +0200 Subject: [PATCH 03/59] Use backed enums in php-nextgen (#16556) --- .../languages/PhpNextgenClientCodegen.java | 32 +++++++++++++++++++ .../php-nextgen/ObjectSerializer.mustache | 17 +++++----- .../resources/php-nextgen/model_enum.mustache | 23 ++----------- .../OpenAPIClient-php/src/Model/EnumClass.php | 23 +++---------- .../OpenAPIClient-php/src/Model/OuterEnum.php | 23 +++---------- .../src/Model/OuterEnumDefaultValue.php | 23 +++---------- .../src/Model/OuterEnumInteger.php | 23 +++---------- .../Model/OuterEnumIntegerDefaultValue.php | 23 +++---------- .../src/Model/SingleRefType.php | 24 +++----------- .../src/ObjectSerializer.php | 17 +++++----- 10 files changed, 75 insertions(+), 153 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpNextgenClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpNextgenClientCodegen.java index 2f1f9dcb1c79..8aab539f4a89 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpNextgenClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpNextgenClientCodegen.java @@ -20,11 +20,14 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.meta.features.*; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -33,6 +36,7 @@ import java.util.Collections; import java.util.EnumSet; import java.util.List; +import java.util.Map; public class PhpNextgenClientCodegen extends AbstractPhpCodegen { @SuppressWarnings("hiding") @@ -122,4 +126,32 @@ public void processOpts() { supportingFiles.add(new SupportingFile(".phplint.mustache", "", ".phplint.yml")); supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh")); } + + @Override + public Map postProcessAllModels(Map objs) { + final Map processed = super.postProcessAllModels(objs); + + for (Map.Entry entry : processed.entrySet()) { + entry.setValue(postProcessModelsMap(entry.getValue())); + } + + return processed; + } + + private ModelsMap postProcessModelsMap(ModelsMap objs) { + for (ModelMap m : objs.getModels()) { + CodegenModel model = m.getModel(); + + if (model.isEnum) { + for (Map enumVars : (List>) model.getAllowableValues().get("enumVars")) { + if ((Boolean) enumVars.get("isString")) { + model.vendorExtensions.putIfAbsent("x-php-enum-type", "string"); + } else { + model.vendorExtensions.putIfAbsent("x-php-enum-type", "int"); + } + } + } + } + return objs; + } } diff --git a/modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache b/modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache index 9c46077110b2..7f2be65eb670 100644 --- a/modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache +++ b/modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache @@ -79,12 +79,10 @@ class ObjectSerializer $getter = $data::getters()[$property]; $value = $data->$getter(); if ($value !== null && !in_array($openAPIType, [{{&primitives}}], true)) { - $callable = [$openAPIType, 'getAllowableEnumValues']; - if (is_callable($callable)) { - /** array $callable */ - $allowedEnumTypes = $callable(); - if (!in_array($value, $allowedEnumTypes, true)) { - $imploded = implode("', '", $allowedEnumTypes); + if ($openAPIType instanceof \BackedEnum) { + $data = $openAPIType::tryFrom($data); + if ($data === null) { + $imploded = implode("', '", array_map(fn($case) => $case->value, $openAPIType::cases())); throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); } } @@ -488,9 +486,10 @@ class ObjectSerializer } - if (method_exists($class, 'getAllowableEnumValues')) { - if (!in_array($data, $class::getAllowableEnumValues(), true)) { - $imploded = implode("', '", $class::getAllowableEnumValues()); + if ($class instanceof \BackedEnum) { + $data = $class::tryFrom($data); + if ($data === null) { + $imploded = implode("', '", array_map(fn($case) => $case->value, $class::cases())); throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); } return $data; diff --git a/modules/openapi-generator/src/main/resources/php-nextgen/model_enum.mustache b/modules/openapi-generator/src/main/resources/php-nextgen/model_enum.mustache index 77001f2e6058..bb8e093f7aad 100644 --- a/modules/openapi-generator/src/main/resources/php-nextgen/model_enum.mustache +++ b/modules/openapi-generator/src/main/resources/php-nextgen/model_enum.mustache @@ -1,28 +1,9 @@ -class {{classname}} +enum {{classname}}: {{vendorExtensions.x-php-enum-type}} { - /** - * Possible values of this enum - */ {{#allowableValues}} {{#enumVars}} - public const {{^isString}}NUMBER_{{/isString}}{{{name}}} = {{{value}}}; + case {{^isString}}NUMBER_{{/isString}}{{{name}}} = {{{value}}}; {{/enumVars}} {{/allowableValues}} - /** - * Gets allowable values of the enum - * @return string[] - */ - public static function getAllowableEnumValues() - { - return [ - {{#allowableValues}} - {{#enumVars}} - self::{{^isString}}NUMBER_{{/isString}}{{{name}}}{{^-last}}, - {{/-last}} - {{/enumVars}} - {{/allowableValues}} - - ]; - } } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumClass.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumClass.php index 3fa283827578..328f4f330d2a 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumClass.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumClass.php @@ -37,29 +37,14 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class EnumClass +enum EnumClass: string { - /** - * Possible values of this enum - */ - public const ABC = '_abc'; + case ABC = '_abc'; - public const EFG = '-efg'; + case EFG = '-efg'; - public const XYZ = '(xyz)'; + case XYZ = '(xyz)'; - /** - * Gets allowable values of the enum - * @return string[] - */ - public static function getAllowableEnumValues() - { - return [ - self::ABC, - self::EFG, - self::XYZ - ]; - } } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnum.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnum.php index ff541c22882b..ed5aa962f71a 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnum.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnum.php @@ -37,29 +37,14 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class OuterEnum +enum OuterEnum: string { - /** - * Possible values of this enum - */ - public const PLACED = 'placed'; + case PLACED = 'placed'; - public const APPROVED = 'approved'; + case APPROVED = 'approved'; - public const DELIVERED = 'delivered'; + case DELIVERED = 'delivered'; - /** - * Gets allowable values of the enum - * @return string[] - */ - public static function getAllowableEnumValues() - { - return [ - self::PLACED, - self::APPROVED, - self::DELIVERED - ]; - } } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumDefaultValue.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumDefaultValue.php index 09ce6f0f634f..334410e862e3 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumDefaultValue.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumDefaultValue.php @@ -37,29 +37,14 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class OuterEnumDefaultValue +enum OuterEnumDefaultValue: string { - /** - * Possible values of this enum - */ - public const PLACED = 'placed'; + case PLACED = 'placed'; - public const APPROVED = 'approved'; + case APPROVED = 'approved'; - public const DELIVERED = 'delivered'; + case DELIVERED = 'delivered'; - /** - * Gets allowable values of the enum - * @return string[] - */ - public static function getAllowableEnumValues() - { - return [ - self::PLACED, - self::APPROVED, - self::DELIVERED - ]; - } } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumInteger.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumInteger.php index ba2f6c4df13b..83013b84235b 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumInteger.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumInteger.php @@ -37,29 +37,14 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class OuterEnumInteger +enum OuterEnumInteger: int { - /** - * Possible values of this enum - */ - public const NUMBER_0 = 0; + case NUMBER_0 = 0; - public const NUMBER_1 = 1; + case NUMBER_1 = 1; - public const NUMBER_2 = 2; + case NUMBER_2 = 2; - /** - * Gets allowable values of the enum - * @return string[] - */ - public static function getAllowableEnumValues() - { - return [ - self::NUMBER_0, - self::NUMBER_1, - self::NUMBER_2 - ]; - } } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumIntegerDefaultValue.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumIntegerDefaultValue.php index 8e870afe04b2..d841179ebe74 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumIntegerDefaultValue.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumIntegerDefaultValue.php @@ -37,29 +37,14 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class OuterEnumIntegerDefaultValue +enum OuterEnumIntegerDefaultValue: int { - /** - * Possible values of this enum - */ - public const NUMBER_0 = 0; + case NUMBER_0 = 0; - public const NUMBER_1 = 1; + case NUMBER_1 = 1; - public const NUMBER_2 = 2; + case NUMBER_2 = 2; - /** - * Gets allowable values of the enum - * @return string[] - */ - public static function getAllowableEnumValues() - { - return [ - self::NUMBER_0, - self::NUMBER_1, - self::NUMBER_2 - ]; - } } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/SingleRefType.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/SingleRefType.php index 59eb6481f84a..877fa704faef 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/SingleRefType.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/SingleRefType.php @@ -37,26 +37,12 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class SingleRefType +enum SingleRefType: string { - /** - * Possible values of this enum - */ - public const ADMIN = 'admin'; - - public const USER = 'user'; - - /** - * Gets allowable values of the enum - * @return string[] - */ - public static function getAllowableEnumValues() - { - return [ - self::ADMIN, - self::USER - ]; - } + case ADMIN = 'admin'; + + case USER = 'user'; + } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php index 16097a025a98..336ef331d939 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php @@ -88,12 +88,10 @@ public static function sanitizeForSerialization($data, $type = null, $format = n $getter = $data::getters()[$property]; $value = $data->$getter(); if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { - $callable = [$openAPIType, 'getAllowableEnumValues']; - if (is_callable($callable)) { - /** array $callable */ - $allowedEnumTypes = $callable(); - if (!in_array($value, $allowedEnumTypes, true)) { - $imploded = implode("', '", $allowedEnumTypes); + if ($openAPIType instanceof \BackedEnum) { + $data = $openAPIType::tryFrom($data); + if ($data === null) { + $imploded = implode("', '", array_map(fn($case) => $case->value, $openAPIType::cases())); throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); } } @@ -497,9 +495,10 @@ public static function deserialize($data, $class, $httpHeaders = null) } - if (method_exists($class, 'getAllowableEnumValues')) { - if (!in_array($data, $class::getAllowableEnumValues(), true)) { - $imploded = implode("', '", $class::getAllowableEnumValues()); + if ($class instanceof \BackedEnum) { + $data = $class::tryFrom($data); + if ($data === null) { + $imploded = implode("', '", array_map(fn($case) => $case->value, $class::cases())); throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); } return $data; From cd0fde41f12615010999147fc99b98c1f5a62f52 Mon Sep 17 00:00:00 2001 From: Julian Vennen Date: Tue, 12 Sep 2023 04:25:28 +0200 Subject: [PATCH 04/59] fix parent class check in ObjectSerializer (#16558) --- .../src/main/resources/php-nextgen/ObjectSerializer.mustache | 4 ++-- .../php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache b/modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache index 7f2be65eb670..ca9d0a17c79b 100644 --- a/modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache +++ b/modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache @@ -79,7 +79,7 @@ class ObjectSerializer $getter = $data::getters()[$property]; $value = $data->$getter(); if ($value !== null && !in_array($openAPIType, [{{&primitives}}], true)) { - if ($openAPIType instanceof \BackedEnum) { + if (is_sublass_of($openAPIType, '\BackedEnum')) { $data = $openAPIType::tryFrom($data); if ($data === null) { $imploded = implode("', '", array_map(fn($case) => $case->value, $openAPIType::cases())); @@ -486,7 +486,7 @@ class ObjectSerializer } - if ($class instanceof \BackedEnum) { + if (is_subclass_of($class, '\BackedEnum')) { $data = $class::tryFrom($data); if ($data === null) { $imploded = implode("', '", array_map(fn($case) => $case->value, $class::cases())); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php index 336ef331d939..55eeaaded916 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php @@ -88,7 +88,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n $getter = $data::getters()[$property]; $value = $data->$getter(); if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { - if ($openAPIType instanceof \BackedEnum) { + if (is_sublass_of($openAPIType, '\BackedEnum')) { $data = $openAPIType::tryFrom($data); if ($data === null) { $imploded = implode("', '", array_map(fn($case) => $case->value, $openAPIType::cases())); @@ -495,7 +495,7 @@ public static function deserialize($data, $class, $httpHeaders = null) } - if ($class instanceof \BackedEnum) { + if (is_subclass_of($class, '\BackedEnum')) { $data = $class::tryFrom($data); if ($data === null) { $imploded = implode("', '", array_map(fn($case) => $case->value, $class::cases())); From ad589c770098a4aebfbd23b9a390d751f7f7d4c4 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 12 Sep 2023 14:58:05 +0800 Subject: [PATCH 05/59] better null check for schema types (#16564) --- .../java/org/openapitools/codegen/OpenAPINormalizer.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java index 9a51066c7b46..ebe004e8fe58 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java @@ -153,7 +153,7 @@ public void processRules(Map inputRules) { // loop through all the rules for (Map.Entry rule : inputRules.entrySet()) { - LOGGER.info("processing rule {} => {}", rule.getKey(), rule.getValue()); + LOGGER.debug("processing rule {} => {}", rule.getKey(), rule.getValue()); if (!ruleNames.contains(rule.getKey())) { // invalid rule name LOGGER.warn("Invalid openapi-normalizer rule name: ", rule.getKey()); } else if (enableAll) { @@ -882,6 +882,11 @@ private Schema processNormalize31Spec(Schema schema, Set visitedSchemas) if (!getRule(NORMALIZE_31SPEC)) { return schema; } + + if (schema == null || schema.getTypes() == null) { + return null; + } + // process null if (schema.getTypes().contains("null")) { schema.setNullable(true); From c6d355e8d4d6593b7deade3a71a2ac6a8d5f9b8d Mon Sep 17 00:00:00 2001 From: Dennis Melzer Date: Tue, 12 Sep 2023 08:58:26 +0200 Subject: [PATCH 06/59] Fix spring scope property (#16553) * Fix spring scope property * Adapt test files --- .../libraries/spring-cloud/oauth2ClientProperties.mustache | 2 +- .../src/main/resources/oauth2-client.properties | 2 +- .../spring-cloud/src/main/resources/oauth2-client.properties | 2 +- .../src/main/resources/oauth2-client.properties | 2 +- .../spring-cloud-3/src/main/resources/oauth2-client.properties | 2 +- .../src/main/resources/oauth2-client.properties | 2 +- .../src/main/resources/oauth2-client.properties | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/oauth2ClientProperties.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/oauth2ClientProperties.mustache index 8e9f54d1fd47..792b3b279feb 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/oauth2ClientProperties.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/oauth2ClientProperties.mustache @@ -2,7 +2,7 @@ {{#isOAuth}} spring.security.oauth2.client.registration.{{{name}}}{{#lambda.pascalcase}}{{{flow}}}{{/lambda.pascalcase}}.enabled=false spring.security.oauth2.client.registration.{{{name}}}{{#lambda.pascalcase}}{{{flow}}}{{/lambda.pascalcase}}.client-id=set-{{{name}}}{{#lambda.pascalcase}}{{{flow}}}{{/lambda.pascalcase}}-client-id -{{#scopes}}{{#-first}}spring.security.oauth2.client.registration.{{{name}}}{{#lambda.pascalcase}}{{{flow}}}{{/lambda.pascalcase}}.scopes={{/-first}}{{scope}}{{^-last}},{{/-last}}{{/scopes}} +{{#scopes}}{{#-first}}spring.security.oauth2.client.registration.{{{name}}}{{#lambda.pascalcase}}{{{flow}}}{{/lambda.pascalcase}}.scope={{/-first}}{{scope}}{{^-last}},{{/-last}}{{/scopes}} {{#isCode}} spring.security.oauth2.client.registration.{{{name}}}{{#lambda.pascalcase}}{{{flow}}}{{/lambda.pascalcase}}.authorization-grant-type=authorization_code spring.security.oauth2.client.registration.{{{name}}}{{#lambda.pascalcase}}{{{flow}}}{{/lambda.pascalcase}}.redirect-uri=set-{{{name}}}{{#lambda.pascalcase}}{{{flow}}}{{/lambda.pascalcase}}-redirect-uri diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/resources/oauth2-client.properties b/samples/client/petstore/spring-cloud-feign-without-url/src/main/resources/oauth2-client.properties index 64716bf45f47..c0968e5d458f 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/resources/oauth2-client.properties +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/resources/oauth2-client.properties @@ -1,5 +1,5 @@ spring.security.oauth2.client.registration.petstoreAuthImplicit.enabled=false spring.security.oauth2.client.registration.petstoreAuthImplicit.client-id=set-petstoreAuthImplicit-client-id -spring.security.oauth2.client.registration.petstoreAuthImplicit.scopes=write:pets,read:pets +spring.security.oauth2.client.registration.petstoreAuthImplicit.scope=write:pets,read:pets spring.security.oauth2.client.registration.petstoreAuthImplicit.authorization-grant-type=implicit spring.security.oauth2.client.provider.petstoreAuthImplicit.authorization-uri=http://petstore.swagger.io/api/oauth/dialog diff --git a/samples/client/petstore/spring-cloud/src/main/resources/oauth2-client.properties b/samples/client/petstore/spring-cloud/src/main/resources/oauth2-client.properties index 64716bf45f47..c0968e5d458f 100644 --- a/samples/client/petstore/spring-cloud/src/main/resources/oauth2-client.properties +++ b/samples/client/petstore/spring-cloud/src/main/resources/oauth2-client.properties @@ -1,5 +1,5 @@ spring.security.oauth2.client.registration.petstoreAuthImplicit.enabled=false spring.security.oauth2.client.registration.petstoreAuthImplicit.client-id=set-petstoreAuthImplicit-client-id -spring.security.oauth2.client.registration.petstoreAuthImplicit.scopes=write:pets,read:pets +spring.security.oauth2.client.registration.petstoreAuthImplicit.scope=write:pets,read:pets spring.security.oauth2.client.registration.petstoreAuthImplicit.authorization-grant-type=implicit spring.security.oauth2.client.provider.petstoreAuthImplicit.authorization-uri=http://petstore.swagger.io/api/oauth/dialog diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/resources/oauth2-client.properties b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/resources/oauth2-client.properties index 64716bf45f47..c0968e5d458f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/resources/oauth2-client.properties +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/resources/oauth2-client.properties @@ -1,5 +1,5 @@ spring.security.oauth2.client.registration.petstoreAuthImplicit.enabled=false spring.security.oauth2.client.registration.petstoreAuthImplicit.client-id=set-petstoreAuthImplicit-client-id -spring.security.oauth2.client.registration.petstoreAuthImplicit.scopes=write:pets,read:pets +spring.security.oauth2.client.registration.petstoreAuthImplicit.scope=write:pets,read:pets spring.security.oauth2.client.registration.petstoreAuthImplicit.authorization-grant-type=implicit spring.security.oauth2.client.provider.petstoreAuthImplicit.authorization-uri=http://petstore.swagger.io/api/oauth/dialog diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/resources/oauth2-client.properties b/samples/openapi3/client/petstore/spring-cloud-3/src/main/resources/oauth2-client.properties index 64716bf45f47..c0968e5d458f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/resources/oauth2-client.properties +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/resources/oauth2-client.properties @@ -1,5 +1,5 @@ spring.security.oauth2.client.registration.petstoreAuthImplicit.enabled=false spring.security.oauth2.client.registration.petstoreAuthImplicit.client-id=set-petstoreAuthImplicit-client-id -spring.security.oauth2.client.registration.petstoreAuthImplicit.scopes=write:pets,read:pets +spring.security.oauth2.client.registration.petstoreAuthImplicit.scope=write:pets,read:pets spring.security.oauth2.client.registration.petstoreAuthImplicit.authorization-grant-type=implicit spring.security.oauth2.client.provider.petstoreAuthImplicit.authorization-uri=http://petstore.swagger.io/api/oauth/dialog diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/resources/oauth2-client.properties b/samples/openapi3/client/petstore/spring-cloud-async/src/main/resources/oauth2-client.properties index 64716bf45f47..c0968e5d458f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/resources/oauth2-client.properties +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/resources/oauth2-client.properties @@ -1,5 +1,5 @@ spring.security.oauth2.client.registration.petstoreAuthImplicit.enabled=false spring.security.oauth2.client.registration.petstoreAuthImplicit.client-id=set-petstoreAuthImplicit-client-id -spring.security.oauth2.client.registration.petstoreAuthImplicit.scopes=write:pets,read:pets +spring.security.oauth2.client.registration.petstoreAuthImplicit.scope=write:pets,read:pets spring.security.oauth2.client.registration.petstoreAuthImplicit.authorization-grant-type=implicit spring.security.oauth2.client.provider.petstoreAuthImplicit.authorization-uri=http://petstore.swagger.io/api/oauth/dialog diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/resources/oauth2-client.properties b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/resources/oauth2-client.properties index 64716bf45f47..c0968e5d458f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/resources/oauth2-client.properties +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/resources/oauth2-client.properties @@ -1,5 +1,5 @@ spring.security.oauth2.client.registration.petstoreAuthImplicit.enabled=false spring.security.oauth2.client.registration.petstoreAuthImplicit.client-id=set-petstoreAuthImplicit-client-id -spring.security.oauth2.client.registration.petstoreAuthImplicit.scopes=write:pets,read:pets +spring.security.oauth2.client.registration.petstoreAuthImplicit.scope=write:pets,read:pets spring.security.oauth2.client.registration.petstoreAuthImplicit.authorization-grant-type=implicit spring.security.oauth2.client.provider.petstoreAuthImplicit.authorization-uri=http://petstore.swagger.io/api/oauth/dialog From 196c2b1642453c15e33bbdb6677339468b1a5d7f Mon Sep 17 00:00:00 2001 From: Philzen Date: Tue, 12 Sep 2023 09:42:19 +0200 Subject: [PATCH 07/59] [maven-generator] Do not cleanup output if spec file is unchanged and skipIfSpecIsUnchanged=true (Fixes #16490) (#16491) * Don't delete output directory if spec is unchanged Resolves #16490 * Fix some typos --- .../codegen/plugin/CodeGenMojo.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java index b45318b9f853..40de961a11e7 100644 --- a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java +++ b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java @@ -520,15 +520,6 @@ public void execute() throws MojoExecutionException { "generated-test-sources/openapi" : "generated-sources/openapi"); } - if (cleanupOutput) { - try { - FileUtils.deleteDirectory(output); - LOGGER.info("Previous run output is removed from {}", output); - } catch (IOException e) { - LOGGER.warn("Failed to clean-up output directory {}", output, e); - } - } - addCompileSourceRootIfConfigured(); try { @@ -566,10 +557,19 @@ public void execute() throws MojoExecutionException { } } + if (cleanupOutput) { + try { + FileUtils.deleteDirectory(output); + LOGGER.info("Previous run output is removed from {}", output); + } catch (IOException e) { + LOGGER.warn("Failed to clean up output directory {}", output, e); + } + } + // attempt to read from config file CodegenConfigurator configurator = CodegenConfigurator.fromFile(configurationFile); - // if a config file wasn't specified or we were unable to read it + // if a config file wasn't specified, or we were unable to read it if (configurator == null) { configurator = new CodegenConfigurator(); } @@ -938,8 +938,8 @@ public void execute() throws MojoExecutionException { /** * Calculate openapi specification file hash. If specification is hosted on remote resource it is downloaded first * - * @param inputSpecFile - Openapi specification input file to calculate it's hash. - * Does not taken into account if input spec is hosted on remote resource + * @param inputSpecFile - Openapi specification input file to calculate its hash. + * Does not take into account if input spec is hosted on remote resource * @return openapi specification file hash * @throws IOException */ @@ -991,8 +991,8 @@ private URL inputSpecRemoteUrl(){ /** * Get specification hash file - * @param inputSpecFile - Openapi specification input file to calculate it's hash. - * Does not taken into account if input spec is hosted on remote resource + * @param inputSpecFile - Openapi specification input file to calculate its hash. + * Does not take into account if input spec is hosted on remote resource * @return a file with previously calculated hash */ private File getHashFile(File inputSpecFile) { From d6695056fe17fb7e0d4ff8b5b2d963e30e479a6f Mon Sep 17 00:00:00 2001 From: martin-mfg <2026226+martin-mfg@users.noreply.github.com> Date: Tue, 12 Sep 2023 09:59:58 +0200 Subject: [PATCH 08/59] add test case for nullable parent property (#16552) * add nullable case to spring test spec * generate samples for changed spring input * add nullable case to general test spec * generate samples for changed general input * generate samples again * generates samples again * re-build from new sources, generates samples again --- ...ith-fake-endpoints-models-for-testing.yaml | 36 ++ ...ith-fake-endpoints-models-for-testing.yaml | 36 ++ .../petstore/elixir/.openapi-generator/FILES | 2 + .../elixir/lib/openapi_petstore/api/fake.ex | 31 ++ .../model/child_with_nullable.ex | 26 + .../model/parent_with_nullable.ex | 24 + .../mp/.openapi-generator/FILES | 4 + .../mp/docs/ChildWithNullable.md | 13 + .../java-helidon-client/mp/docs/FakeApi.md | 36 ++ .../mp/docs/ParentWithNullable.md | 22 + .../org/openapitools/client/api/FakeApi.java | 10 + .../client/model/ChildWithNullable.java | 78 +++ .../client/model/ParentWithNullable.java | 123 +++++ .../client/model/ChildWithNullableTest.java | 67 +++ .../client/model/ParentWithNullableTest.java | 60 +++ .../se/.openapi-generator/FILES | 4 + .../se/docs/ChildWithNullable.md | 13 + .../java-helidon-client/se/docs/FakeApi.md | 66 +++ .../se/docs/ParentWithNullable.md | 22 + .../org/openapitools/client/api/FakeApi.java | 9 + .../openapitools/client/api/FakeApiImpl.java | 40 ++ .../client/model/ChildWithNullable.java | 78 +++ .../client/model/ParentWithNullable.java | 123 +++++ .../client/model/ChildWithNullableTest.java | 67 +++ .../client/model/ParentWithNullableTest.java | 60 +++ .../.openapi-generator/FILES | 4 + .../petstore/java/apache-httpclient/README.md | 3 + .../java/apache-httpclient/api/openapi.yaml | 38 ++ .../docs/ChildWithNullable.md | 13 + .../java/apache-httpclient/docs/FakeApi.md | 66 +++ .../docs/ParentWithNullable.md | 22 + .../org/openapitools/client/api/FakeApi.java | 72 +++ .../client/model/ChildWithNullable.java | 208 ++++++++ .../client/model/ParentWithNullable.java | 261 ++++++++++ .../client/model/ChildWithNullableTest.java | 68 +++ .../client/model/ParentWithNullableTest.java | 62 +++ .../java/feign/.openapi-generator/FILES | 2 + .../petstore/java/feign/api/openapi.yaml | 38 ++ .../org/openapitools/client/api/FakeApi.java | 28 + .../client/model/ChildWithNullable.java | 129 +++++ .../client/model/ParentWithNullable.java | 204 ++++++++ .../client/model/ChildWithNullableTest.java | 66 +++ .../client/model/ParentWithNullableTest.java | 60 +++ .../java/resteasy/.openapi-generator/FILES | 4 + .../client/petstore/java/resteasy/README.md | 3 + .../petstore/java/resteasy/api/openapi.yaml | 38 ++ .../java/resteasy/docs/ChildWithNullable.md | 13 + .../petstore/java/resteasy/docs/FakeApi.md | 66 +++ .../java/resteasy/docs/ParentWithNullable.md | 22 + .../org/openapitools/client/api/FakeApi.java | 43 ++ .../client/model/ChildWithNullable.java | 140 +++++ .../client/model/ParentWithNullable.java | 203 ++++++++ .../client/model/ChildWithNullableTest.java | 68 +++ .../client/model/ParentWithNullableTest.java | 62 +++ .../.openapi-generator/FILES | 4 + .../java/resttemplate-withXml/README.md | 3 + .../resttemplate-withXml/api/openapi.yaml | 38 ++ .../docs/ChildWithNullable.md | 13 + .../java/resttemplate-withXml/docs/FakeApi.md | 66 +++ .../docs/ParentWithNullable.md | 22 + .../org/openapitools/client/api/FakeApi.java | 46 ++ .../client/model/ChildWithNullable.java | 150 ++++++ .../client/model/ParentWithNullable.java | 218 ++++++++ .../client/model/ChildWithNullableTest.java | 68 +++ .../client/model/ParentWithNullableTest.java | 62 +++ .../resttemplate/.openapi-generator/FILES | 4 + .../petstore/java/resttemplate/README.md | 3 + .../java/resttemplate/api/openapi.yaml | 38 ++ .../resttemplate/docs/ChildWithNullable.md | 13 + .../java/resttemplate/docs/FakeApi.md | 66 +++ .../resttemplate/docs/ParentWithNullable.md | 22 + .../org/openapitools/client/api/FakeApi.java | 46 ++ .../client/model/ChildWithNullable.java | 140 +++++ .../client/model/ParentWithNullable.java | 203 ++++++++ .../client/model/ChildWithNullableTest.java | 68 +++ .../client/model/ParentWithNullableTest.java | 62 +++ .../java/vertx/.openapi-generator/FILES | 4 + samples/client/petstore/java/vertx/README.md | 3 + .../petstore/java/vertx/api/openapi.yaml | 38 ++ .../java/vertx/docs/ChildWithNullable.md | 13 + .../petstore/java/vertx/docs/FakeApi.md | 66 +++ .../java/vertx/docs/ParentWithNullable.md | 22 + .../org/openapitools/client/api/FakeApi.java | 5 + .../openapitools/client/api/FakeApiImpl.java | 49 ++ .../client/api/rxjava/FakeApi.java | 46 ++ .../client/model/ChildWithNullable.java | 140 +++++ .../client/model/ParentWithNullable.java | 203 ++++++++ .../client/model/ChildWithNullableTest.java | 68 +++ .../client/model/ParentWithNullableTest.java | 62 +++ .../.openapi-generator/FILES | 4 + .../petstore/java/webclient-jakarta/README.md | 3 + .../java/webclient-jakarta/api/openapi.yaml | 38 ++ .../docs/ChildWithNullable.md | 13 + .../java/webclient-jakarta/docs/FakeApi.md | 66 +++ .../docs/ParentWithNullable.md | 22 + .../org/openapitools/client/api/FakeApi.java | 70 +++ .../client/model/ChildWithNullable.java | 140 +++++ .../client/model/ParentWithNullable.java | 203 ++++++++ .../client/model/ChildWithNullableTest.java | 68 +++ .../client/model/ParentWithNullableTest.java | 62 +++ .../.openapi-generator/FILES | 4 + .../java/webclient-swagger2/README.md | 3 + .../java/webclient-swagger2/api/openapi.yaml | 38 ++ .../docs/ChildWithNullable.md | 13 + .../java/webclient-swagger2/docs/FakeApi.md | 66 +++ .../docs/ParentWithNullable.md | 22 + .../org/openapitools/client/api/FakeApi.java | 70 +++ .../client/model/ChildWithNullable.java | 142 +++++ .../client/model/ParentWithNullable.java | 206 ++++++++ .../client/model/ChildWithNullableTest.java | 69 +++ .../client/model/ParentWithNullableTest.java | 63 +++ .../java/webclient/.openapi-generator/FILES | 4 + .../client/petstore/java/webclient/README.md | 3 + .../petstore/java/webclient/api/openapi.yaml | 38 ++ .../java/webclient/docs/ChildWithNullable.md | 13 + .../petstore/java/webclient/docs/FakeApi.md | 66 +++ .../java/webclient/docs/ParentWithNullable.md | 22 + .../org/openapitools/client/api/FakeApi.java | 70 +++ .../client/model/ChildWithNullable.java | 140 +++++ .../client/model/ParentWithNullable.java | 203 ++++++++ .../client/model/ChildWithNullableTest.java | 68 +++ .../client/model/ParentWithNullableTest.java | 62 +++ samples/client/petstore/k6/script.js | 16 + .../petstore/perl/.openapi-generator/FILES | 4 + samples/client/petstore/perl/README.md | 7 + .../petstore/perl/docs/ChildWithNullable.md | 15 + .../petstore/perl/docs/DeprecatedObject.md | 15 + samples/client/petstore/perl/docs/FakeApi.md | 46 ++ .../petstore/perl/docs/ParentWithNullable.md | 16 + .../perl/lib/WWW/OpenAPIClient/FakeApi.pm | 61 +++ .../OpenAPIClient/Object/ChildWithNullable.pm | 255 +++++++++ .../OpenAPIClient/Object/DeprecatedObject.pm | 242 +++++++++ .../Object/ParentWithNullable.pm | 251 +++++++++ .../petstore/perl/t/ChildWithNullableTest.t | 34 ++ .../petstore/perl/t/DeprecatedObjectTest.t | 34 ++ .../petstore/perl/t/ParentWithNullableTest.t | 34 ++ .../.openapi-generator/FILES | 4 + .../php-nextgen/OpenAPIClient-php/README.md | 3 + .../OpenAPIClient-php/docs/Api/FakeApi.md | 56 ++ .../docs/Model/ChildWithNullable.md | 9 + .../docs/Model/ParentWithNullable.md | 10 + .../OpenAPIClient-php/src/Api/FakeApi.php | 231 +++++++++ .../src/Model/ChildWithNullable.php | 403 +++++++++++++++ .../src/Model/ParentWithNullable.php | 485 ++++++++++++++++++ .../tests/Model/ChildWithNullableTest.php | 90 ++++ .../tests/Model/ParentWithNullableTest.php | 99 ++++ .../src/PSPetstore/Model/ModelMapping.ps1 | 97 ++++ .../tests/Model/ModelMapping.Tests.ps1 | 17 + .../ruby-autoload/.openapi-generator/FILES | 4 + .../client/petstore/ruby-autoload/README.md | 3 + .../ruby-autoload/docs/ChildWithNullable.md | 18 + .../petstore/ruby-autoload/docs/FakeApi.md | 64 +++ .../ruby-autoload/docs/ParentWithNullable.md | 20 + .../petstore/ruby-autoload/lib/petstore.rb | 2 + .../lib/petstore/api/fake_api.rb | 66 +++ .../petstore/models/child_with_nullable.rb | 247 +++++++++ .../petstore/models/parent_with_nullable.rb | 263 ++++++++++ .../spec/models/child_with_nullable_spec.rb | 34 ++ .../spec/models/parent_with_nullable_spec.rb | 44 ++ .../ruby-faraday/.openapi-generator/FILES | 4 + .../client/petstore/ruby-faraday/README.md | 3 + .../ruby-faraday/docs/ChildWithNullable.md | 18 + .../petstore/ruby-faraday/docs/FakeApi.md | 64 +++ .../ruby-faraday/docs/ParentWithNullable.md | 20 + .../petstore/ruby-faraday/lib/petstore.rb | 2 + .../ruby-faraday/lib/petstore/api/fake_api.rb | 66 +++ .../petstore/models/child_with_nullable.rb | 247 +++++++++ .../petstore/models/parent_with_nullable.rb | 263 ++++++++++ .../spec/models/child_with_nullable_spec.rb | 34 ++ .../spec/models/parent_with_nullable_spec.rb | 44 ++ .../.openapi-generator/FILES | 2 + .../java/org/openapitools/api/FakeApi.java | 19 + .../openapitools/model/ChildWithNullable.java | 111 ++++ .../model/ParentWithNullable.java | 163 ++++++ .../.openapi-generator/FILES | 2 + .../java/org/openapitools/api/FakeApi.java | 19 + .../model/ChildWithNullableDto.java | 113 ++++ .../model/ParentWithNullableDto.java | 164 ++++++ .../default-v3.0/.openapi-generator/FILES | 2 + .../builds/default-v3.0/apis/FakeApi.ts | 41 ++ .../default-v3.0/models/ChildWithNullable.ts | 74 +++ .../default-v3.0/models/ParentWithNullable.ts | 92 ++++ .../builds/default-v3.0/models/index.ts | 2 + .../.openapi-generator/FILES | 4 + .../README.md | 3 + .../doc/ChildWithNullable.md | 17 + .../doc/FakeApi.md | 43 ++ .../doc/ParentWithNullable.md | 16 + .../lib/openapi.dart | 2 + .../lib/src/api/fake_api.dart | 66 +++ .../lib/src/deserialize.dart | 6 + .../lib/src/model/child_with_nullable.dart | 98 ++++ .../lib/src/model/parent_with_nullable.dart | 79 +++ .../test/child_with_nullable_test.dart | 26 + .../test/parent_with_nullable_test.dart | 21 + .../.openapi-generator/FILES | 4 + .../petstore_client_lib_fake/README.md | 3 + .../doc/ChildWithNullable.md | 17 + .../petstore_client_lib_fake/doc/FakeApi.md | 43 ++ .../doc/ParentWithNullable.md | 16 + .../petstore_client_lib_fake/lib/openapi.dart | 2 + .../lib/src/api/fake_api.dart | 68 +++ .../lib/src/model/child_with_nullable.dart | 156 ++++++ .../lib/src/model/parent_with_nullable.dart | 212 ++++++++ .../lib/src/serializers.dart | 5 + .../test/child_with_nullable_test.dart | 26 + .../test/parent_with_nullable_test.dart | 21 + .../.openapi-generator/FILES | 4 + .../dart2/petstore_client_lib_fake/README.md | 3 + .../doc/ChildWithNullable.md | 17 + .../petstore_client_lib_fake/doc/FakeApi.md | 43 ++ .../doc/ParentWithNullable.md | 16 + .../petstore_client_lib_fake/lib/api.dart | 2 + .../lib/api/fake_api.dart | 50 ++ .../lib/api_client.dart | 4 + .../lib/model/child_with_nullable.dart | 211 ++++++++ .../lib/model/parent_with_nullable.dart | 194 +++++++ .../test/child_with_nullable_test.dart | 37 ++ .../test/parent_with_nullable_test.dart | 32 ++ .../.openapi-generator/FILES | 2 + .../java/org/openapitools/api/FakeApi.java | 27 + .../openapitools/model/ChildWithNullable.java | 114 ++++ .../model/ParentWithNullable.java | 167 ++++++ .../.openapi-generator/FILES | 2 + .../java/org/openapitools/api/FakeApi.java | 29 ++ .../openapitools/api/FakeApiController.java | 1 + .../org/openapitools/api/FakeApiDelegate.java | 14 + .../openapitools/model/ChildWithNullable.java | 114 ++++ .../model/ParentWithNullable.java | 167 ++++++ .../src/main/resources/openapi.yaml | 40 ++ .../.openapi-generator/FILES | 2 + .../java/org/openapitools/api/FakeApi.java | 30 ++ .../openapitools/api/FakeApiController.java | 1 + .../openapitools/model/ChildWithNullable.java | 114 ++++ .../model/ParentWithNullable.java | 167 ++++++ .../src/main/resources/openapi.yaml | 40 ++ .../petstore/mysql/.openapi-generator/FILES | 2 + .../mysql/Model/ChildWithNullable.sql | 26 + .../mysql/Model/ParentWithNullable.sql | 26 + .../schema/petstore/mysql/mysql_schema.sql | 19 + .../generated/3_0/.openapi-generator/FILES | 4 + .../cpp-restbed/generated/3_0/api/FakeApi.cpp | 130 +++++ .../cpp-restbed/generated/3_0/api/FakeApi.h | 69 +++ .../generated/3_0/model/ChildWithNullable.cpp | 140 +++++ .../generated/3_0/model/ChildWithNullable.h | 106 ++++ .../3_0/model/ParentWithNullable.cpp | 127 +++++ .../generated/3_0/model/ParentWithNullable.h | 97 ++++ .../mp/.openapi-generator/FILES | 2 + .../petstore/java-helidon-server/mp/README.md | 1 + .../openapitools/server/api/FakeService.java | 6 + .../server/api/FakeServiceImpl.java | 7 + .../server/model/ChildWithNullable.java | 80 +++ .../server/model/ParentWithNullable.java | 149 ++++++ .../src/main/resources/META-INF/openapi.yml | 38 ++ .../server/model/ChildWithNullableTest.java | 62 +++ .../server/model/ParentWithNullableTest.java | 53 ++ .../se/.openapi-generator/FILES | 2 + .../petstore/java-helidon-server/se/README.md | 1 + .../openapitools/server/api/FakeService.java | 10 + .../server/api/FakeServiceImpl.java | 5 + .../server/model/ChildWithNullable.java | 73 +++ .../server/model/ParentWithNullable.java | 125 +++++ .../src/main/resources/META-INF/openapi.yml | 38 ++ .../server/model/ChildWithNullableTest.java | 62 +++ .../server/model/ParentWithNullableTest.java | 53 ++ .../jaxrs-jersey/.openapi-generator/FILES | 2 + .../java/org/openapitools/api/FakeApi.java | 13 + .../org/openapitools/api/FakeApiService.java | 2 + .../openapitools/model/ChildWithNullable.java | 98 ++++ .../model/ParentWithNullable.java | 160 ++++++ .../api/impl/FakeApiServiceImpl.java | 6 + .../php-laravel/.openapi-generator/FILES | 2 + .../app/Http/Controllers/FakeController.php | 24 + .../lib/app/Models/ChildWithNullable.php | 21 + .../lib/app/Models/ParentWithNullable.php | 18 + .../petstore/php-laravel/lib/routes/api.php | 7 + .../lib/app/Http/Controllers/FakeApi.php | 24 + .../petstore/php-lumen/lib/routes/web.php | 7 + .../.openapi-generator/FILES | 2 + .../java/org/openapitools/api/FakeApi.java | 27 + .../openapitools/model/ChildWithNullable.java | 114 ++++ .../model/ParentWithNullable.java | 167 ++++++ .../.openapi-generator/FILES | 2 + .../java/org/openapitools/api/FakeApi.java | 30 ++ .../openapitools/api/FakeApiController.java | 1 + .../openapitools/model/ChildWithNullable.java | 101 ++++ .../model/ParentWithNullable.java | 153 ++++++ .../src/main/resources/openapi.yaml | 40 ++ .../.openapi-generator/FILES | 2 + .../java/org/openapitools/api/FakeApi.java | 30 ++ .../openapitools/api/FakeApiController.java | 1 + .../openapitools/model/ChildWithNullable.java | 115 +++++ .../model/ParentWithNullable.java | 168 ++++++ .../src/main/resources/openapi.yaml | 40 ++ .../.openapi-generator/FILES | 2 + .../java/org/openapitools/api/FakeApi.java | 29 ++ .../openapitools/api/FakeApiController.java | 1 + .../org/openapitools/api/FakeApiDelegate.java | 14 + .../openapitools/model/ChildWithNullable.java | 115 +++++ .../model/ParentWithNullable.java | 168 ++++++ .../src/main/resources/openapi.yaml | 40 ++ .../.openapi-generator/FILES | 2 + .../java/org/openapitools/api/FakeApi.java | 29 ++ .../openapitools/api/FakeApiController.java | 1 + .../org/openapitools/api/FakeApiDelegate.java | 14 + .../openapitools/model/ChildWithNullable.java | 115 +++++ .../model/ParentWithNullable.java | 168 ++++++ .../src/main/resources/openapi.yaml | 40 ++ .../.openapi-generator/FILES | 2 + .../java/org/openapitools/api/FakeApi.java | 30 ++ .../openapitools/api/FakeApiController.java | 1 + .../openapitools/model/ChildWithNullable.java | 115 +++++ .../model/ParentWithNullable.java | 168 ++++++ .../src/main/resources/openapi.yaml | 40 ++ .../.openapi-generator/FILES | 2 + .../java/org/openapitools/api/FakeApi.java | 31 ++ .../openapitools/api/FakeApiController.java | 1 + .../org/openapitools/api/FakeApiDelegate.java | 17 + .../openapitools/model/ChildWithNullable.java | 115 +++++ .../model/ParentWithNullable.java | 168 ++++++ .../src/main/resources/openapi.yaml | 40 ++ .../.openapi-generator/FILES | 2 + .../java/org/openapitools/api/FakeApi.java | 30 ++ .../openapitools/api/FakeApiController.java | 1 + .../org/openapitools/api/FakeApiDelegate.java | 17 + .../openapitools/model/ChildWithNullable.java | 115 +++++ .../model/ParentWithNullable.java | 168 ++++++ .../src/main/resources/openapi.yaml | 40 ++ .../.openapi-generator/FILES | 2 + .../java/org/openapitools/api/FakeApi.java | 30 ++ .../openapitools/api/FakeApiController.java | 1 + .../openapitools/model/ChildWithNullable.java | 115 +++++ .../model/ParentWithNullable.java | 168 ++++++ .../src/main/resources/openapi.yaml | 40 ++ .../.openapi-generator/FILES | 2 + .../openapitools/virtualan/api/FakeApi.java | 31 ++ .../virtualan/api/FakeApiController.java | 1 + .../virtualan/model/ChildWithNullable.java | 114 ++++ .../virtualan/model/ParentWithNullable.java | 167 ++++++ .../src/main/resources/openapi.yaml | 40 ++ .../springboot/.openapi-generator/FILES | 2 + .../java/org/openapitools/api/FakeApi.java | 30 ++ .../openapitools/api/FakeApiController.java | 1 + .../model/ChildWithNullableDto.java | 117 +++++ .../model/ParentWithNullableDto.java | 169 ++++++ .../src/main/resources/openapi.yaml | 40 ++ 346 files changed, 20471 insertions(+) create mode 100644 samples/client/petstore/elixir/lib/openapi_petstore/model/child_with_nullable.ex create mode 100644 samples/client/petstore/elixir/lib/openapi_petstore/model/parent_with_nullable.ex create mode 100644 samples/client/petstore/java-helidon-client/mp/docs/ChildWithNullable.md create mode 100644 samples/client/petstore/java-helidon-client/mp/docs/ParentWithNullable.md create mode 100644 samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/model/ChildWithNullable.java create mode 100644 samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/model/ParentWithNullable.java create mode 100644 samples/client/petstore/java-helidon-client/mp/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java create mode 100644 samples/client/petstore/java-helidon-client/mp/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java create mode 100644 samples/client/petstore/java-helidon-client/se/docs/ChildWithNullable.md create mode 100644 samples/client/petstore/java-helidon-client/se/docs/ParentWithNullable.md create mode 100644 samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/model/ChildWithNullable.java create mode 100644 samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/model/ParentWithNullable.java create mode 100644 samples/client/petstore/java-helidon-client/se/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java create mode 100644 samples/client/petstore/java-helidon-client/se/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java create mode 100644 samples/client/petstore/java/apache-httpclient/docs/ChildWithNullable.md create mode 100644 samples/client/petstore/java/apache-httpclient/docs/ParentWithNullable.md create mode 100644 samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ChildWithNullable.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java create mode 100644 samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ChildWithNullable.java create mode 100644 samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ParentWithNullable.java create mode 100644 samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java create mode 100644 samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java create mode 100644 samples/client/petstore/java/resteasy/docs/ChildWithNullable.md create mode 100644 samples/client/petstore/java/resteasy/docs/ParentWithNullable.md create mode 100644 samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ChildWithNullable.java create mode 100644 samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ParentWithNullable.java create mode 100644 samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java create mode 100644 samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java create mode 100644 samples/client/petstore/java/resttemplate-withXml/docs/ChildWithNullable.md create mode 100644 samples/client/petstore/java/resttemplate-withXml/docs/ParentWithNullable.md create mode 100644 samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ChildWithNullable.java create mode 100644 samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ParentWithNullable.java create mode 100644 samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java create mode 100644 samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java create mode 100644 samples/client/petstore/java/resttemplate/docs/ChildWithNullable.md create mode 100644 samples/client/petstore/java/resttemplate/docs/ParentWithNullable.md create mode 100644 samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ChildWithNullable.java create mode 100644 samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java create mode 100644 samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java create mode 100644 samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java create mode 100644 samples/client/petstore/java/vertx/docs/ChildWithNullable.md create mode 100644 samples/client/petstore/java/vertx/docs/ParentWithNullable.md create mode 100644 samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ChildWithNullable.java create mode 100644 samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ParentWithNullable.java create mode 100644 samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java create mode 100644 samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java create mode 100644 samples/client/petstore/java/webclient-jakarta/docs/ChildWithNullable.md create mode 100644 samples/client/petstore/java/webclient-jakarta/docs/ParentWithNullable.md create mode 100644 samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ChildWithNullable.java create mode 100644 samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ParentWithNullable.java create mode 100644 samples/client/petstore/java/webclient-jakarta/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java create mode 100644 samples/client/petstore/java/webclient-jakarta/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java create mode 100644 samples/client/petstore/java/webclient-swagger2/docs/ChildWithNullable.md create mode 100644 samples/client/petstore/java/webclient-swagger2/docs/ParentWithNullable.md create mode 100644 samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ChildWithNullable.java create mode 100644 samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ParentWithNullable.java create mode 100644 samples/client/petstore/java/webclient-swagger2/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java create mode 100644 samples/client/petstore/java/webclient-swagger2/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java create mode 100644 samples/client/petstore/java/webclient/docs/ChildWithNullable.md create mode 100644 samples/client/petstore/java/webclient/docs/ParentWithNullable.md create mode 100644 samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ChildWithNullable.java create mode 100644 samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java create mode 100644 samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java create mode 100644 samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java create mode 100644 samples/client/petstore/perl/docs/ChildWithNullable.md create mode 100644 samples/client/petstore/perl/docs/DeprecatedObject.md create mode 100644 samples/client/petstore/perl/docs/ParentWithNullable.md create mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ChildWithNullable.pm create mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DeprecatedObject.pm create mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ParentWithNullable.pm create mode 100644 samples/client/petstore/perl/t/ChildWithNullableTest.t create mode 100644 samples/client/petstore/perl/t/DeprecatedObjectTest.t create mode 100644 samples/client/petstore/perl/t/ParentWithNullableTest.t create mode 100644 samples/client/petstore/php-nextgen/OpenAPIClient-php/docs/Model/ChildWithNullable.md create mode 100644 samples/client/petstore/php-nextgen/OpenAPIClient-php/docs/Model/ParentWithNullable.md create mode 100644 samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ChildWithNullable.php create mode 100644 samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ParentWithNullable.php create mode 100644 samples/client/petstore/php-nextgen/OpenAPIClient-php/tests/Model/ChildWithNullableTest.php create mode 100644 samples/client/petstore/php-nextgen/OpenAPIClient-php/tests/Model/ParentWithNullableTest.php create mode 100644 samples/client/petstore/powershell/src/PSPetstore/Model/ModelMapping.ps1 create mode 100644 samples/client/petstore/powershell/tests/Model/ModelMapping.Tests.ps1 create mode 100644 samples/client/petstore/ruby-autoload/docs/ChildWithNullable.md create mode 100644 samples/client/petstore/ruby-autoload/docs/ParentWithNullable.md create mode 100644 samples/client/petstore/ruby-autoload/lib/petstore/models/child_with_nullable.rb create mode 100644 samples/client/petstore/ruby-autoload/lib/petstore/models/parent_with_nullable.rb create mode 100644 samples/client/petstore/ruby-autoload/spec/models/child_with_nullable_spec.rb create mode 100644 samples/client/petstore/ruby-autoload/spec/models/parent_with_nullable_spec.rb create mode 100644 samples/client/petstore/ruby-faraday/docs/ChildWithNullable.md create mode 100644 samples/client/petstore/ruby-faraday/docs/ParentWithNullable.md create mode 100644 samples/client/petstore/ruby-faraday/lib/petstore/models/child_with_nullable.rb create mode 100644 samples/client/petstore/ruby-faraday/lib/petstore/models/parent_with_nullable.rb create mode 100644 samples/client/petstore/ruby-faraday/spec/models/child_with_nullable_spec.rb create mode 100644 samples/client/petstore/ruby-faraday/spec/models/parent_with_nullable_spec.rb create mode 100644 samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ChildWithNullable.java create mode 100644 samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java create mode 100644 samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ChildWithNullableDto.java create mode 100644 samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ParentWithNullableDto.java create mode 100644 samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ChildWithNullable.ts create mode 100644 samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ParentWithNullable.ts create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ChildWithNullable.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ParentWithNullable.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/child_with_nullable.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/parent_with_nullable.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/test/child_with_nullable_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/test/parent_with_nullable_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ChildWithNullable.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ParentWithNullable.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/parent_with_nullable.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/child_with_nullable_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/parent_with_nullable_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ChildWithNullable.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ParentWithNullable.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/child_with_nullable.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/parent_with_nullable.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/child_with_nullable_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/parent_with_nullable_test.dart create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ChildWithNullable.java create mode 100644 samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ParentWithNullable.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java create mode 100644 samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ChildWithNullable.java create mode 100644 samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java create mode 100644 samples/schema/petstore/mysql/Model/ChildWithNullable.sql create mode 100644 samples/schema/petstore/mysql/Model/ParentWithNullable.sql create mode 100644 samples/server/petstore/cpp-restbed/generated/3_0/model/ChildWithNullable.cpp create mode 100644 samples/server/petstore/cpp-restbed/generated/3_0/model/ChildWithNullable.h create mode 100644 samples/server/petstore/cpp-restbed/generated/3_0/model/ParentWithNullable.cpp create mode 100644 samples/server/petstore/cpp-restbed/generated/3_0/model/ParentWithNullable.h create mode 100644 samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/ChildWithNullable.java create mode 100644 samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/ParentWithNullable.java create mode 100644 samples/server/petstore/java-helidon-server/mp/src/test/java/org/openapitools/server/model/ChildWithNullableTest.java create mode 100644 samples/server/petstore/java-helidon-server/mp/src/test/java/org/openapitools/server/model/ParentWithNullableTest.java create mode 100644 samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ChildWithNullable.java create mode 100644 samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ParentWithNullable.java create mode 100644 samples/server/petstore/java-helidon-server/se/src/test/java/org/openapitools/server/model/ChildWithNullableTest.java create mode 100644 samples/server/petstore/java-helidon-server/se/src/test/java/org/openapitools/server/model/ParentWithNullableTest.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ChildWithNullable.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ParentWithNullable.java create mode 100644 samples/server/petstore/php-laravel/lib/app/Models/ChildWithNullable.php create mode 100644 samples/server/petstore/php-laravel/lib/app/Models/ParentWithNullable.php create mode 100644 samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ChildWithNullable.java create mode 100644 samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ParentWithNullable.java create mode 100644 samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ChildWithNullable.java create mode 100644 samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ParentWithNullable.java create mode 100644 samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ChildWithNullable.java create mode 100644 samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ParentWithNullable.java create mode 100644 samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ChildWithNullable.java create mode 100644 samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ParentWithNullable.java create mode 100644 samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java create mode 100644 samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java create mode 100644 samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ChildWithNullable.java create mode 100644 samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java create mode 100644 samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ChildWithNullable.java create mode 100644 samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullable.java create mode 100644 samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ChildWithNullable.java create mode 100644 samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java create mode 100644 samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ChildWithNullable.java create mode 100644 samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ParentWithNullable.java create mode 100644 samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ChildWithNullable.java create mode 100644 samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ParentWithNullable.java create mode 100644 samples/server/petstore/springboot/src/main/java/org/openapitools/model/ChildWithNullableDto.java create mode 100644 samples/server/petstore/springboot/src/main/java/org/openapitools/model/ParentWithNullableDto.java diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml index c6091e8cacc0..746d1be1134b 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -1014,6 +1014,23 @@ paths: type: string description: request body required: true + /fake/nullable: + post: + tags: + - fake + summary: test nullable parent property + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation /fake/body-with-query-params: put: tags: @@ -1826,6 +1843,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + type: object + discriminator: + propertyName: type + properties: + type: + type: string + enum: + - ChildWithNullable + nullableProperty: + type: string + nullable: true + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - type: object + properties: + otherProperty: + type: string StringBooleanMap: additionalProperties: type: boolean diff --git a/modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml index 9f965349404d..f92d9a5c9787 100644 --- a/modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml @@ -924,6 +924,23 @@ paths: responses: "200": description: successful operation + /fake/nullable: + post: + tags: + - fake + summary: test nullable parent property + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation /fake/body-with-query-params: put: tags: @@ -1743,6 +1760,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + type: object + discriminator: + propertyName: type + properties: + type: + type: string + enum: + - ChildWithNullable + nullableProperty: + type: string + nullable: true + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - type: object + properties: + otherProperty: + type: string StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/client/petstore/elixir/.openapi-generator/FILES b/samples/client/petstore/elixir/.openapi-generator/FILES index cf3fc36a0ab8..4e11f3ad0744 100644 --- a/samples/client/petstore/elixir/.openapi-generator/FILES +++ b/samples/client/petstore/elixir/.openapi-generator/FILES @@ -24,6 +24,7 @@ lib/openapi_petstore/model/array_test.ex lib/openapi_petstore/model/capitalization.ex lib/openapi_petstore/model/cat.ex lib/openapi_petstore/model/category.ex +lib/openapi_petstore/model/child_with_nullable.ex lib/openapi_petstore/model/class_model.ex lib/openapi_petstore/model/client.ex lib/openapi_petstore/model/deprecated_model.ex @@ -53,6 +54,7 @@ lib/openapi_petstore/model/outer_enum_default_value.ex lib/openapi_petstore/model/outer_enum_integer.ex lib/openapi_petstore/model/outer_enum_integer_default_value.ex lib/openapi_petstore/model/outer_object_with_enum_property.ex +lib/openapi_petstore/model/parent_with_nullable.ex lib/openapi_petstore/model/pet.ex lib/openapi_petstore/model/read_only_first.ex lib/openapi_petstore/model/return.ex diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex b/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex index 86607169736b..6cdb560634a2 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex @@ -618,6 +618,37 @@ defmodule OpenapiPetstore.Api.Fake do ]) end + @doc """ + test nullable parent property + + + ### Parameters + + - `connection` (OpenapiPetstore.Connection): Connection to server + - `child_with_nullable` (ChildWithNullable): request body + - `opts` (keyword): Optional parameters + + ### Returns + + - `{:ok, nil}` on success + - `{:error, Tesla.Env.t}` on failure + """ + @spec test_nullable(Tesla.Env.client, OpenapiPetstore.Model.ChildWithNullable.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t} + def test_nullable(connection, child_with_nullable, _opts \\ []) do + request = + %{} + |> method(:post) + |> url("/fake/nullable") + |> add_param(:body, :body, child_with_nullable) + |> Enum.into([]) + + connection + |> Connection.request(request) + |> evaluate_response([ + {200, false} + ]) + end + @doc """ To test the collection format in query parameters diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/child_with_nullable.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/child_with_nullable.ex new file mode 100644 index 000000000000..850ce5cbdf43 --- /dev/null +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/child_with_nullable.ex @@ -0,0 +1,26 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule OpenapiPetstore.Model.ChildWithNullable do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :type, + :nullableProperty, + :otherProperty + ] + + @type t :: %__MODULE__{ + :type => String.t | nil, + :nullableProperty => String.t | nil, + :otherProperty => String.t | nil + } + + def decode(value) do + value + end +end + diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/parent_with_nullable.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/parent_with_nullable.ex new file mode 100644 index 000000000000..8fc6d5113e8e --- /dev/null +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/parent_with_nullable.ex @@ -0,0 +1,24 @@ +# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# Do not edit this file manually. + +defmodule OpenapiPetstore.Model.ParentWithNullable do + @moduledoc """ + + """ + + @derive Jason.Encoder + defstruct [ + :type, + :nullableProperty + ] + + @type t :: %__MODULE__{ + :type => String.t | nil, + :nullableProperty => String.t | nil + } + + def decode(value) do + value + end +end + 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 3355ff7560c8..697bbc6ddabd 100644 --- a/samples/client/petstore/java-helidon-client/mp/.openapi-generator/FILES +++ b/samples/client/petstore/java-helidon-client/mp/.openapi-generator/FILES @@ -9,6 +9,7 @@ docs/ArrayTest.md docs/Capitalization.md docs/Cat.md docs/Category.md +docs/ChildWithNullable.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md @@ -44,6 +45,7 @@ docs/OuterEnumDefaultValue.md docs/OuterEnumInteger.md docs/OuterEnumIntegerDefaultValue.md docs/OuterObjectWithEnumProperty.md +docs/ParentWithNullable.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md @@ -74,6 +76,7 @@ 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/Category.java +src/main/java/org/openapitools/client/model/ChildWithNullable.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 @@ -106,6 +109,7 @@ src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java src/main/java/org/openapitools/client/model/OuterEnumInteger.java src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java +src/main/java/org/openapitools/client/model/ParentWithNullable.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java src/main/java/org/openapitools/client/model/SingleRefType.java diff --git a/samples/client/petstore/java-helidon-client/mp/docs/ChildWithNullable.md b/samples/client/petstore/java-helidon-client/mp/docs/ChildWithNullable.md new file mode 100644 index 000000000000..73c0dd6d4737 --- /dev/null +++ b/samples/client/petstore/java-helidon-client/mp/docs/ChildWithNullable.md @@ -0,0 +1,13 @@ + + +# ChildWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**otherProperty** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java-helidon-client/mp/docs/FakeApi.md b/samples/client/petstore/java-helidon-client/mp/docs/FakeApi.md index be1544eae6ee..5ad019091529 100644 --- a/samples/client/petstore/java-helidon-client/mp/docs/FakeApi.md +++ b/samples/client/petstore/java-helidon-client/mp/docs/FakeApi.md @@ -21,6 +21,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | | [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testNullable**](FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property | | [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -640,6 +641,41 @@ No authorization required | **200** | successful operation | - | +## testNullable + +> void testNullable(childWithNullable) + +test nullable parent property + + + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | | + +### Return type + +[**void**](Void.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + ## testQueryParameterCollectionFormat > void testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) diff --git a/samples/client/petstore/java-helidon-client/mp/docs/ParentWithNullable.md b/samples/client/petstore/java-helidon-client/mp/docs/ParentWithNullable.md new file mode 100644 index 000000000000..b8fcf6b42e8f --- /dev/null +++ b/samples/client/petstore/java-helidon-client/mp/docs/ParentWithNullable.md @@ -0,0 +1,22 @@ + + +# ParentWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**nullableProperty** | **String** | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| CHILDWITHNULLABLE | "ChildWithNullable" | + + + diff --git a/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/api/FakeApi.java index af82256d0d7f..89484f30f6c6 100644 --- a/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/api/FakeApi.java @@ -26,6 +26,7 @@ import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; import java.math.BigDecimal; +import org.openapitools.client.model.ChildWithNullable; import org.openapitools.client.model.Client; import org.openapitools.client.model.EnumClass; import org.openapitools.client.model.FakeBigDecimalMap200Response; @@ -169,6 +170,15 @@ public interface FakeApi { @Consumes({ "application/x-www-form-urlencoded" }) void testJsonFormData(@FormParam("param") String param, @FormParam("param2") String param2) throws ApiException, ProcessingException; + /** + * test nullable parent property + * + */ + @POST + @Path("/nullable") + @Consumes({ "application/json" }) + void testNullable(ChildWithNullable childWithNullable) throws ApiException, ProcessingException; + @PUT @Path("/test-query-parameters") void testQueryParameterCollectionFormat(@QueryParam("pipe") List pipe, @QueryParam("ioutil") List ioutil, @QueryParam("http") List http, @QueryParam("url") List url, @QueryParam("context") List context, @QueryParam("allowEmpty") String allowEmpty, @QueryParam("language") Map language) throws ApiException, ProcessingException; diff --git a/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/model/ChildWithNullable.java b/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/model/ChildWithNullable.java new file mode 100644 index 000000000000..90b2f7ceb09b --- /dev/null +++ b/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/model/ChildWithNullable.java @@ -0,0 +1,78 @@ +/** + * OpenAPI Petstore + * 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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; + + + + +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + /** + * Get otherProperty + * @return otherProperty + **/ + public String getOtherProperty() { + return otherProperty; + } + + /** + * Set otherProperty + **/ + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + + /** + * Create a string representation of this pojo. + **/ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/model/ParentWithNullable.java new file mode 100644 index 000000000000..25c24ff86020 --- /dev/null +++ b/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -0,0 +1,123 @@ +/** + * OpenAPI Petstore + * 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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.NoSuchElementException; + + + + +public class ParentWithNullable { + +public enum TypeEnum { + + CHILDWITHNULLABLE(String.valueOf("ChildWithNullable")); + + String value; + + TypeEnum (String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + +} + + private TypeEnum type; + + private String nullableProperty; + + /** + * Get type + * @return type + **/ + public TypeEnum getType() { + return type; + } + + /** + * Set type + **/ + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + **/ + public String getNullableProperty() { + return nullableProperty; + } + + /** + * Set nullableProperty + **/ + public void setNullableProperty(String nullableProperty) { + this.nullableProperty = nullableProperty; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = nullableProperty; + return this; + } + + + /** + * Create a string representation of this pojo. + **/ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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/ChildWithNullableTest.java b/samples/client/petstore/java-helidon-client/mp/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java new file mode 100644 index 000000000000..68acb8c52349 --- /dev/null +++ b/samples/client/petstore/java-helidon-client/mp/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java @@ -0,0 +1,67 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * 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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; + +import org.junit.jupiter.api.Test; + +/** + * Model tests for ChildWithNullable + */ +public class ChildWithNullableTest { + private final ChildWithNullable model = new ChildWithNullable(); + + /** + * Model tests for ChildWithNullable + */ + @Test + public void testChildWithNullable() { + // TODO: test ChildWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + + /** + * Test the property 'otherProperty' + */ + @Test + public void otherPropertyTest() { + // TODO: test otherProperty + } + +} diff --git a/samples/client/petstore/java-helidon-client/mp/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java b/samples/client/petstore/java-helidon-client/mp/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java new file mode 100644 index 000000000000..a0fe79ed444b --- /dev/null +++ b/samples/client/petstore/java-helidon-client/mp/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java @@ -0,0 +1,60 @@ +/** + * OpenAPI Petstore + * 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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.NoSuchElementException; + +import org.junit.jupiter.api.Test; + +/** + * Model tests for ParentWithNullable + */ +public class ParentWithNullableTest { + private final ParentWithNullable model = new ParentWithNullable(); + + /** + * Model tests for ParentWithNullable + */ + @Test + public void testParentWithNullable() { + // TODO: test ParentWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + +} 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 4fcd023785c6..e94daa98539c 100644 --- a/samples/client/petstore/java-helidon-client/se/.openapi-generator/FILES +++ b/samples/client/petstore/java-helidon-client/se/.openapi-generator/FILES @@ -9,6 +9,7 @@ docs/ArrayTest.md docs/Capitalization.md docs/Cat.md docs/Category.md +docs/ChildWithNullable.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md @@ -44,6 +45,7 @@ docs/OuterEnumDefaultValue.md docs/OuterEnumInteger.md docs/OuterEnumIntegerDefaultValue.md docs/OuterObjectWithEnumProperty.md +docs/ParentWithNullable.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md @@ -83,6 +85,7 @@ 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/Category.java +src/main/java/org/openapitools/client/model/ChildWithNullable.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 @@ -115,6 +118,7 @@ src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java src/main/java/org/openapitools/client/model/OuterEnumInteger.java src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java +src/main/java/org/openapitools/client/model/ParentWithNullable.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java src/main/java/org/openapitools/client/model/SingleRefType.java diff --git a/samples/client/petstore/java-helidon-client/se/docs/ChildWithNullable.md b/samples/client/petstore/java-helidon-client/se/docs/ChildWithNullable.md new file mode 100644 index 000000000000..73c0dd6d4737 --- /dev/null +++ b/samples/client/petstore/java-helidon-client/se/docs/ChildWithNullable.md @@ -0,0 +1,13 @@ + + +# ChildWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**otherProperty** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java-helidon-client/se/docs/FakeApi.md b/samples/client/petstore/java-helidon-client/se/docs/FakeApi.md index 6eb12aee3577..df8b14be8e29 100644 --- a/samples/client/petstore/java-helidon-client/se/docs/FakeApi.md +++ b/samples/client/petstore/java-helidon-client/se/docs/FakeApi.md @@ -21,6 +21,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | | [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testNullable**](FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property | | [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -1199,6 +1200,71 @@ No authorization required | **200** | successful operation | - | +## testNullable + +> testNullable(childWithNullable) + +test nullable parent property + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + ChildWithNullable childWithNullable = new ChildWithNullable(); // ChildWithNullable | request body + try { + apiInstance.testNullable(childWithNullable); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testNullable"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + ## testQueryParameterCollectionFormat > testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) diff --git a/samples/client/petstore/java-helidon-client/se/docs/ParentWithNullable.md b/samples/client/petstore/java-helidon-client/se/docs/ParentWithNullable.md new file mode 100644 index 000000000000..b8fcf6b42e8f --- /dev/null +++ b/samples/client/petstore/java-helidon-client/se/docs/ParentWithNullable.md @@ -0,0 +1,22 @@ + + +# ParentWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**nullableProperty** | **String** | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| CHILDWITHNULLABLE | "ChildWithNullable" | + + + diff --git a/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/api/FakeApi.java index 5e5dec6bfb2c..d1c8dd114ec6 100644 --- a/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/api/FakeApi.java @@ -14,6 +14,7 @@ import org.openapitools.client.ApiResponse; import java.math.BigDecimal; +import org.openapitools.client.model.ChildWithNullable; import org.openapitools.client.model.Client; import org.openapitools.client.model.EnumClass; import org.openapitools.client.model.FakeBigDecimalMap200Response; @@ -144,6 +145,14 @@ public interface FakeApi { */ ApiResponse testJsonFormData(String param, String param2); + /** + * test nullable parent property + * + * @param childWithNullable request body (required) + * @return {@code ApiResponse} + */ + ApiResponse testNullable(ChildWithNullable childWithNullable); + ApiResponse testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language); } diff --git a/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/api/FakeApiImpl.java b/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/api/FakeApiImpl.java index 9a2849d61ae5..ae2bdc30f22e 100644 --- a/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/api/FakeApiImpl.java +++ b/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/api/FakeApiImpl.java @@ -30,6 +30,7 @@ import org.openapitools.client.ApiClient; import java.math.BigDecimal; +import org.openapitools.client.model.ChildWithNullable; import org.openapitools.client.model.Client; import org.openapitools.client.model.EnumClass; import org.openapitools.client.model.FakeBigDecimalMap200Response; @@ -75,6 +76,7 @@ public class FakeApiImpl implements FakeApi { protected static final GenericType RESPONSE_TYPE_testGroupParameters = ResponseType.create(Void.class); protected static final GenericType RESPONSE_TYPE_testInlineAdditionalProperties = ResponseType.create(Void.class); protected static final GenericType RESPONSE_TYPE_testJsonFormData = ResponseType.create(Void.class); + protected static final GenericType RESPONSE_TYPE_testNullable = ResponseType.create(Void.class); protected static final GenericType RESPONSE_TYPE_testQueryParameterCollectionFormat = ResponseType.create(Void.class); /** @@ -856,6 +858,44 @@ protected ApiResponse testJsonFormDataSubmit(WebClientRequestBuilder webCl return ApiResponse.create(RESPONSE_TYPE_testJsonFormData, webClientResponse); } + @Override + public ApiResponse testNullable(ChildWithNullable childWithNullable) { + Objects.requireNonNull(childWithNullable, "Required parameter 'childWithNullable' not specified"); + WebClientRequestBuilder webClientRequestBuilder = testNullableRequestBuilder(childWithNullable); + return testNullableSubmit(webClientRequestBuilder, childWithNullable); + } + + /** + * Creates a {@code WebClientRequestBuilder} for the testNullable operation. + * Optional customization point for subclasses. + * + * @param childWithNullable request body (required) + * @return WebClientRequestBuilder for testNullable + */ + protected WebClientRequestBuilder testNullableRequestBuilder(ChildWithNullable childWithNullable) { + WebClientRequestBuilder webClientRequestBuilder = apiClient.webClient() + .method("POST"); + + webClientRequestBuilder.path("/fake/nullable"); + webClientRequestBuilder.contentType(MediaType.APPLICATION_JSON); + webClientRequestBuilder.accept(MediaType.APPLICATION_JSON); + + return webClientRequestBuilder; + } + + /** + * Initiates the request for the testNullable operation. + * Optional customization point for subclasses. + * + * @param webClientRequestBuilder the request builder to use for submitting the request + * @param childWithNullable request body (required) + * @return {@code ApiResponse} for the submitted request + */ + protected ApiResponse testNullableSubmit(WebClientRequestBuilder webClientRequestBuilder, ChildWithNullable childWithNullable) { + Single webClientResponse = webClientRequestBuilder.submit(childWithNullable); + return ApiResponse.create(RESPONSE_TYPE_testNullable, webClientResponse); + } + @Override public ApiResponse testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) { Objects.requireNonNull(pipe, "Required parameter 'pipe' not specified"); diff --git a/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/model/ChildWithNullable.java b/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/model/ChildWithNullable.java new file mode 100644 index 000000000000..90b2f7ceb09b --- /dev/null +++ b/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/model/ChildWithNullable.java @@ -0,0 +1,78 @@ +/** + * OpenAPI Petstore + * 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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; + + + + +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + /** + * Get otherProperty + * @return otherProperty + **/ + public String getOtherProperty() { + return otherProperty; + } + + /** + * Set otherProperty + **/ + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + + /** + * Create a string representation of this pojo. + **/ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/model/ParentWithNullable.java new file mode 100644 index 000000000000..25c24ff86020 --- /dev/null +++ b/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -0,0 +1,123 @@ +/** + * OpenAPI Petstore + * 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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.NoSuchElementException; + + + + +public class ParentWithNullable { + +public enum TypeEnum { + + CHILDWITHNULLABLE(String.valueOf("ChildWithNullable")); + + String value; + + TypeEnum (String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + +} + + private TypeEnum type; + + private String nullableProperty; + + /** + * Get type + * @return type + **/ + public TypeEnum getType() { + return type; + } + + /** + * Set type + **/ + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + **/ + public String getNullableProperty() { + return nullableProperty; + } + + /** + * Set nullableProperty + **/ + public void setNullableProperty(String nullableProperty) { + this.nullableProperty = nullableProperty; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = nullableProperty; + return this; + } + + + /** + * Create a string representation of this pojo. + **/ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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/ChildWithNullableTest.java b/samples/client/petstore/java-helidon-client/se/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java new file mode 100644 index 000000000000..68acb8c52349 --- /dev/null +++ b/samples/client/petstore/java-helidon-client/se/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java @@ -0,0 +1,67 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * 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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; + +import org.junit.jupiter.api.Test; + +/** + * Model tests for ChildWithNullable + */ +public class ChildWithNullableTest { + private final ChildWithNullable model = new ChildWithNullable(); + + /** + * Model tests for ChildWithNullable + */ + @Test + public void testChildWithNullable() { + // TODO: test ChildWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + + /** + * Test the property 'otherProperty' + */ + @Test + public void otherPropertyTest() { + // TODO: test otherProperty + } + +} diff --git a/samples/client/petstore/java-helidon-client/se/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java b/samples/client/petstore/java-helidon-client/se/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java new file mode 100644 index 000000000000..a0fe79ed444b --- /dev/null +++ b/samples/client/petstore/java-helidon-client/se/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java @@ -0,0 +1,60 @@ +/** + * OpenAPI Petstore + * 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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.NoSuchElementException; + +import org.junit.jupiter.api.Test; + +/** + * Model tests for ParentWithNullable + */ +public class ParentWithNullableTest { + private final ParentWithNullable model = new ParentWithNullable(); + + /** + * Model tests for ParentWithNullable + */ + @Test + public void testParentWithNullable() { + // TODO: test ParentWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + +} diff --git a/samples/client/petstore/java/apache-httpclient/.openapi-generator/FILES b/samples/client/petstore/java/apache-httpclient/.openapi-generator/FILES index bf886d21ded6..c3b1e93a673c 100644 --- a/samples/client/petstore/java/apache-httpclient/.openapi-generator/FILES +++ b/samples/client/petstore/java/apache-httpclient/.openapi-generator/FILES @@ -15,6 +15,7 @@ docs/ArrayTest.md docs/Capitalization.md docs/Cat.md docs/Category.md +docs/ChildWithNullable.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md @@ -50,6 +51,7 @@ docs/OuterEnumDefaultValue.md docs/OuterEnumInteger.md docs/OuterEnumIntegerDefaultValue.md docs/OuterObjectWithEnumProperty.md +docs/ParentWithNullable.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md @@ -99,6 +101,7 @@ 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/Category.java +src/main/java/org/openapitools/client/model/ChildWithNullable.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 @@ -131,6 +134,7 @@ src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java src/main/java/org/openapitools/client/model/OuterEnumInteger.java src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java +src/main/java/org/openapitools/client/model/ParentWithNullable.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java src/main/java/org/openapitools/client/model/SingleRefType.java diff --git a/samples/client/petstore/java/apache-httpclient/README.md b/samples/client/petstore/java/apache-httpclient/README.md index 3a2c3df03fa0..400434d7e491 100644 --- a/samples/client/petstore/java/apache-httpclient/README.md +++ b/samples/client/petstore/java/apache-httpclient/README.md @@ -125,6 +125,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**testNullable**](docs/FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property *FakeApi* | [**testQueryParameterCollectionFormat**](docs/FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | *FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store @@ -161,6 +162,7 @@ Class | Method | HTTP request | Description - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - [Category](docs/Category.md) + - [ChildWithNullable](docs/ChildWithNullable.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [DeprecatedObject](docs/DeprecatedObject.md) @@ -193,6 +195,7 @@ Class | Method | HTTP request | Description - [OuterEnumInteger](docs/OuterEnumInteger.md) - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) + - [ParentWithNullable](docs/ParentWithNullable.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - [SingleRefType](docs/SingleRefType.md) diff --git a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml index 9f0affe779f0..288d48909023 100644 --- a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml +++ b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml @@ -1031,6 +1031,25 @@ paths: - fake x-content-type: application/json x-accepts: application/json + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1881,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/client/petstore/java/apache-httpclient/docs/ChildWithNullable.md b/samples/client/petstore/java/apache-httpclient/docs/ChildWithNullable.md new file mode 100644 index 000000000000..73c0dd6d4737 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/docs/ChildWithNullable.md @@ -0,0 +1,13 @@ + + +# ChildWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**otherProperty** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md index 6eb12aee3577..df8b14be8e29 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md @@ -21,6 +21,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | | [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testNullable**](FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property | | [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -1199,6 +1200,71 @@ No authorization required | **200** | successful operation | - | +## testNullable + +> testNullable(childWithNullable) + +test nullable parent property + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + ChildWithNullable childWithNullable = new ChildWithNullable(); // ChildWithNullable | request body + try { + apiInstance.testNullable(childWithNullable); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testNullable"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + ## testQueryParameterCollectionFormat > testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) diff --git a/samples/client/petstore/java/apache-httpclient/docs/ParentWithNullable.md b/samples/client/petstore/java/apache-httpclient/docs/ParentWithNullable.md new file mode 100644 index 000000000000..b8fcf6b42e8f --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/docs/ParentWithNullable.md @@ -0,0 +1,22 @@ + + +# ParentWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**nullableProperty** | **String** | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| CHILDWITHNULLABLE | "ChildWithNullable" | + + + diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeApi.java index 99b71e9b542f..c649052dd866 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeApi.java @@ -20,6 +20,7 @@ import org.openapitools.client.Pair; import java.math.BigDecimal; +import org.openapitools.client.model.ChildWithNullable; import org.openapitools.client.model.Client; import org.openapitools.client.model.EnumClass; import org.openapitools.client.model.FakeBigDecimalMap200Response; @@ -1407,6 +1408,77 @@ public void testJsonFormData(String param, String param2, Map ad ); } + /** + * test nullable parent property + * + * @param childWithNullable request body (required) + * @throws ApiException if fails to make API call + */ + public void testNullable(ChildWithNullable childWithNullable) throws ApiException { + this.testNullable(childWithNullable, Collections.emptyMap()); + } + + + /** + * test nullable parent property + * + * @param childWithNullable request body (required) + * @param additionalHeaders additionalHeaders for this call + * @throws ApiException if fails to make API call + */ + public void testNullable(ChildWithNullable childWithNullable, Map additionalHeaders) throws ApiException { + Object localVarPostBody = childWithNullable; + + // verify the required parameter 'childWithNullable' is set + if (childWithNullable == null) { + throw new ApiException(400, "Missing the required parameter 'childWithNullable' when calling testNullable"); + } + + // create path and map variables + String localVarPath = "/fake/nullable"; + + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + localVarHeaderParams.putAll(additionalHeaders); + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + apiClient.invokeAPI( + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + null + ); + } + /** * * To test the collection format in query parameters diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ChildWithNullable.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ChildWithNullable.java new file mode 100644 index 000000000000..6c714ccc5809 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ChildWithNullable.java @@ -0,0 +1,208 @@ +/* + * OpenAPI Petstore + * 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.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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.StringJoiner; + +/** + * ChildWithNullable + */ +@JsonPropertyOrder({ + ChildWithNullable.JSON_PROPERTY_OTHER_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class ChildWithNullable extends ParentWithNullable { + public static final String JSON_PROPERTY_OTHER_PROPERTY = "otherProperty"; + private String otherProperty; + + public ChildWithNullable() { + + } + + public ChildWithNullable otherProperty(String otherProperty) { + + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOtherProperty() { + return otherProperty; + } + + + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + @Override + public ChildWithNullable type(TypeEnum type) { + this.setType(type); + return this; + } + + @Override + public ChildWithNullable nullableProperty(String nullableProperty) { + this.setNullableProperty(nullableProperty); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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 `type` to the URL query string + if (getType() != null) { + try { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + + // add `nullableProperty` to the URL query string + if (getNullableProperty() != null) { + try { + joiner.add(String.format("%snullableProperty%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNullableProperty()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + + // add `otherProperty` to the URL query string + if (getOtherProperty() != null) { + try { + joiner.add(String.format("%sotherProperty%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getOtherProperty()), "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/ParentWithNullable.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java new file mode 100644 index 000000000000..ff90d3aa9e26 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -0,0 +1,261 @@ +/* + * OpenAPI Petstore + * 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.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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.StringJoiner; + +/** + * ParentWithNullable + */ +@JsonPropertyOrder({ + ParentWithNullable.JSON_PROPERTY_TYPE, + ParentWithNullable.JSON_PROPERTY_NULLABLE_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable"), +}) + +public class ParentWithNullable { + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + protected TypeEnum type; + + public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable() { + } + + public ParentWithNullable type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getNullableProperty() { + return nullableProperty.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNullableProperty_JsonNullable() { + return nullableProperty; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + public void setNullableProperty_JsonNullable(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + public void setNullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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 `type` to the URL query string + if (getType() != null) { + try { + joiner.add(String.format("%stype%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getType()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + + // add `nullableProperty` to the URL query string + if (getNullableProperty() != null) { + try { + joiner.add(String.format("%snullableProperty%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getNullableProperty()), "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/ChildWithNullableTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java new file mode 100644 index 000000000000..2616181bec30 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java @@ -0,0 +1,68 @@ +/* + * OpenAPI Petstore + * 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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ChildWithNullable + */ +public class ChildWithNullableTest { + private final ChildWithNullable model = new ChildWithNullable(); + + /** + * Model tests for ChildWithNullable + */ + @Test + public void testChildWithNullable() { + // TODO: test ChildWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + + /** + * Test the property 'otherProperty' + */ + @Test + public void otherPropertyTest() { + // TODO: test otherProperty + } + +} diff --git a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java new file mode 100644 index 000000000000..bdd46008b13d --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * 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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ParentWithNullable + */ +public class ParentWithNullableTest { + private final ParentWithNullable model = new ParentWithNullable(); + + /** + * Model tests for ParentWithNullable + */ + @Test + public void testParentWithNullable() { + // TODO: test ParentWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + +} diff --git a/samples/client/petstore/java/feign/.openapi-generator/FILES b/samples/client/petstore/java/feign/.openapi-generator/FILES index fae67fe89c06..995a090dcb2f 100644 --- a/samples/client/petstore/java/feign/.openapi-generator/FILES +++ b/samples/client/petstore/java/feign/.openapi-generator/FILES @@ -48,6 +48,7 @@ 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/Category.java +src/main/java/org/openapitools/client/model/ChildWithNullable.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 @@ -80,6 +81,7 @@ src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java src/main/java/org/openapitools/client/model/OuterEnumInteger.java src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java +src/main/java/org/openapitools/client/model/ParentWithNullable.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java src/main/java/org/openapitools/client/model/SingleRefType.java diff --git a/samples/client/petstore/java/feign/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml index 9f0affe779f0..288d48909023 100644 --- a/samples/client/petstore/java/feign/api/openapi.yaml +++ b/samples/client/petstore/java/feign/api/openapi.yaml @@ -1031,6 +1031,25 @@ paths: - fake x-content-type: application/json x-accepts: application/json + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1881,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java index de441d239dac..56dec984095d 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java @@ -5,6 +5,7 @@ import org.openapitools.client.model.ApiResponse; import java.math.BigDecimal; +import org.openapitools.client.model.ChildWithNullable; import org.openapitools.client.model.Client; import org.openapitools.client.model.EnumClass; import org.openapitools.client.model.FakeBigDecimalMap200Response; @@ -839,6 +840,33 @@ public TestGroupParametersQueryParams int64Group(final Long value) { + /** + * test nullable parent property + * + * @param childWithNullable request body (required) + */ + @RequestLine("POST /fake/nullable") + @Headers({ + "Content-Type: application/json", + "Accept: application/json", + }) + void testNullable(ChildWithNullable childWithNullable); + + /** + * test nullable parent property + * Similar to testNullable but it also returns the http response headers . + * + * @param childWithNullable request body (required) + */ + @RequestLine("POST /fake/nullable") + @Headers({ + "Content-Type: application/json", + "Accept: application/json", + }) + ApiResponse testNullableWithHttpInfo(ChildWithNullable childWithNullable); + + + /** * * To test the collection format in query parameters diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ChildWithNullable.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ChildWithNullable.java new file mode 100644 index 000000000000..7d8fa698f333 --- /dev/null +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ChildWithNullable.java @@ -0,0 +1,129 @@ +/* + * OpenAPI Petstore + * 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.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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ChildWithNullable + */ +@JsonPropertyOrder({ + ChildWithNullable.JSON_PROPERTY_OTHER_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class ChildWithNullable extends ParentWithNullable { + public static final String JSON_PROPERTY_OTHER_PROPERTY = "otherProperty"; + private String otherProperty; + + public ChildWithNullable() { + + } + + public ChildWithNullable otherProperty(String otherProperty) { + + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOtherProperty() { + return otherProperty; + } + + + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ParentWithNullable.java new file mode 100644 index 000000000000..defe2fe2dd2c --- /dev/null +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -0,0 +1,204 @@ +/* + * OpenAPI Petstore + * 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.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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ParentWithNullable + */ +@JsonPropertyOrder({ + ParentWithNullable.JSON_PROPERTY_TYPE, + ParentWithNullable.JSON_PROPERTY_NULLABLE_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable"), +}) + +public class ParentWithNullable { + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + protected TypeEnum type; + + public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable() { + } + + public ParentWithNullable type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getNullableProperty() { + return nullableProperty.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNullableProperty_JsonNullable() { + return nullableProperty; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + public void setNullableProperty_JsonNullable(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + public void setNullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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/ChildWithNullableTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java new file mode 100644 index 000000000000..746a2c9f9b4b --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java @@ -0,0 +1,66 @@ +/* + * OpenAPI Petstore + * 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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ChildWithNullable + */ +class ChildWithNullableTest { + private final ChildWithNullable model = new ChildWithNullable(); + + /** + * Model tests for ChildWithNullable + */ + @Test + void testChildWithNullable() { + // TODO: test ChildWithNullable + } + + /** + * Test the property 'type' + */ + @Test + void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + void nullablePropertyTest() { + // TODO: test nullableProperty + } + + /** + * Test the property 'otherProperty' + */ + @Test + void otherPropertyTest() { + // TODO: test otherProperty + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java new file mode 100644 index 000000000000..7a1f1c9d3fc2 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java @@ -0,0 +1,60 @@ +/* + * OpenAPI Petstore + * 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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ParentWithNullable + */ +class ParentWithNullableTest { + private final ParentWithNullable model = new ParentWithNullable(); + + /** + * Model tests for ParentWithNullable + */ + @Test + void testParentWithNullable() { + // TODO: test ParentWithNullable + } + + /** + * Test the property 'type' + */ + @Test + void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + void nullablePropertyTest() { + // TODO: test nullableProperty + } + +} diff --git a/samples/client/petstore/java/resteasy/.openapi-generator/FILES b/samples/client/petstore/java/resteasy/.openapi-generator/FILES index 2044e4024911..5268fd94f532 100644 --- a/samples/client/petstore/java/resteasy/.openapi-generator/FILES +++ b/samples/client/petstore/java/resteasy/.openapi-generator/FILES @@ -15,6 +15,7 @@ docs/ArrayTest.md docs/Capitalization.md docs/Cat.md docs/Category.md +docs/ChildWithNullable.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md @@ -50,6 +51,7 @@ docs/OuterEnumDefaultValue.md docs/OuterEnumInteger.md docs/OuterEnumIntegerDefaultValue.md docs/OuterObjectWithEnumProperty.md +docs/ParentWithNullable.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md @@ -100,6 +102,7 @@ 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/Category.java +src/main/java/org/openapitools/client/model/ChildWithNullable.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 @@ -132,6 +135,7 @@ src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java src/main/java/org/openapitools/client/model/OuterEnumInteger.java src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java +src/main/java/org/openapitools/client/model/ParentWithNullable.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java src/main/java/org/openapitools/client/model/SingleRefType.java diff --git a/samples/client/petstore/java/resteasy/README.md b/samples/client/petstore/java/resteasy/README.md index 084a6ea31a31..45e1a1c959bf 100644 --- a/samples/client/petstore/java/resteasy/README.md +++ b/samples/client/petstore/java/resteasy/README.md @@ -132,6 +132,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**testNullable**](docs/FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property *FakeApi* | [**testQueryParameterCollectionFormat**](docs/FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | *FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store @@ -168,6 +169,7 @@ Class | Method | HTTP request | Description - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - [Category](docs/Category.md) + - [ChildWithNullable](docs/ChildWithNullable.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [DeprecatedObject](docs/DeprecatedObject.md) @@ -200,6 +202,7 @@ Class | Method | HTTP request | Description - [OuterEnumInteger](docs/OuterEnumInteger.md) - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) + - [ParentWithNullable](docs/ParentWithNullable.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - [SingleRefType](docs/SingleRefType.md) diff --git a/samples/client/petstore/java/resteasy/api/openapi.yaml b/samples/client/petstore/java/resteasy/api/openapi.yaml index 9f0affe779f0..288d48909023 100644 --- a/samples/client/petstore/java/resteasy/api/openapi.yaml +++ b/samples/client/petstore/java/resteasy/api/openapi.yaml @@ -1031,6 +1031,25 @@ paths: - fake x-content-type: application/json x-accepts: application/json + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1881,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/client/petstore/java/resteasy/docs/ChildWithNullable.md b/samples/client/petstore/java/resteasy/docs/ChildWithNullable.md new file mode 100644 index 000000000000..73c0dd6d4737 --- /dev/null +++ b/samples/client/petstore/java/resteasy/docs/ChildWithNullable.md @@ -0,0 +1,13 @@ + + +# ChildWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**otherProperty** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/resteasy/docs/FakeApi.md b/samples/client/petstore/java/resteasy/docs/FakeApi.md index 6eb12aee3577..df8b14be8e29 100644 --- a/samples/client/petstore/java/resteasy/docs/FakeApi.md +++ b/samples/client/petstore/java/resteasy/docs/FakeApi.md @@ -21,6 +21,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | | [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testNullable**](FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property | | [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -1199,6 +1200,71 @@ No authorization required | **200** | successful operation | - | +## testNullable + +> testNullable(childWithNullable) + +test nullable parent property + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + ChildWithNullable childWithNullable = new ChildWithNullable(); // ChildWithNullable | request body + try { + apiInstance.testNullable(childWithNullable); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testNullable"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + ## testQueryParameterCollectionFormat > testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) diff --git a/samples/client/petstore/java/resteasy/docs/ParentWithNullable.md b/samples/client/petstore/java/resteasy/docs/ParentWithNullable.md new file mode 100644 index 000000000000..b8fcf6b42e8f --- /dev/null +++ b/samples/client/petstore/java/resteasy/docs/ParentWithNullable.md @@ -0,0 +1,22 @@ + + +# ParentWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**nullableProperty** | **String** | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| CHILDWITHNULLABLE | "ChildWithNullable" | + + + diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java index 73d27c887caf..c9bee15e56f1 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java @@ -8,6 +8,7 @@ import javax.ws.rs.core.GenericType; import java.math.BigDecimal; +import org.openapitools.client.model.ChildWithNullable; import org.openapitools.client.model.Client; import org.openapitools.client.model.EnumClass; import org.openapitools.client.model.FakeBigDecimalMap200Response; @@ -853,6 +854,48 @@ public void testJsonFormData(String param, String param2) throws ApiException { apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } + /** + * test nullable parent property + * + * @param childWithNullable request body (required) + * @throws ApiException if fails to make API call + */ + public void testNullable(ChildWithNullable childWithNullable) throws ApiException { + Object localVarPostBody = childWithNullable; + + // verify the required parameter 'childWithNullable' is set + if (childWithNullable == null) { + throw new ApiException(400, "Missing the required parameter 'childWithNullable' when calling testNullable"); + } + + // create path and map variables + String localVarPath = "/fake/nullable".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); + } /** * * To test the collection format in query parameters diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ChildWithNullable.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ChildWithNullable.java new file mode 100644 index 000000000000..808a97496f36 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ChildWithNullable.java @@ -0,0 +1,140 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * 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.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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ChildWithNullable + */ +@JsonPropertyOrder({ + ChildWithNullable.JSON_PROPERTY_OTHER_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class ChildWithNullable extends ParentWithNullable { + public static final String JSON_PROPERTY_OTHER_PROPERTY = "otherProperty"; + private String otherProperty; + + public ChildWithNullable() { + + } + + public ChildWithNullable otherProperty(String otherProperty) { + + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOtherProperty() { + return otherProperty; + } + + + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + @Override + public ChildWithNullable type(TypeEnum type) { + this.setType(type); + return this; + } + + @Override + public ChildWithNullable nullableProperty(String nullableProperty) { + this.setNullableProperty(nullableProperty); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ParentWithNullable.java new file mode 100644 index 000000000000..b8ad35eda765 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -0,0 +1,203 @@ +/* + * OpenAPI Petstore + * 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.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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ParentWithNullable + */ +@JsonPropertyOrder({ + ParentWithNullable.JSON_PROPERTY_TYPE, + ParentWithNullable.JSON_PROPERTY_NULLABLE_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable"), +}) + +public class ParentWithNullable { + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + protected TypeEnum type; + + public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable() { + } + + public ParentWithNullable type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getNullableProperty() { + return nullableProperty.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNullableProperty_JsonNullable() { + return nullableProperty; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + public void setNullableProperty_JsonNullable(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + public void setNullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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/ChildWithNullableTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java new file mode 100644 index 000000000000..2616181bec30 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java @@ -0,0 +1,68 @@ +/* + * OpenAPI Petstore + * 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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ChildWithNullable + */ +public class ChildWithNullableTest { + private final ChildWithNullable model = new ChildWithNullable(); + + /** + * Model tests for ChildWithNullable + */ + @Test + public void testChildWithNullable() { + // TODO: test ChildWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + + /** + * Test the property 'otherProperty' + */ + @Test + public void otherPropertyTest() { + // TODO: test otherProperty + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java new file mode 100644 index 000000000000..bdd46008b13d --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * 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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ParentWithNullable + */ +public class ParentWithNullableTest { + private final ParentWithNullable model = new ParentWithNullable(); + + /** + * Model tests for ParentWithNullable + */ + @Test + public void testParentWithNullable() { + // TODO: test ParentWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/FILES b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/FILES index 76a53947ccf2..66e0488958e7 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/FILES +++ b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/FILES @@ -15,6 +15,7 @@ docs/ArrayTest.md docs/Capitalization.md docs/Cat.md docs/Category.md +docs/ChildWithNullable.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md @@ -50,6 +51,7 @@ docs/OuterEnumDefaultValue.md docs/OuterEnumInteger.md docs/OuterEnumIntegerDefaultValue.md docs/OuterObjectWithEnumProperty.md +docs/ParentWithNullable.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md @@ -95,6 +97,7 @@ 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/Category.java +src/main/java/org/openapitools/client/model/ChildWithNullable.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 @@ -127,6 +130,7 @@ src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java src/main/java/org/openapitools/client/model/OuterEnumInteger.java src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java +src/main/java/org/openapitools/client/model/ParentWithNullable.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java src/main/java/org/openapitools/client/model/SingleRefType.java diff --git a/samples/client/petstore/java/resttemplate-withXml/README.md b/samples/client/petstore/java/resttemplate-withXml/README.md index d450bd82c64f..dc708dba258f 100644 --- a/samples/client/petstore/java/resttemplate-withXml/README.md +++ b/samples/client/petstore/java/resttemplate-withXml/README.md @@ -132,6 +132,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**testNullable**](docs/FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property *FakeApi* | [**testQueryParameterCollectionFormat**](docs/FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | *FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store @@ -168,6 +169,7 @@ Class | Method | HTTP request | Description - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - [Category](docs/Category.md) + - [ChildWithNullable](docs/ChildWithNullable.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [DeprecatedObject](docs/DeprecatedObject.md) @@ -200,6 +202,7 @@ Class | Method | HTTP request | Description - [OuterEnumInteger](docs/OuterEnumInteger.md) - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) + - [ParentWithNullable](docs/ParentWithNullable.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - [SingleRefType](docs/SingleRefType.md) diff --git a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml index 9f0affe779f0..288d48909023 100644 --- a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml @@ -1031,6 +1031,25 @@ paths: - fake x-content-type: application/json x-accepts: application/json + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1881,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/ChildWithNullable.md b/samples/client/petstore/java/resttemplate-withXml/docs/ChildWithNullable.md new file mode 100644 index 000000000000..73c0dd6d4737 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/docs/ChildWithNullable.md @@ -0,0 +1,13 @@ + + +# ChildWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**otherProperty** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md index 6eb12aee3577..df8b14be8e29 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md @@ -21,6 +21,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | | [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testNullable**](FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property | | [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -1199,6 +1200,71 @@ No authorization required | **200** | successful operation | - | +## testNullable + +> testNullable(childWithNullable) + +test nullable parent property + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + ChildWithNullable childWithNullable = new ChildWithNullable(); // ChildWithNullable | request body + try { + apiInstance.testNullable(childWithNullable); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testNullable"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + ## testQueryParameterCollectionFormat > testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/ParentWithNullable.md b/samples/client/petstore/java/resttemplate-withXml/docs/ParentWithNullable.md new file mode 100644 index 000000000000..b8fcf6b42e8f --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/docs/ParentWithNullable.md @@ -0,0 +1,22 @@ + + +# ParentWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**nullableProperty** | **String** | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| CHILDWITHNULLABLE | "ChildWithNullable" | + + + diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java index ea18b45cd975..0ed0c08ed192 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java @@ -3,6 +3,7 @@ import org.openapitools.client.ApiClient; import java.math.BigDecimal; +import org.openapitools.client.model.ChildWithNullable; import org.openapitools.client.model.Client; import org.openapitools.client.model.EnumClass; import org.openapitools.client.model.FakeBigDecimalMap200Response; @@ -971,6 +972,51 @@ public ResponseEntity testJsonFormDataWithHttpInfo(String param, String pa ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/fake/jsonFormData", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); } + /** + * test nullable parent property + * + *

200 - successful operation + * @param childWithNullable request body (required) + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public void testNullable(ChildWithNullable childWithNullable) throws RestClientException { + testNullableWithHttpInfo(childWithNullable); + } + + /** + * test nullable parent property + * + *

200 - successful operation + * @param childWithNullable request body (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testNullableWithHttpInfo(ChildWithNullable childWithNullable) throws RestClientException { + Object localVarPostBody = childWithNullable; + + // verify the required parameter 'childWithNullable' is set + if (childWithNullable == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'childWithNullable' when calling testNullable"); + } + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/fake/nullable", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } /** * * To test the collection format in query parameters diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ChildWithNullable.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ChildWithNullable.java new file mode 100644 index 000000000000..dba8d12b8e98 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ChildWithNullable.java @@ -0,0 +1,150 @@ +/* + * OpenAPI Petstore + * 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.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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +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.*; + +/** + * ChildWithNullable + */ +@JsonPropertyOrder({ + ChildWithNullable.JSON_PROPERTY_OTHER_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +@XmlRootElement(name = "ChildWithNullable") +@XmlAccessorType(XmlAccessType.FIELD) +@JacksonXmlRootElement(localName = "ChildWithNullable") +public class ChildWithNullable extends ParentWithNullable { + public static final String JSON_PROPERTY_OTHER_PROPERTY = "otherProperty"; + @XmlElement(name = "otherProperty") + private String otherProperty; + + public ChildWithNullable() { + + } + + public ChildWithNullable otherProperty(String otherProperty) { + + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "otherProperty") + + public String getOtherProperty() { + return otherProperty; + } + + + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "otherProperty") + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + @Override + public ChildWithNullable type(TypeEnum type) { + this.setType(type); + return this; + } + + @Override + public ChildWithNullable nullableProperty(String nullableProperty) { + this.setNullableProperty(nullableProperty); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ParentWithNullable.java new file mode 100644 index 000000000000..1fef3b6f4404 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -0,0 +1,218 @@ +/* + * OpenAPI Petstore + * 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.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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +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.*; + +/** + * ParentWithNullable + */ +@JsonPropertyOrder({ + ParentWithNullable.JSON_PROPERTY_TYPE, + ParentWithNullable.JSON_PROPERTY_NULLABLE_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable"), +}) + +@XmlRootElement(name = "ParentWithNullable") +@XmlAccessorType(XmlAccessType.FIELD) +@JacksonXmlRootElement(localName = "ParentWithNullable") +public class ParentWithNullable { + /** + * Gets or Sets type + */ + @XmlType(name="TypeEnum") + @XmlEnum(String.class) + public enum TypeEnum { + @XmlEnumValue("ChildWithNullable") + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @XmlElement(name = "type") + protected TypeEnum type; + + public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; + @XmlElement(name = "nullableProperty") + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable() { + } + + public ParentWithNullable type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "type") + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "type") + public void setType(TypeEnum type) { + this.type = type; + } + + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getNullableProperty() { + return nullableProperty.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JacksonXmlProperty(localName = "nullableProperty") + + public JsonNullable getNullableProperty_JsonNullable() { + return nullableProperty; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + public void setNullableProperty_JsonNullable(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + public void setNullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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/ChildWithNullableTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java new file mode 100644 index 000000000000..2616181bec30 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java @@ -0,0 +1,68 @@ +/* + * OpenAPI Petstore + * 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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ChildWithNullable + */ +public class ChildWithNullableTest { + private final ChildWithNullable model = new ChildWithNullable(); + + /** + * Model tests for ChildWithNullable + */ + @Test + public void testChildWithNullable() { + // TODO: test ChildWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + + /** + * Test the property 'otherProperty' + */ + @Test + public void otherPropertyTest() { + // TODO: test otherProperty + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java new file mode 100644 index 000000000000..bdd46008b13d --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * 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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ParentWithNullable + */ +public class ParentWithNullableTest { + private final ParentWithNullable model = new ParentWithNullable(); + + /** + * Model tests for ParentWithNullable + */ + @Test + public void testParentWithNullable() { + // TODO: test ParentWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + +} diff --git a/samples/client/petstore/java/resttemplate/.openapi-generator/FILES b/samples/client/petstore/java/resttemplate/.openapi-generator/FILES index 76a53947ccf2..66e0488958e7 100644 --- a/samples/client/petstore/java/resttemplate/.openapi-generator/FILES +++ b/samples/client/petstore/java/resttemplate/.openapi-generator/FILES @@ -15,6 +15,7 @@ docs/ArrayTest.md docs/Capitalization.md docs/Cat.md docs/Category.md +docs/ChildWithNullable.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md @@ -50,6 +51,7 @@ docs/OuterEnumDefaultValue.md docs/OuterEnumInteger.md docs/OuterEnumIntegerDefaultValue.md docs/OuterObjectWithEnumProperty.md +docs/ParentWithNullable.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md @@ -95,6 +97,7 @@ 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/Category.java +src/main/java/org/openapitools/client/model/ChildWithNullable.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 @@ -127,6 +130,7 @@ src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java src/main/java/org/openapitools/client/model/OuterEnumInteger.java src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java +src/main/java/org/openapitools/client/model/ParentWithNullable.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java src/main/java/org/openapitools/client/model/SingleRefType.java diff --git a/samples/client/petstore/java/resttemplate/README.md b/samples/client/petstore/java/resttemplate/README.md index bfd879857cf0..c2f1a0109a69 100644 --- a/samples/client/petstore/java/resttemplate/README.md +++ b/samples/client/petstore/java/resttemplate/README.md @@ -132,6 +132,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**testNullable**](docs/FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property *FakeApi* | [**testQueryParameterCollectionFormat**](docs/FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | *FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store @@ -168,6 +169,7 @@ Class | Method | HTTP request | Description - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - [Category](docs/Category.md) + - [ChildWithNullable](docs/ChildWithNullable.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [DeprecatedObject](docs/DeprecatedObject.md) @@ -200,6 +202,7 @@ Class | Method | HTTP request | Description - [OuterEnumInteger](docs/OuterEnumInteger.md) - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) + - [ParentWithNullable](docs/ParentWithNullable.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - [SingleRefType](docs/SingleRefType.md) diff --git a/samples/client/petstore/java/resttemplate/api/openapi.yaml b/samples/client/petstore/java/resttemplate/api/openapi.yaml index 9f0affe779f0..288d48909023 100644 --- a/samples/client/petstore/java/resttemplate/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate/api/openapi.yaml @@ -1031,6 +1031,25 @@ paths: - fake x-content-type: application/json x-accepts: application/json + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1881,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/client/petstore/java/resttemplate/docs/ChildWithNullable.md b/samples/client/petstore/java/resttemplate/docs/ChildWithNullable.md new file mode 100644 index 000000000000..73c0dd6d4737 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/docs/ChildWithNullable.md @@ -0,0 +1,13 @@ + + +# ChildWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**otherProperty** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/resttemplate/docs/FakeApi.md b/samples/client/petstore/java/resttemplate/docs/FakeApi.md index 6eb12aee3577..df8b14be8e29 100644 --- a/samples/client/petstore/java/resttemplate/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate/docs/FakeApi.md @@ -21,6 +21,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | | [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testNullable**](FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property | | [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -1199,6 +1200,71 @@ No authorization required | **200** | successful operation | - | +## testNullable + +> testNullable(childWithNullable) + +test nullable parent property + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + ChildWithNullable childWithNullable = new ChildWithNullable(); // ChildWithNullable | request body + try { + apiInstance.testNullable(childWithNullable); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testNullable"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + ## testQueryParameterCollectionFormat > testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) diff --git a/samples/client/petstore/java/resttemplate/docs/ParentWithNullable.md b/samples/client/petstore/java/resttemplate/docs/ParentWithNullable.md new file mode 100644 index 000000000000..b8fcf6b42e8f --- /dev/null +++ b/samples/client/petstore/java/resttemplate/docs/ParentWithNullable.md @@ -0,0 +1,22 @@ + + +# ParentWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**nullableProperty** | **String** | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| CHILDWITHNULLABLE | "ChildWithNullable" | + + + diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java index ea18b45cd975..0ed0c08ed192 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java @@ -3,6 +3,7 @@ import org.openapitools.client.ApiClient; import java.math.BigDecimal; +import org.openapitools.client.model.ChildWithNullable; import org.openapitools.client.model.Client; import org.openapitools.client.model.EnumClass; import org.openapitools.client.model.FakeBigDecimalMap200Response; @@ -971,6 +972,51 @@ public ResponseEntity testJsonFormDataWithHttpInfo(String param, String pa ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/fake/jsonFormData", HttpMethod.GET, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); } + /** + * test nullable parent property + * + *

200 - successful operation + * @param childWithNullable request body (required) + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public void testNullable(ChildWithNullable childWithNullable) throws RestClientException { + testNullableWithHttpInfo(childWithNullable); + } + + /** + * test nullable parent property + * + *

200 - successful operation + * @param childWithNullable request body (required) + * @return ResponseEntity<Void> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testNullableWithHttpInfo(ChildWithNullable childWithNullable) throws RestClientException { + Object localVarPostBody = childWithNullable; + + // verify the required parameter 'childWithNullable' is set + if (childWithNullable == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'childWithNullable' when calling testNullable"); + } + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/fake/nullable", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } /** * * To test the collection format in query parameters diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ChildWithNullable.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ChildWithNullable.java new file mode 100644 index 000000000000..808a97496f36 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ChildWithNullable.java @@ -0,0 +1,140 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * 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.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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ChildWithNullable + */ +@JsonPropertyOrder({ + ChildWithNullable.JSON_PROPERTY_OTHER_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class ChildWithNullable extends ParentWithNullable { + public static final String JSON_PROPERTY_OTHER_PROPERTY = "otherProperty"; + private String otherProperty; + + public ChildWithNullable() { + + } + + public ChildWithNullable otherProperty(String otherProperty) { + + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOtherProperty() { + return otherProperty; + } + + + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + @Override + public ChildWithNullable type(TypeEnum type) { + this.setType(type); + return this; + } + + @Override + public ChildWithNullable nullableProperty(String nullableProperty) { + this.setNullableProperty(nullableProperty); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java new file mode 100644 index 000000000000..b8ad35eda765 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -0,0 +1,203 @@ +/* + * OpenAPI Petstore + * 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.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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ParentWithNullable + */ +@JsonPropertyOrder({ + ParentWithNullable.JSON_PROPERTY_TYPE, + ParentWithNullable.JSON_PROPERTY_NULLABLE_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable"), +}) + +public class ParentWithNullable { + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + protected TypeEnum type; + + public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable() { + } + + public ParentWithNullable type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getNullableProperty() { + return nullableProperty.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNullableProperty_JsonNullable() { + return nullableProperty; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + public void setNullableProperty_JsonNullable(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + public void setNullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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/ChildWithNullableTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java new file mode 100644 index 000000000000..2616181bec30 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java @@ -0,0 +1,68 @@ +/* + * OpenAPI Petstore + * 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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ChildWithNullable + */ +public class ChildWithNullableTest { + private final ChildWithNullable model = new ChildWithNullable(); + + /** + * Model tests for ChildWithNullable + */ + @Test + public void testChildWithNullable() { + // TODO: test ChildWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + + /** + * Test the property 'otherProperty' + */ + @Test + public void otherPropertyTest() { + // TODO: test otherProperty + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java new file mode 100644 index 000000000000..bdd46008b13d --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * 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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ParentWithNullable + */ +public class ParentWithNullableTest { + private final ParentWithNullable model = new ParentWithNullable(); + + /** + * Model tests for ParentWithNullable + */ + @Test + public void testParentWithNullable() { + // TODO: test ParentWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + +} diff --git a/samples/client/petstore/java/vertx/.openapi-generator/FILES b/samples/client/petstore/java/vertx/.openapi-generator/FILES index d7d207ca6c3d..78449bae3e43 100644 --- a/samples/client/petstore/java/vertx/.openapi-generator/FILES +++ b/samples/client/petstore/java/vertx/.openapi-generator/FILES @@ -15,6 +15,7 @@ docs/ArrayTest.md docs/Capitalization.md docs/Cat.md docs/Category.md +docs/ChildWithNullable.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md @@ -50,6 +51,7 @@ docs/OuterEnumDefaultValue.md docs/OuterEnumInteger.md docs/OuterEnumIntegerDefaultValue.md docs/OuterObjectWithEnumProperty.md +docs/ParentWithNullable.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md @@ -113,6 +115,7 @@ 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/Category.java +src/main/java/org/openapitools/client/model/ChildWithNullable.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 @@ -145,6 +148,7 @@ src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java src/main/java/org/openapitools/client/model/OuterEnumInteger.java src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java +src/main/java/org/openapitools/client/model/ParentWithNullable.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java src/main/java/org/openapitools/client/model/SingleRefType.java diff --git a/samples/client/petstore/java/vertx/README.md b/samples/client/petstore/java/vertx/README.md index 883a558aa74e..bc346e08dd23 100644 --- a/samples/client/petstore/java/vertx/README.md +++ b/samples/client/petstore/java/vertx/README.md @@ -132,6 +132,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**testNullable**](docs/FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property *FakeApi* | [**testQueryParameterCollectionFormat**](docs/FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | *FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store @@ -168,6 +169,7 @@ Class | Method | HTTP request | Description - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - [Category](docs/Category.md) + - [ChildWithNullable](docs/ChildWithNullable.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [DeprecatedObject](docs/DeprecatedObject.md) @@ -200,6 +202,7 @@ Class | Method | HTTP request | Description - [OuterEnumInteger](docs/OuterEnumInteger.md) - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) + - [ParentWithNullable](docs/ParentWithNullable.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - [SingleRefType](docs/SingleRefType.md) diff --git a/samples/client/petstore/java/vertx/api/openapi.yaml b/samples/client/petstore/java/vertx/api/openapi.yaml index 9f0affe779f0..288d48909023 100644 --- a/samples/client/petstore/java/vertx/api/openapi.yaml +++ b/samples/client/petstore/java/vertx/api/openapi.yaml @@ -1031,6 +1031,25 @@ paths: - fake x-content-type: application/json x-accepts: application/json + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1881,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/client/petstore/java/vertx/docs/ChildWithNullable.md b/samples/client/petstore/java/vertx/docs/ChildWithNullable.md new file mode 100644 index 000000000000..73c0dd6d4737 --- /dev/null +++ b/samples/client/petstore/java/vertx/docs/ChildWithNullable.md @@ -0,0 +1,13 @@ + + +# ChildWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**otherProperty** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/vertx/docs/FakeApi.md b/samples/client/petstore/java/vertx/docs/FakeApi.md index a0fb70ef8d4b..d17031d2ac17 100644 --- a/samples/client/petstore/java/vertx/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx/docs/FakeApi.md @@ -21,6 +21,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | | [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testNullable**](FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property | | [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -1199,6 +1200,71 @@ No authorization required | **200** | successful operation | - | +## testNullable + +> testNullable(childWithNullable) + +test nullable parent property + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + ChildWithNullable childWithNullable = new ChildWithNullable(); // ChildWithNullable | request body + try { + apiInstance.testNullable(childWithNullable); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testNullable"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + ## testQueryParameterCollectionFormat > testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) diff --git a/samples/client/petstore/java/vertx/docs/ParentWithNullable.md b/samples/client/petstore/java/vertx/docs/ParentWithNullable.md new file mode 100644 index 000000000000..b8fcf6b42e8f --- /dev/null +++ b/samples/client/petstore/java/vertx/docs/ParentWithNullable.md @@ -0,0 +1,22 @@ + + +# ParentWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**nullableProperty** | **String** | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| CHILDWITHNULLABLE | "ChildWithNullable" | + + + diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApi.java index 43d08fbc79ab..ac4bf8941f67 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApi.java @@ -3,6 +3,7 @@ import org.openapitools.client.ApiClient; import io.vertx.core.file.AsyncFile; import java.math.BigDecimal; +import org.openapitools.client.model.ChildWithNullable; import org.openapitools.client.model.Client; import org.openapitools.client.model.EnumClass; import org.openapitools.client.model.FakeBigDecimalMap200Response; @@ -90,6 +91,10 @@ public interface FakeApi { void testJsonFormData(String param, String param2, ApiClient.AuthInfo authInfo, Handler> handler); + void testNullable(ChildWithNullable childWithNullable, Handler> handler); + + void testNullable(ChildWithNullable childWithNullable, ApiClient.AuthInfo authInfo, Handler> handler); + void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language, Handler> handler); void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language, ApiClient.AuthInfo authInfo, Handler> handler); diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java index 4236c2b3287f..34c098a50fb5 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java @@ -2,6 +2,7 @@ import io.vertx.core.file.AsyncFile; import java.math.BigDecimal; +import org.openapitools.client.model.ChildWithNullable; import org.openapitools.client.model.Client; import org.openapitools.client.model.EnumClass; import org.openapitools.client.model.FakeBigDecimalMap200Response; @@ -964,6 +965,54 @@ public void testJsonFormData(String param, String param2, ApiClient.AuthInfo aut apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler); } /** + * test nullable parent property + * + * @param childWithNullable request body (required) + * @param resultHandler Asynchronous result handler + */ + public void testNullable(ChildWithNullable childWithNullable, Handler> resultHandler) { + testNullable(childWithNullable, null, resultHandler); + } + + /** + * test nullable parent property + * + * @param childWithNullable request body (required) + * @param authInfo per call authentication override. + * @param resultHandler Asynchronous result handler + */ + public void testNullable(ChildWithNullable childWithNullable, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + Object localVarBody = childWithNullable; + + // verify the required parameter 'childWithNullable' is set + if (childWithNullable == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'childWithNullable' when calling testNullable")); + return; + } + + // create path and map variables + String localVarPath = "/fake/nullable"; + + // query params + List localVarQueryParams = new ArrayList<>(); + + // header params + MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + + // cookie params + MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); + + // form params + // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) + Map localVarFormParams = new HashMap<>(); + + String[] localVarAccepts = { }; + String[] localVarContentTypes = { "application/json" }; + String[] localVarAuthNames = new String[] { }; + + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, null, resultHandler); + } + /** * * To test the collection format in query parameters * @param pipe (required) diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java index 85106635b976..4ae404ab093f 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java @@ -2,6 +2,7 @@ import io.vertx.core.file.AsyncFile; import java.math.BigDecimal; +import org.openapitools.client.model.ChildWithNullable; import org.openapitools.client.model.Client; import org.openapitools.client.model.EnumClass; import org.openapitools.client.model.FakeBigDecimalMap200Response; @@ -912,6 +913,51 @@ public Single rxTestJsonFormData(String param, String param2, ApiClient.Au )); } /** + * test nullable parent property + * + * @param childWithNullable request body (required) + * @param resultHandler Asynchronous result handler + */ + public void testNullable(ChildWithNullable childWithNullable, Handler> resultHandler) { + delegate.testNullable(childWithNullable, resultHandler); + } + + /** + * test nullable parent property + * + * @param childWithNullable request body (required) + * @param authInfo call specific auth overrides + * @param resultHandler Asynchronous result handler + */ + public void testNullable(ChildWithNullable childWithNullable, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.testNullable(childWithNullable, authInfo, resultHandler); + } + + /** + * test nullable parent property + * + * @param childWithNullable request body (required) + * @return Asynchronous result handler (RxJava Single) + */ + public Single rxTestNullable(ChildWithNullable childWithNullable) { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> + delegate.testNullable(childWithNullable, fut) + )); + } + + /** + * test nullable parent property + * + * @param childWithNullable request body (required) + * @param authInfo call specific auth overrides + * @return Asynchronous result handler (RxJava Single) + */ + public Single rxTestNullable(ChildWithNullable childWithNullable, ApiClient.AuthInfo authInfo) { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> + delegate.testNullable(childWithNullable, authInfo, fut) + )); + } + /** * * To test the collection format in query parameters * @param pipe (required) diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ChildWithNullable.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ChildWithNullable.java new file mode 100644 index 000000000000..808a97496f36 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ChildWithNullable.java @@ -0,0 +1,140 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * 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.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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ChildWithNullable + */ +@JsonPropertyOrder({ + ChildWithNullable.JSON_PROPERTY_OTHER_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class ChildWithNullable extends ParentWithNullable { + public static final String JSON_PROPERTY_OTHER_PROPERTY = "otherProperty"; + private String otherProperty; + + public ChildWithNullable() { + + } + + public ChildWithNullable otherProperty(String otherProperty) { + + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOtherProperty() { + return otherProperty; + } + + + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + @Override + public ChildWithNullable type(TypeEnum type) { + this.setType(type); + return this; + } + + @Override + public ChildWithNullable nullableProperty(String nullableProperty) { + this.setNullableProperty(nullableProperty); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ParentWithNullable.java new file mode 100644 index 000000000000..b8ad35eda765 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -0,0 +1,203 @@ +/* + * OpenAPI Petstore + * 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.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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ParentWithNullable + */ +@JsonPropertyOrder({ + ParentWithNullable.JSON_PROPERTY_TYPE, + ParentWithNullable.JSON_PROPERTY_NULLABLE_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable"), +}) + +public class ParentWithNullable { + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + protected TypeEnum type; + + public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable() { + } + + public ParentWithNullable type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getNullableProperty() { + return nullableProperty.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNullableProperty_JsonNullable() { + return nullableProperty; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + public void setNullableProperty_JsonNullable(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + public void setNullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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/ChildWithNullableTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java new file mode 100644 index 000000000000..2616181bec30 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java @@ -0,0 +1,68 @@ +/* + * OpenAPI Petstore + * 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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ChildWithNullable + */ +public class ChildWithNullableTest { + private final ChildWithNullable model = new ChildWithNullable(); + + /** + * Model tests for ChildWithNullable + */ + @Test + public void testChildWithNullable() { + // TODO: test ChildWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + + /** + * Test the property 'otherProperty' + */ + @Test + public void otherPropertyTest() { + // TODO: test otherProperty + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java new file mode 100644 index 000000000000..bdd46008b13d --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * 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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ParentWithNullable + */ +public class ParentWithNullableTest { + private final ParentWithNullable model = new ParentWithNullable(); + + /** + * Model tests for ParentWithNullable + */ + @Test + public void testParentWithNullable() { + // TODO: test ParentWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + +} diff --git a/samples/client/petstore/java/webclient-jakarta/.openapi-generator/FILES b/samples/client/petstore/java/webclient-jakarta/.openapi-generator/FILES index 7b091f23a808..cf2db2afaf10 100644 --- a/samples/client/petstore/java/webclient-jakarta/.openapi-generator/FILES +++ b/samples/client/petstore/java/webclient-jakarta/.openapi-generator/FILES @@ -15,6 +15,7 @@ docs/ArrayTest.md docs/Capitalization.md docs/Cat.md docs/Category.md +docs/ChildWithNullable.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md @@ -50,6 +51,7 @@ docs/OuterEnumDefaultValue.md docs/OuterEnumInteger.md docs/OuterEnumIntegerDefaultValue.md docs/OuterObjectWithEnumProperty.md +docs/ParentWithNullable.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md @@ -96,6 +98,7 @@ 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/Category.java +src/main/java/org/openapitools/client/model/ChildWithNullable.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 @@ -128,6 +131,7 @@ src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java src/main/java/org/openapitools/client/model/OuterEnumInteger.java src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java +src/main/java/org/openapitools/client/model/ParentWithNullable.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java src/main/java/org/openapitools/client/model/SingleRefType.java diff --git a/samples/client/petstore/java/webclient-jakarta/README.md b/samples/client/petstore/java/webclient-jakarta/README.md index 11cf41560c8c..178a016bffe5 100644 --- a/samples/client/petstore/java/webclient-jakarta/README.md +++ b/samples/client/petstore/java/webclient-jakarta/README.md @@ -132,6 +132,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**testNullable**](docs/FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property *FakeApi* | [**testQueryParameterCollectionFormat**](docs/FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | *FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store @@ -168,6 +169,7 @@ Class | Method | HTTP request | Description - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - [Category](docs/Category.md) + - [ChildWithNullable](docs/ChildWithNullable.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [DeprecatedObject](docs/DeprecatedObject.md) @@ -200,6 +202,7 @@ Class | Method | HTTP request | Description - [OuterEnumInteger](docs/OuterEnumInteger.md) - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) + - [ParentWithNullable](docs/ParentWithNullable.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - [SingleRefType](docs/SingleRefType.md) diff --git a/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml b/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml index 9f0affe779f0..288d48909023 100644 --- a/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml +++ b/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml @@ -1031,6 +1031,25 @@ paths: - fake x-content-type: application/json x-accepts: application/json + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1881,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/client/petstore/java/webclient-jakarta/docs/ChildWithNullable.md b/samples/client/petstore/java/webclient-jakarta/docs/ChildWithNullable.md new file mode 100644 index 000000000000..73c0dd6d4737 --- /dev/null +++ b/samples/client/petstore/java/webclient-jakarta/docs/ChildWithNullable.md @@ -0,0 +1,13 @@ + + +# ChildWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**otherProperty** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/webclient-jakarta/docs/FakeApi.md b/samples/client/petstore/java/webclient-jakarta/docs/FakeApi.md index 6eb12aee3577..df8b14be8e29 100644 --- a/samples/client/petstore/java/webclient-jakarta/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient-jakarta/docs/FakeApi.md @@ -21,6 +21,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | | [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testNullable**](FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property | | [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -1199,6 +1200,71 @@ No authorization required | **200** | successful operation | - | +## testNullable + +> testNullable(childWithNullable) + +test nullable parent property + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + ChildWithNullable childWithNullable = new ChildWithNullable(); // ChildWithNullable | request body + try { + apiInstance.testNullable(childWithNullable); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testNullable"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + ## testQueryParameterCollectionFormat > testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) diff --git a/samples/client/petstore/java/webclient-jakarta/docs/ParentWithNullable.md b/samples/client/petstore/java/webclient-jakarta/docs/ParentWithNullable.md new file mode 100644 index 000000000000..b8fcf6b42e8f --- /dev/null +++ b/samples/client/petstore/java/webclient-jakarta/docs/ParentWithNullable.md @@ -0,0 +1,22 @@ + + +# ParentWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**nullableProperty** | **String** | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| CHILDWITHNULLABLE | "ChildWithNullable" | + + + diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/api/FakeApi.java index d8ff2b837d4b..35ad9b29bca2 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/api/FakeApi.java @@ -3,6 +3,7 @@ import org.openapitools.client.ApiClient; import java.math.BigDecimal; +import org.openapitools.client.model.ChildWithNullable; import org.openapitools.client.model.Client; import org.openapitools.client.model.EnumClass; import org.openapitools.client.model.FakeBigDecimalMap200Response; @@ -1449,6 +1450,75 @@ public Mono> testJsonFormDataWithHttpInfo(String param, Str public ResponseSpec testJsonFormDataWithResponseSpec(String param, String param2) throws WebClientResponseException { return testJsonFormDataRequestCreation(param, param2); } + /** + * test nullable parent property + * + *

200 - successful operation + * @param childWithNullable request body + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec testNullableRequestCreation(ChildWithNullable childWithNullable) throws WebClientResponseException { + Object postBody = childWithNullable; + // verify the required parameter 'childWithNullable' is set + if (childWithNullable == null) { + throw new WebClientResponseException("Missing the required parameter 'childWithNullable' when calling testNullable", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap(); + + final MultiValueMap queryParams = new LinkedMultiValueMap(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/fake/nullable", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * test nullable parent property + * + *

200 - successful operation + * @param childWithNullable request body + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + */ + public Mono testNullable(ChildWithNullable childWithNullable) throws WebClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; + return testNullableRequestCreation(childWithNullable).bodyToMono(localVarReturnType); + } + + /** + * test nullable parent property + * + *

200 - successful operation + * @param childWithNullable request body + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + */ + public Mono> testNullableWithHttpInfo(ChildWithNullable childWithNullable) throws WebClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; + return testNullableRequestCreation(childWithNullable).toEntity(localVarReturnType); + } + + /** + * test nullable parent property + * + *

200 - successful operation + * @param childWithNullable request body + * @return ResponseSpec + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec testNullableWithResponseSpec(ChildWithNullable childWithNullable) throws WebClientResponseException { + return testNullableRequestCreation(childWithNullable); + } /** * * To test the collection format in query parameters diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ChildWithNullable.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ChildWithNullable.java new file mode 100644 index 000000000000..82378f275fa1 --- /dev/null +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ChildWithNullable.java @@ -0,0 +1,140 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * 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.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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ChildWithNullable + */ +@JsonPropertyOrder({ + ChildWithNullable.JSON_PROPERTY_OTHER_PROPERTY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class ChildWithNullable extends ParentWithNullable { + public static final String JSON_PROPERTY_OTHER_PROPERTY = "otherProperty"; + private String otherProperty; + + public ChildWithNullable() { + + } + + public ChildWithNullable otherProperty(String otherProperty) { + + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOtherProperty() { + return otherProperty; + } + + + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + @Override + public ChildWithNullable type(TypeEnum type) { + this.setType(type); + return this; + } + + @Override + public ChildWithNullable nullableProperty(String nullableProperty) { + this.setNullableProperty(nullableProperty); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ParentWithNullable.java new file mode 100644 index 000000000000..89b485dbe703 --- /dev/null +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -0,0 +1,203 @@ +/* + * OpenAPI Petstore + * 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.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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ParentWithNullable + */ +@JsonPropertyOrder({ + ParentWithNullable.JSON_PROPERTY_TYPE, + ParentWithNullable.JSON_PROPERTY_NULLABLE_PROPERTY +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable"), +}) + +public class ParentWithNullable { + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + protected TypeEnum type; + + public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable() { + } + + public ParentWithNullable type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + **/ + @jakarta.annotation.Nullable + @JsonIgnore + + public String getNullableProperty() { + return nullableProperty.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNullableProperty_JsonNullable() { + return nullableProperty; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + public void setNullableProperty_JsonNullable(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + public void setNullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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/ChildWithNullableTest.java b/samples/client/petstore/java/webclient-jakarta/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java new file mode 100644 index 000000000000..2616181bec30 --- /dev/null +++ b/samples/client/petstore/java/webclient-jakarta/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java @@ -0,0 +1,68 @@ +/* + * OpenAPI Petstore + * 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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ChildWithNullable + */ +public class ChildWithNullableTest { + private final ChildWithNullable model = new ChildWithNullable(); + + /** + * Model tests for ChildWithNullable + */ + @Test + public void testChildWithNullable() { + // TODO: test ChildWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + + /** + * Test the property 'otherProperty' + */ + @Test + public void otherPropertyTest() { + // TODO: test otherProperty + } + +} diff --git a/samples/client/petstore/java/webclient-jakarta/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java b/samples/client/petstore/java/webclient-jakarta/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java new file mode 100644 index 000000000000..bdd46008b13d --- /dev/null +++ b/samples/client/petstore/java/webclient-jakarta/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * 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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ParentWithNullable + */ +public class ParentWithNullableTest { + private final ParentWithNullable model = new ParentWithNullable(); + + /** + * Model tests for ParentWithNullable + */ + @Test + public void testParentWithNullable() { + // TODO: test ParentWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + +} diff --git a/samples/client/petstore/java/webclient-swagger2/.openapi-generator/FILES b/samples/client/petstore/java/webclient-swagger2/.openapi-generator/FILES index 7b091f23a808..cf2db2afaf10 100644 --- a/samples/client/petstore/java/webclient-swagger2/.openapi-generator/FILES +++ b/samples/client/petstore/java/webclient-swagger2/.openapi-generator/FILES @@ -15,6 +15,7 @@ docs/ArrayTest.md docs/Capitalization.md docs/Cat.md docs/Category.md +docs/ChildWithNullable.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md @@ -50,6 +51,7 @@ docs/OuterEnumDefaultValue.md docs/OuterEnumInteger.md docs/OuterEnumIntegerDefaultValue.md docs/OuterObjectWithEnumProperty.md +docs/ParentWithNullable.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md @@ -96,6 +98,7 @@ 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/Category.java +src/main/java/org/openapitools/client/model/ChildWithNullable.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 @@ -128,6 +131,7 @@ src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java src/main/java/org/openapitools/client/model/OuterEnumInteger.java src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java +src/main/java/org/openapitools/client/model/ParentWithNullable.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java src/main/java/org/openapitools/client/model/SingleRefType.java diff --git a/samples/client/petstore/java/webclient-swagger2/README.md b/samples/client/petstore/java/webclient-swagger2/README.md index 11cf41560c8c..178a016bffe5 100644 --- a/samples/client/petstore/java/webclient-swagger2/README.md +++ b/samples/client/petstore/java/webclient-swagger2/README.md @@ -132,6 +132,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**testNullable**](docs/FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property *FakeApi* | [**testQueryParameterCollectionFormat**](docs/FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | *FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store @@ -168,6 +169,7 @@ Class | Method | HTTP request | Description - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - [Category](docs/Category.md) + - [ChildWithNullable](docs/ChildWithNullable.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [DeprecatedObject](docs/DeprecatedObject.md) @@ -200,6 +202,7 @@ Class | Method | HTTP request | Description - [OuterEnumInteger](docs/OuterEnumInteger.md) - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) + - [ParentWithNullable](docs/ParentWithNullable.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - [SingleRefType](docs/SingleRefType.md) diff --git a/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml b/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml index 9f0affe779f0..288d48909023 100644 --- a/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml +++ b/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml @@ -1031,6 +1031,25 @@ paths: - fake x-content-type: application/json x-accepts: application/json + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1881,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/client/petstore/java/webclient-swagger2/docs/ChildWithNullable.md b/samples/client/petstore/java/webclient-swagger2/docs/ChildWithNullable.md new file mode 100644 index 000000000000..73c0dd6d4737 --- /dev/null +++ b/samples/client/petstore/java/webclient-swagger2/docs/ChildWithNullable.md @@ -0,0 +1,13 @@ + + +# ChildWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**otherProperty** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/webclient-swagger2/docs/FakeApi.md b/samples/client/petstore/java/webclient-swagger2/docs/FakeApi.md index 6eb12aee3577..df8b14be8e29 100644 --- a/samples/client/petstore/java/webclient-swagger2/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient-swagger2/docs/FakeApi.md @@ -21,6 +21,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | | [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testNullable**](FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property | | [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -1199,6 +1200,71 @@ No authorization required | **200** | successful operation | - | +## testNullable + +> testNullable(childWithNullable) + +test nullable parent property + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + ChildWithNullable childWithNullable = new ChildWithNullable(); // ChildWithNullable | request body + try { + apiInstance.testNullable(childWithNullable); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testNullable"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + ## testQueryParameterCollectionFormat > testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) diff --git a/samples/client/petstore/java/webclient-swagger2/docs/ParentWithNullable.md b/samples/client/petstore/java/webclient-swagger2/docs/ParentWithNullable.md new file mode 100644 index 000000000000..b8fcf6b42e8f --- /dev/null +++ b/samples/client/petstore/java/webclient-swagger2/docs/ParentWithNullable.md @@ -0,0 +1,22 @@ + + +# ParentWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**nullableProperty** | **String** | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| CHILDWITHNULLABLE | "ChildWithNullable" | + + + diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/api/FakeApi.java index a86605d1ae2f..da027dbd509a 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/api/FakeApi.java @@ -3,6 +3,7 @@ import org.openapitools.client.ApiClient; import java.math.BigDecimal; +import org.openapitools.client.model.ChildWithNullable; import org.openapitools.client.model.Client; import org.openapitools.client.model.EnumClass; import org.openapitools.client.model.FakeBigDecimalMap200Response; @@ -1449,6 +1450,75 @@ public Mono> testJsonFormDataWithHttpInfo(String param, Str public ResponseSpec testJsonFormDataWithResponseSpec(String param, String param2) throws WebClientResponseException { return testJsonFormDataRequestCreation(param, param2); } + /** + * test nullable parent property + * + *

200 - successful operation + * @param childWithNullable request body + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec testNullableRequestCreation(ChildWithNullable childWithNullable) throws WebClientResponseException { + Object postBody = childWithNullable; + // verify the required parameter 'childWithNullable' is set + if (childWithNullable == null) { + throw new WebClientResponseException("Missing the required parameter 'childWithNullable' when calling testNullable", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap(); + + final MultiValueMap queryParams = new LinkedMultiValueMap(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/fake/nullable", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * test nullable parent property + * + *

200 - successful operation + * @param childWithNullable request body + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + */ + public Mono testNullable(ChildWithNullable childWithNullable) throws WebClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; + return testNullableRequestCreation(childWithNullable).bodyToMono(localVarReturnType); + } + + /** + * test nullable parent property + * + *

200 - successful operation + * @param childWithNullable request body + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + */ + public Mono> testNullableWithHttpInfo(ChildWithNullable childWithNullable) throws WebClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; + return testNullableRequestCreation(childWithNullable).toEntity(localVarReturnType); + } + + /** + * test nullable parent property + * + *

200 - successful operation + * @param childWithNullable request body + * @return ResponseSpec + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec testNullableWithResponseSpec(ChildWithNullable childWithNullable) throws WebClientResponseException { + return testNullableRequestCreation(childWithNullable); + } /** * * To test the collection format in query parameters diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ChildWithNullable.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ChildWithNullable.java new file mode 100644 index 000000000000..43bf9db8f6fc --- /dev/null +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ChildWithNullable.java @@ -0,0 +1,142 @@ +/* + * OpenAPI Petstore + * 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.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.v3.oas.annotations.media.Schema; +import org.openapitools.client.model.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ChildWithNullable + */ +@JsonPropertyOrder({ + ChildWithNullable.JSON_PROPERTY_OTHER_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class ChildWithNullable extends ParentWithNullable { + public static final String JSON_PROPERTY_OTHER_PROPERTY = "otherProperty"; + private String otherProperty; + + public ChildWithNullable() { + + } + + public ChildWithNullable otherProperty(String otherProperty) { + + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + **/ + @javax.annotation.Nullable + @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "") + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOtherProperty() { + return otherProperty; + } + + + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + @Override + public ChildWithNullable type(TypeEnum type) { + this.setType(type); + return this; + } + + @Override + public ChildWithNullable nullableProperty(String nullableProperty) { + this.setNullableProperty(nullableProperty); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ParentWithNullable.java new file mode 100644 index 000000000000..023236bc487f --- /dev/null +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -0,0 +1,206 @@ +/* + * OpenAPI Petstore + * 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.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.v3.oas.annotations.media.Schema; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ParentWithNullable + */ +@JsonPropertyOrder({ + ParentWithNullable.JSON_PROPERTY_TYPE, + ParentWithNullable.JSON_PROPERTY_NULLABLE_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable"), +}) + +public class ParentWithNullable { + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + protected TypeEnum type; + + public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable() { + } + + public ParentWithNullable type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + **/ + @javax.annotation.Nullable + @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "") + @JsonIgnore + + public String getNullableProperty() { + return nullableProperty.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNullableProperty_JsonNullable() { + return nullableProperty; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + public void setNullableProperty_JsonNullable(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + public void setNullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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/ChildWithNullableTest.java b/samples/client/petstore/java/webclient-swagger2/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java new file mode 100644 index 000000000000..445815405cfe --- /dev/null +++ b/samples/client/petstore/java/webclient-swagger2/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java @@ -0,0 +1,69 @@ +/* + * OpenAPI Petstore + * 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 io.swagger.v3.oas.annotations.media.Schema; +import org.openapitools.client.model.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ChildWithNullable + */ +public class ChildWithNullableTest { + private final ChildWithNullable model = new ChildWithNullable(); + + /** + * Model tests for ChildWithNullable + */ + @Test + public void testChildWithNullable() { + // TODO: test ChildWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + + /** + * Test the property 'otherProperty' + */ + @Test + public void otherPropertyTest() { + // TODO: test otherProperty + } + +} diff --git a/samples/client/petstore/java/webclient-swagger2/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java b/samples/client/petstore/java/webclient-swagger2/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java new file mode 100644 index 000000000000..870d9c134597 --- /dev/null +++ b/samples/client/petstore/java/webclient-swagger2/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * 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 io.swagger.v3.oas.annotations.media.Schema; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ParentWithNullable + */ +public class ParentWithNullableTest { + private final ParentWithNullable model = new ParentWithNullable(); + + /** + * Model tests for ParentWithNullable + */ + @Test + public void testParentWithNullable() { + // TODO: test ParentWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + +} diff --git a/samples/client/petstore/java/webclient/.openapi-generator/FILES b/samples/client/petstore/java/webclient/.openapi-generator/FILES index 7b091f23a808..cf2db2afaf10 100644 --- a/samples/client/petstore/java/webclient/.openapi-generator/FILES +++ b/samples/client/petstore/java/webclient/.openapi-generator/FILES @@ -15,6 +15,7 @@ docs/ArrayTest.md docs/Capitalization.md docs/Cat.md docs/Category.md +docs/ChildWithNullable.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md @@ -50,6 +51,7 @@ docs/OuterEnumDefaultValue.md docs/OuterEnumInteger.md docs/OuterEnumIntegerDefaultValue.md docs/OuterObjectWithEnumProperty.md +docs/ParentWithNullable.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md @@ -96,6 +98,7 @@ 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/Category.java +src/main/java/org/openapitools/client/model/ChildWithNullable.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 @@ -128,6 +131,7 @@ src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java src/main/java/org/openapitools/client/model/OuterEnumInteger.java src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java +src/main/java/org/openapitools/client/model/ParentWithNullable.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java src/main/java/org/openapitools/client/model/SingleRefType.java diff --git a/samples/client/petstore/java/webclient/README.md b/samples/client/petstore/java/webclient/README.md index 11cf41560c8c..178a016bffe5 100644 --- a/samples/client/petstore/java/webclient/README.md +++ b/samples/client/petstore/java/webclient/README.md @@ -132,6 +132,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**testNullable**](docs/FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property *FakeApi* | [**testQueryParameterCollectionFormat**](docs/FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | *FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store @@ -168,6 +169,7 @@ Class | Method | HTTP request | Description - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - [Category](docs/Category.md) + - [ChildWithNullable](docs/ChildWithNullable.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [DeprecatedObject](docs/DeprecatedObject.md) @@ -200,6 +202,7 @@ Class | Method | HTTP request | Description - [OuterEnumInteger](docs/OuterEnumInteger.md) - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) + - [ParentWithNullable](docs/ParentWithNullable.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - [SingleRefType](docs/SingleRefType.md) diff --git a/samples/client/petstore/java/webclient/api/openapi.yaml b/samples/client/petstore/java/webclient/api/openapi.yaml index 9f0affe779f0..288d48909023 100644 --- a/samples/client/petstore/java/webclient/api/openapi.yaml +++ b/samples/client/petstore/java/webclient/api/openapi.yaml @@ -1031,6 +1031,25 @@ paths: - fake x-content-type: application/json x-accepts: application/json + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1881,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/client/petstore/java/webclient/docs/ChildWithNullable.md b/samples/client/petstore/java/webclient/docs/ChildWithNullable.md new file mode 100644 index 000000000000..73c0dd6d4737 --- /dev/null +++ b/samples/client/petstore/java/webclient/docs/ChildWithNullable.md @@ -0,0 +1,13 @@ + + +# ChildWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**otherProperty** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/webclient/docs/FakeApi.md b/samples/client/petstore/java/webclient/docs/FakeApi.md index 6eb12aee3577..df8b14be8e29 100644 --- a/samples/client/petstore/java/webclient/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient/docs/FakeApi.md @@ -21,6 +21,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | | [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testNullable**](FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property | | [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -1199,6 +1200,71 @@ No authorization required | **200** | successful operation | - | +## testNullable + +> testNullable(childWithNullable) + +test nullable parent property + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + ChildWithNullable childWithNullable = new ChildWithNullable(); // ChildWithNullable | request body + try { + apiInstance.testNullable(childWithNullable); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testNullable"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | + + ## testQueryParameterCollectionFormat > testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) diff --git a/samples/client/petstore/java/webclient/docs/ParentWithNullable.md b/samples/client/petstore/java/webclient/docs/ParentWithNullable.md new file mode 100644 index 000000000000..b8fcf6b42e8f --- /dev/null +++ b/samples/client/petstore/java/webclient/docs/ParentWithNullable.md @@ -0,0 +1,22 @@ + + +# ParentWithNullable + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**nullableProperty** | **String** | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| CHILDWITHNULLABLE | "ChildWithNullable" | + + + diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java index a86605d1ae2f..da027dbd509a 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java @@ -3,6 +3,7 @@ import org.openapitools.client.ApiClient; import java.math.BigDecimal; +import org.openapitools.client.model.ChildWithNullable; import org.openapitools.client.model.Client; import org.openapitools.client.model.EnumClass; import org.openapitools.client.model.FakeBigDecimalMap200Response; @@ -1449,6 +1450,75 @@ public Mono> testJsonFormDataWithHttpInfo(String param, Str public ResponseSpec testJsonFormDataWithResponseSpec(String param, String param2) throws WebClientResponseException { return testJsonFormDataRequestCreation(param, param2); } + /** + * test nullable parent property + * + *

200 - successful operation + * @param childWithNullable request body + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + */ + private ResponseSpec testNullableRequestCreation(ChildWithNullable childWithNullable) throws WebClientResponseException { + Object postBody = childWithNullable; + // verify the required parameter 'childWithNullable' is set + if (childWithNullable == null) { + throw new WebClientResponseException("Missing the required parameter 'childWithNullable' when calling testNullable", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); + } + // create path and map variables + final Map pathParams = new HashMap(); + + final MultiValueMap queryParams = new LinkedMultiValueMap(); + final HttpHeaders headerParams = new HttpHeaders(); + final MultiValueMap cookieParams = new LinkedMultiValueMap(); + final MultiValueMap formParams = new LinkedMultiValueMap(); + + final String[] localVarAccepts = { }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "application/json" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/fake/nullable", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + + /** + * test nullable parent property + * + *

200 - successful operation + * @param childWithNullable request body + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + */ + public Mono testNullable(ChildWithNullable childWithNullable) throws WebClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; + return testNullableRequestCreation(childWithNullable).bodyToMono(localVarReturnType); + } + + /** + * test nullable parent property + * + *

200 - successful operation + * @param childWithNullable request body + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + */ + public Mono> testNullableWithHttpInfo(ChildWithNullable childWithNullable) throws WebClientResponseException { + ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; + return testNullableRequestCreation(childWithNullable).toEntity(localVarReturnType); + } + + /** + * test nullable parent property + * + *

200 - successful operation + * @param childWithNullable request body + * @return ResponseSpec + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + */ + public ResponseSpec testNullableWithResponseSpec(ChildWithNullable childWithNullable) throws WebClientResponseException { + return testNullableRequestCreation(childWithNullable); + } /** * * To test the collection format in query parameters diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ChildWithNullable.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ChildWithNullable.java new file mode 100644 index 000000000000..808a97496f36 --- /dev/null +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ChildWithNullable.java @@ -0,0 +1,140 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * 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.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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ChildWithNullable + */ +@JsonPropertyOrder({ + ChildWithNullable.JSON_PROPERTY_OTHER_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) + +public class ChildWithNullable extends ParentWithNullable { + public static final String JSON_PROPERTY_OTHER_PROPERTY = "otherProperty"; + private String otherProperty; + + public ChildWithNullable() { + + } + + public ChildWithNullable otherProperty(String otherProperty) { + + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getOtherProperty() { + return otherProperty; + } + + + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + @Override + public ChildWithNullable type(TypeEnum type) { + this.setType(type); + return this; + } + + @Override + public ChildWithNullable nullableProperty(String nullableProperty) { + this.setNullableProperty(nullableProperty); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java new file mode 100644 index 000000000000..b8ad35eda765 --- /dev/null +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -0,0 +1,203 @@ +/* + * OpenAPI Petstore + * 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.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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ParentWithNullable + */ +@JsonPropertyOrder({ + ParentWithNullable.JSON_PROPERTY_TYPE, + ParentWithNullable.JSON_PROPERTY_NULLABLE_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable"), +}) + +public class ParentWithNullable { + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + protected TypeEnum type; + + public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable() { + } + + public ParentWithNullable type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public TypeEnum getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getNullableProperty() { + return nullableProperty.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNullableProperty_JsonNullable() { + return nullableProperty; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + public void setNullableProperty_JsonNullable(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + public void setNullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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/ChildWithNullableTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java new file mode 100644 index 000000000000..2616181bec30 --- /dev/null +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java @@ -0,0 +1,68 @@ +/* + * OpenAPI Petstore + * 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.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ChildWithNullable + */ +public class ChildWithNullableTest { + private final ChildWithNullable model = new ChildWithNullable(); + + /** + * Model tests for ChildWithNullable + */ + @Test + public void testChildWithNullable() { + // TODO: test ChildWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + + /** + * Test the property 'otherProperty' + */ + @Test + public void otherPropertyTest() { + // TODO: test otherProperty + } + +} diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java new file mode 100644 index 000000000000..bdd46008b13d --- /dev/null +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * 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.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for ParentWithNullable + */ +public class ParentWithNullableTest { + private final ParentWithNullable model = new ParentWithNullable(); + + /** + * Model tests for ParentWithNullable + */ + @Test + public void testParentWithNullable() { + // TODO: test ParentWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + +} diff --git a/samples/client/petstore/k6/script.js b/samples/client/petstore/k6/script.js index f657d146f898..1416fe64534b 100644 --- a/samples/client/petstore/k6/script.js +++ b/samples/client/petstore/k6/script.js @@ -158,6 +158,22 @@ export default function() { } }); + group("/fake/nullable", () => { + + // Request No. 1: testNullable + { + let url = BASE_URL + `/fake/nullable`; + // TODO: edit the parameters of the request body. + let body = {"type": "string", "nullableProperty": "string", "otherProperty": "string"}; + let params = {headers: {"Content-Type": "application/json", "Accept": "application/json"}}; + let request = http.post(url, JSON.stringify(body), params); + + check(request, { + "successful operation": (r) => r.status === 200 + }); + } + }); + group("/fake_classname_test", () => { // Request No. 1: testClassname diff --git a/samples/client/petstore/perl/.openapi-generator/FILES b/samples/client/petstore/perl/.openapi-generator/FILES index 2f27fda7f34d..d6a142a834bb 100644 --- a/samples/client/petstore/perl/.openapi-generator/FILES +++ b/samples/client/petstore/perl/.openapi-generator/FILES @@ -13,6 +13,7 @@ docs/ArrayTest.md docs/Capitalization.md docs/Cat.md docs/Category.md +docs/ChildWithNullable.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md @@ -47,6 +48,7 @@ docs/OuterEnumDefaultValue.md docs/OuterEnumInteger.md docs/OuterEnumIntegerDefaultValue.md docs/OuterObjectWithEnumProperty.md +docs/ParentWithNullable.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md @@ -74,6 +76,7 @@ lib/WWW/OpenAPIClient/Object/ArrayTest.pm lib/WWW/OpenAPIClient/Object/Capitalization.pm lib/WWW/OpenAPIClient/Object/Cat.pm lib/WWW/OpenAPIClient/Object/Category.pm +lib/WWW/OpenAPIClient/Object/ChildWithNullable.pm lib/WWW/OpenAPIClient/Object/ClassModel.pm lib/WWW/OpenAPIClient/Object/Client.pm lib/WWW/OpenAPIClient/Object/DeprecatedModel.pm @@ -105,6 +108,7 @@ lib/WWW/OpenAPIClient/Object/OuterEnumDefaultValue.pm lib/WWW/OpenAPIClient/Object/OuterEnumInteger.pm lib/WWW/OpenAPIClient/Object/OuterEnumIntegerDefaultValue.pm lib/WWW/OpenAPIClient/Object/OuterObjectWithEnumProperty.pm +lib/WWW/OpenAPIClient/Object/ParentWithNullable.pm lib/WWW/OpenAPIClient/Object/Pet.pm lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm lib/WWW/OpenAPIClient/Object/SingleRefType.pm diff --git a/samples/client/petstore/perl/README.md b/samples/client/petstore/perl/README.md index 18b2ea4aab1e..affa55c61941 100644 --- a/samples/client/petstore/perl/README.md +++ b/samples/client/petstore/perl/README.md @@ -252,6 +252,7 @@ use WWW::OpenAPIClient::Object::ArrayTest; use WWW::OpenAPIClient::Object::Capitalization; use WWW::OpenAPIClient::Object::Cat; use WWW::OpenAPIClient::Object::Category; +use WWW::OpenAPIClient::Object::ChildWithNullable; use WWW::OpenAPIClient::Object::ClassModel; use WWW::OpenAPIClient::Object::Client; use WWW::OpenAPIClient::Object::DeprecatedModel; @@ -283,6 +284,7 @@ use WWW::OpenAPIClient::Object::OuterEnumDefaultValue; use WWW::OpenAPIClient::Object::OuterEnumInteger; use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue; use WWW::OpenAPIClient::Object::OuterObjectWithEnumProperty; +use WWW::OpenAPIClient::Object::ParentWithNullable; use WWW::OpenAPIClient::Object::Pet; use WWW::OpenAPIClient::Object::ReadOnlyFirst; use WWW::OpenAPIClient::Object::SingleRefType; @@ -319,6 +321,7 @@ use WWW::OpenAPIClient::Object::ArrayTest; use WWW::OpenAPIClient::Object::Capitalization; use WWW::OpenAPIClient::Object::Cat; use WWW::OpenAPIClient::Object::Category; +use WWW::OpenAPIClient::Object::ChildWithNullable; use WWW::OpenAPIClient::Object::ClassModel; use WWW::OpenAPIClient::Object::Client; use WWW::OpenAPIClient::Object::DeprecatedModel; @@ -350,6 +353,7 @@ use WWW::OpenAPIClient::Object::OuterEnumDefaultValue; use WWW::OpenAPIClient::Object::OuterEnumInteger; use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue; use WWW::OpenAPIClient::Object::OuterObjectWithEnumProperty; +use WWW::OpenAPIClient::Object::ParentWithNullable; use WWW::OpenAPIClient::Object::Pet; use WWW::OpenAPIClient::Object::ReadOnlyFirst; use WWW::OpenAPIClient::Object::SingleRefType; @@ -401,6 +405,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**test_json_form_data**](docs/FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**test_nullable**](docs/FakeApi.md#test_nullable) | **POST** /fake/nullable | test nullable parent property *FakeApi* | [**test_query_parameter_collection_format**](docs/FakeApi.md#test_query_parameter_collection_format) | **PUT** /fake/test-query-parameters | *FakeClassnameTags123Api* | [**test_classname**](docs/FakeClassnameTags123Api.md#test_classname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store @@ -437,6 +442,7 @@ Class | Method | HTTP request | Description - [WWW::OpenAPIClient::Object::Capitalization](docs/Capitalization.md) - [WWW::OpenAPIClient::Object::Cat](docs/Cat.md) - [WWW::OpenAPIClient::Object::Category](docs/Category.md) + - [WWW::OpenAPIClient::Object::ChildWithNullable](docs/ChildWithNullable.md) - [WWW::OpenAPIClient::Object::ClassModel](docs/ClassModel.md) - [WWW::OpenAPIClient::Object::Client](docs/Client.md) - [WWW::OpenAPIClient::Object::DeprecatedModel](docs/DeprecatedModel.md) @@ -468,6 +474,7 @@ Class | Method | HTTP request | Description - [WWW::OpenAPIClient::Object::OuterEnumInteger](docs/OuterEnumInteger.md) - [WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) - [WWW::OpenAPIClient::Object::OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) + - [WWW::OpenAPIClient::Object::ParentWithNullable](docs/ParentWithNullable.md) - [WWW::OpenAPIClient::Object::Pet](docs/Pet.md) - [WWW::OpenAPIClient::Object::ReadOnlyFirst](docs/ReadOnlyFirst.md) - [WWW::OpenAPIClient::Object::SingleRefType](docs/SingleRefType.md) diff --git a/samples/client/petstore/perl/docs/ChildWithNullable.md b/samples/client/petstore/perl/docs/ChildWithNullable.md new file mode 100644 index 000000000000..81016dd94043 --- /dev/null +++ b/samples/client/petstore/perl/docs/ChildWithNullable.md @@ -0,0 +1,15 @@ +# WWW::OpenAPIClient::Object::ChildWithNullable + +## Load the model package +```perl +use WWW::OpenAPIClient::Object::ChildWithNullable; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**other_property** | **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/DeprecatedObject.md b/samples/client/petstore/perl/docs/DeprecatedObject.md new file mode 100644 index 000000000000..692432fcab15 --- /dev/null +++ b/samples/client/petstore/perl/docs/DeprecatedObject.md @@ -0,0 +1,15 @@ +# WWW::OpenAPIClient::Object::DeprecatedObject + +## Load the model package +```perl +use WWW::OpenAPIClient::Object::DeprecatedObject; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **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/FakeApi.md b/samples/client/petstore/perl/docs/FakeApi.md index 546ef873a8a5..0bd3dce02b7e 100644 --- a/samples/client/petstore/perl/docs/FakeApi.md +++ b/samples/client/petstore/perl/docs/FakeApi.md @@ -26,6 +26,7 @@ Method | HTTP request | Description [**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data +[**test_nullable**](FakeApi.md#test_nullable) | **POST** /fake/nullable | test nullable parent property [**test_query_parameter_collection_format**](FakeApi.md#test_query_parameter_collection_format) | **PUT** /fake/test-query-parameters | @@ -859,6 +860,51 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_nullable** +> test_nullable(child_with_nullable => $child_with_nullable) + +test nullable parent property + + + +### Example +```perl +use Data::Dumper; +use WWW::OpenAPIClient::FakeApi; +my $api_instance = WWW::OpenAPIClient::FakeApi->new( +); + +my $child_with_nullable = WWW::OpenAPIClient::Object::ChildWithNullable->new(); # ChildWithNullable | request body + +eval { + $api_instance->test_nullable(child_with_nullable => $child_with_nullable); +}; +if ($@) { + warn "Exception when calling FakeApi->test_nullable: $@\n"; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **child_with_nullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **test_query_parameter_collection_format** > test_query_parameter_collection_format(pipe => $pipe, ioutil => $ioutil, http => $http, url => $url, context => $context, allow_empty => $allow_empty, language => $language) diff --git a/samples/client/petstore/perl/docs/ParentWithNullable.md b/samples/client/petstore/perl/docs/ParentWithNullable.md new file mode 100644 index 000000000000..d59af4c9bfb6 --- /dev/null +++ b/samples/client/petstore/perl/docs/ParentWithNullable.md @@ -0,0 +1,16 @@ +# WWW::OpenAPIClient::Object::ParentWithNullable + +## Load the model package +```perl +use WWW::OpenAPIClient::Object::ParentWithNullable; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | [optional] +**nullable_property** | **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/FakeApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm index cdd5fa2cc102..e1a34b971625 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm @@ -1421,6 +1421,67 @@ sub test_json_form_data { return; } +# +# test_nullable +# +# test nullable parent property +# +# @param ChildWithNullable $child_with_nullable request body (required) +{ + my $params = { + 'child_with_nullable' => { + data_type => 'ChildWithNullable', + description => 'request body', + required => '1', + }, + }; + __PACKAGE__->method_documentation->{ 'test_nullable' } = { + summary => 'test nullable parent property', + params => $params, + returns => undef, + }; +} +# @return void +# +sub test_nullable { + my ($self, %args) = @_; + + # verify the required parameter 'child_with_nullable' is set + unless (exists $args{'child_with_nullable'}) { + croak("Missing the required parameter 'child_with_nullable' when calling test_nullable"); + } + + # parse inputs + my $_resource_path = '/fake/nullable'; + + my $_method = 'POST'; + my $query_params = {}; + my $header_params = {}; + my $form_params = {}; + + # 'Accept' and 'Content-Type' header + my $_header_accept = $self->{api_client}->select_header_accept(); + if ($_header_accept) { + $header_params->{'Accept'} = $_header_accept; + } + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); + + my $_body_data; + # body params + if ( exists $args{'child_with_nullable'}) { + $_body_data = $args{'child_with_nullable'}; + } + + # authentication setting, if any + my $auth_settings = [qw()]; + + # make the API Call + $self->{api_client}->call_api($_resource_path, $_method, + $query_params, $form_params, + $header_params, $_body_data, $auth_settings); + return; +} + # # test_query_parameter_collection_format # diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ChildWithNullable.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ChildWithNullable.pm new file mode 100644 index 000000000000..cc553f3c22f1 --- /dev/null +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ChildWithNullable.pm @@ -0,0 +1,255 @@ +=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::ChildWithNullable; + +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 WWW::OpenAPIClient::Object::ParentWithNullable; + +use base ("Class::Accessor", "Class::Data::Inheritable", "WWW::OpenAPIClient::Object::ParentWithNullable"); + +# +# +# +# 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 } ); + } + + # initialize parent object ParentWithNullable + $self->WWW::OpenAPIClient::Object::ParentWithNullable::init(%args); +} + +# return perl hash +sub to_hash { + my $self = shift; + my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); + + # call ParentWithNullable to_hash and then combine hash + $_hash = { %$_hash, %$self->WWW::OpenAPIClient::Object::ParentWithNullable::to_hash }; + + 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; + } + } + } + + # combine parent (ParentWithNullable) TO_JSON + $_data = { %$_data, %$self->WWW::OpenAPIClient::Object::ParentWithNullable::TO_JSON }; + + 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); + } + } + + # call parent (ParentWithNullable) from_hash + $self->WWW::OpenAPIClient::Object::ParentWithNullable::from_hash($hash); + + 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 => 'ChildWithNullable', + required => [], # TODO +} ); + +__PACKAGE__->method_documentation({ + 'other_property' => { + datatype => 'string', + base_name => 'otherProperty', + description => '', + format => '', + read_only => '', + }, +}); + +__PACKAGE__->openapi_types( { + 'other_property' => 'string' +} ); + +__PACKAGE__->attribute_map( { + 'other_property' => 'otherProperty' +} ); + +__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); + + +1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DeprecatedObject.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DeprecatedObject.pm new file mode 100644 index 000000000000..590c2782fa1d --- /dev/null +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DeprecatedObject.pm @@ -0,0 +1,242 @@ +=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::DeprecatedObject; + +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 => 'DeprecatedObject', + required => [], # TODO +} ); + +__PACKAGE__->method_documentation({ + 'name' => { + datatype => 'string', + base_name => 'name', + description => '', + format => '', + read_only => '', + }, +}); + +__PACKAGE__->openapi_types( { + 'name' => 'string' +} ); + +__PACKAGE__->attribute_map( { + 'name' => 'name' +} ); + +__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); + + +1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ParentWithNullable.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ParentWithNullable.pm new file mode 100644 index 000000000000..41e0c7927f2e --- /dev/null +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ParentWithNullable.pm @@ -0,0 +1,251 @@ +=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::ParentWithNullable; + +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 => 'ParentWithNullable', + required => [], # TODO +} ); + +__PACKAGE__->method_documentation({ + 'type' => { + datatype => 'string', + base_name => 'type', + description => '', + format => '', + read_only => '', + }, + 'nullable_property' => { + datatype => 'string', + base_name => 'nullableProperty', + description => '', + format => '', + read_only => '', + }, +}); + +__PACKAGE__->openapi_types( { + 'type' => 'string', + 'nullable_property' => 'string' +} ); + +__PACKAGE__->attribute_map( { + 'type' => 'type', + 'nullable_property' => 'nullableProperty' +} ); + +__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); + + +1; diff --git a/samples/client/petstore/perl/t/ChildWithNullableTest.t b/samples/client/petstore/perl/t/ChildWithNullableTest.t new file mode 100644 index 000000000000..2823fc4b3ccb --- /dev/null +++ b/samples/client/petstore/perl/t/ChildWithNullableTest.t @@ -0,0 +1,34 @@ +=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::ChildWithNullable'); + +# uncomment below and update the test +#my $instance = WWW::OpenAPIClient::Object::ChildWithNullable->new(); +# +#isa_ok($instance, 'WWW::OpenAPIClient::Object::ChildWithNullable'); + diff --git a/samples/client/petstore/perl/t/DeprecatedObjectTest.t b/samples/client/petstore/perl/t/DeprecatedObjectTest.t new file mode 100644 index 000000000000..485a695b4bb2 --- /dev/null +++ b/samples/client/petstore/perl/t/DeprecatedObjectTest.t @@ -0,0 +1,34 @@ +=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::DeprecatedObject'); + +# uncomment below and update the test +#my $instance = WWW::OpenAPIClient::Object::DeprecatedObject->new(); +# +#isa_ok($instance, 'WWW::OpenAPIClient::Object::DeprecatedObject'); + diff --git a/samples/client/petstore/perl/t/ParentWithNullableTest.t b/samples/client/petstore/perl/t/ParentWithNullableTest.t new file mode 100644 index 000000000000..8ee9800aa3c3 --- /dev/null +++ b/samples/client/petstore/perl/t/ParentWithNullableTest.t @@ -0,0 +1,34 @@ +=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::ParentWithNullable'); + +# uncomment below and update the test +#my $instance = WWW::OpenAPIClient::Object::ParentWithNullable->new(); +# +#isa_ok($instance, 'WWW::OpenAPIClient::Object::ParentWithNullable'); + diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES b/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES index 35ba332017ce..b7160868e129 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/FILES @@ -21,6 +21,7 @@ docs/Model/ArrayTest.md docs/Model/Capitalization.md docs/Model/Cat.md docs/Model/Category.md +docs/Model/ChildWithNullable.md docs/Model/ClassModel.md docs/Model/Client.md docs/Model/DeprecatedObject.md @@ -52,6 +53,7 @@ docs/Model/OuterEnumDefaultValue.md docs/Model/OuterEnumInteger.md docs/Model/OuterEnumIntegerDefaultValue.md docs/Model/OuterObjectWithEnumProperty.md +docs/Model/ParentWithNullable.md docs/Model/Pet.md docs/Model/ReadOnlyFirst.md docs/Model/SingleRefType.md @@ -80,6 +82,7 @@ src/Model/ArrayTest.php src/Model/Capitalization.php src/Model/Cat.php src/Model/Category.php +src/Model/ChildWithNullable.php src/Model/ClassModel.php src/Model/Client.php src/Model/DeprecatedObject.php @@ -112,6 +115,7 @@ src/Model/OuterEnumDefaultValue.php src/Model/OuterEnumInteger.php src/Model/OuterEnumIntegerDefaultValue.php src/Model/OuterObjectWithEnumProperty.php +src/Model/ParentWithNullable.php src/Model/Pet.php src/Model/ReadOnlyFirst.php src/Model/SingleRefType.php diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/README.md b/samples/client/petstore/php-nextgen/OpenAPIClient-php/README.md index e64a5a4b49c9..201cf56d7fb9 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/README.md +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/README.md @@ -90,6 +90,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**testGroupParameters**](docs/Api/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/Api/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**testJsonFormData**](docs/Api/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**testNullable**](docs/Api/FakeApi.md#testnullable) | **POST** /fake/nullable | test nullable parent property *FakeApi* | [**testQueryParameterCollectionFormat**](docs/Api/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | *FakeClassnameTags123Api* | [**testClassname**](docs/Api/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**addPet**](docs/Api/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store @@ -126,6 +127,7 @@ Class | Method | HTTP request | Description - [Capitalization](docs/Model/Capitalization.md) - [Cat](docs/Model/Cat.md) - [Category](docs/Model/Category.md) +- [ChildWithNullable](docs/Model/ChildWithNullable.md) - [ClassModel](docs/Model/ClassModel.md) - [Client](docs/Model/Client.md) - [DeprecatedObject](docs/Model/DeprecatedObject.md) @@ -157,6 +159,7 @@ Class | Method | HTTP request | Description - [OuterEnumInteger](docs/Model/OuterEnumInteger.md) - [OuterEnumIntegerDefaultValue](docs/Model/OuterEnumIntegerDefaultValue.md) - [OuterObjectWithEnumProperty](docs/Model/OuterObjectWithEnumProperty.md) +- [ParentWithNullable](docs/Model/ParentWithNullable.md) - [Pet](docs/Model/Pet.md) - [ReadOnlyFirst](docs/Model/ReadOnlyFirst.md) - [SingleRefType](docs/Model/SingleRefType.md) diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/docs/Api/FakeApi.md b/samples/client/petstore/php-nextgen/OpenAPIClient-php/docs/Api/FakeApi.md index 6de683cdd9c0..67f8694a75f6 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/docs/Api/FakeApi.md +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/docs/Api/FakeApi.md @@ -21,6 +21,7 @@ All URIs are relative to http://petstore.swagger.io:80/v2, except if the operati | [**testGroupParameters()**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**testInlineAdditionalProperties()**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | | [**testJsonFormData()**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testNullable()**](FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property | | [**testQueryParameterCollectionFormat()**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | @@ -1032,6 +1033,61 @@ No authorization required [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `testNullable()` + +```php +testNullable($child_with_nullable) +``` + +test nullable parent property + + + +### Example + +```php +testNullable($child_with_nullable); +} catch (Exception $e) { + echo 'Exception when calling FakeApi->testNullable: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **child_with_nullable** | [**\OpenAPI\Client\Model\ChildWithNullable**](../Model/ChildWithNullable.md)| request body | | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `testQueryParameterCollectionFormat()` ```php diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/docs/Model/ChildWithNullable.md b/samples/client/petstore/php-nextgen/OpenAPIClient-php/docs/Model/ChildWithNullable.md new file mode 100644 index 000000000000..be4cea23a36e --- /dev/null +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/docs/Model/ChildWithNullable.md @@ -0,0 +1,9 @@ +# # ChildWithNullable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**other_property** | **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-nextgen/OpenAPIClient-php/docs/Model/ParentWithNullable.md b/samples/client/petstore/php-nextgen/OpenAPIClient-php/docs/Model/ParentWithNullable.md new file mode 100644 index 000000000000..8f8080ef1411 --- /dev/null +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/docs/Model/ParentWithNullable.md @@ -0,0 +1,10 @@ +# # ParentWithNullable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | [optional] +**nullable_property** | **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-nextgen/OpenAPIClient-php/src/Api/FakeApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php index 3ee2e7382295..54e19d6cf9c6 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php @@ -123,6 +123,9 @@ class FakeApi 'testJsonFormData' => [ 'application/x-www-form-urlencoded', ], + 'testNullable' => [ + 'application/json', + ], 'testQueryParameterCollectionFormat' => [ 'application/json', ], @@ -4803,6 +4806,234 @@ public function testJsonFormDataRequest($param, $param2, string $contentType = s ); } + /** + * Operation testNullable + * + * test nullable parent property + * + * @param \OpenAPI\Client\Model\ChildWithNullable $child_with_nullable request body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testNullable'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function testNullable($child_with_nullable, string $contentType = self::contentTypes['testNullable'][0]) + { + $this->testNullableWithHttpInfo($child_with_nullable, $contentType); + } + + /** + * Operation testNullableWithHttpInfo + * + * test nullable parent property + * + * @param \OpenAPI\Client\Model\ChildWithNullable $child_with_nullable request body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testNullable'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function testNullableWithHttpInfo($child_with_nullable, string $contentType = self::contentTypes['testNullable'][0]) + { + $request = $this->testNullableRequest($child_with_nullable, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation testNullableAsync + * + * test nullable parent property + * + * @param \OpenAPI\Client\Model\ChildWithNullable $child_with_nullable request body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testNullable'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testNullableAsync($child_with_nullable, string $contentType = self::contentTypes['testNullable'][0]) + { + return $this->testNullableAsyncWithHttpInfo($child_with_nullable, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testNullableAsyncWithHttpInfo + * + * test nullable parent property + * + * @param \OpenAPI\Client\Model\ChildWithNullable $child_with_nullable request body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testNullable'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testNullableAsyncWithHttpInfo($child_with_nullable, string $contentType = self::contentTypes['testNullable'][0]) + { + $returnType = ''; + $request = $this->testNullableRequest($child_with_nullable, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testNullable' + * + * @param \OpenAPI\Client\Model\ChildWithNullable $child_with_nullable request body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testNullable'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testNullableRequest($child_with_nullable, string $contentType = self::contentTypes['testNullable'][0]) + { + + // verify the required parameter 'child_with_nullable' is set + if ($child_with_nullable === null || (is_array($child_with_nullable) && count($child_with_nullable) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $child_with_nullable when calling testNullable' + ); + } + + + $resourcePath = '/fake/nullable'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + [], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($child_with_nullable)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($child_with_nullable)); + } else { + $httpBody = $child_with_nullable; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation testQueryParameterCollectionFormat * diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ChildWithNullable.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ChildWithNullable.php new file mode 100644 index 000000000000..1dea6bea779e --- /dev/null +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ChildWithNullable.php @@ -0,0 +1,403 @@ + + */ +class ChildWithNullable extends ParentWithNullable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ChildWithNullable'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'other_property' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'other_property' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'other_property' => 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 + parent::openAPITypes(); + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats + parent::openAPIFormats(); + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables + parent::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 = [ + 'other_property' => 'otherProperty' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'other_property' => 'setOtherProperty' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'other_property' => 'getOtherProperty' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return parent::attributeMap() + self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return parent::setters() + self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return parent::getters() + self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + parent::__construct($data); + + $this->setIfExists('other_property', $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 = parent::listInvalidProperties(); + + 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 other_property + * + * @return string|null + */ + public function getOtherProperty() + { + return $this->container['other_property']; + } + + /** + * Sets other_property + * + * @param string|null $other_property other_property + * + * @return self + */ + public function setOtherProperty($other_property) + { + if (is_null($other_property)) { + throw new \InvalidArgumentException('non-nullable other_property cannot be null'); + } + $this->container['other_property'] = $other_property; + + 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-nextgen/OpenAPIClient-php/src/Model/ParentWithNullable.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ParentWithNullable.php new file mode 100644 index 000000000000..e000ef7cf5f0 --- /dev/null +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ParentWithNullable.php @@ -0,0 +1,485 @@ + + */ +class ParentWithNullable implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = 'type'; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ParentWithNullable'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'nullable_property' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'nullable_property' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'type' => false, + 'nullable_property' => true + ]; + + /** + * 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 = [ + 'type' => 'type', + 'nullable_property' => 'nullableProperty' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'nullable_property' => 'setNullableProperty' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'nullable_property' => 'getNullableProperty' + ]; + + /** + * 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; + } + + public const TYPE_CHILD_WITH_NULLABLE = 'ChildWithNullable'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CHILD_WITH_NULLABLE, + ]; + } + + /** + * 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('type', $data ?? [], null); + $this->setIfExists('nullable_property', $data ?? [], null); + + // Initialize discriminator property with the model name. + $this->container['type'] = static::$openAPIModelName; + } + + /** + * 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 = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + 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 type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type type + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets nullable_property + * + * @return string|null + */ + public function getNullableProperty() + { + return $this->container['nullable_property']; + } + + /** + * Sets nullable_property + * + * @param string|null $nullable_property nullable_property + * + * @return self + */ + public function setNullableProperty($nullable_property) + { + if (is_null($nullable_property)) { + array_push($this->openAPINullablesSetToNull, 'nullable_property'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('nullable_property', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['nullable_property'] = $nullable_property; + + 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-nextgen/OpenAPIClient-php/tests/Model/ChildWithNullableTest.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/tests/Model/ChildWithNullableTest.php new file mode 100644 index 000000000000..ec5f69960a56 --- /dev/null +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/tests/Model/ChildWithNullableTest.php @@ -0,0 +1,90 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "other_property" + */ + public function testPropertyOtherProperty() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/tests/Model/ParentWithNullableTest.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/tests/Model/ParentWithNullableTest.php new file mode 100644 index 000000000000..05f491afca8b --- /dev/null +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/tests/Model/ParentWithNullableTest.php @@ -0,0 +1,99 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "type" + */ + public function testPropertyType() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "nullable_property" + */ + public function testPropertyNullableProperty() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/ModelMapping.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/ModelMapping.ps1 new file mode 100644 index 000000000000..5ec4e8b92f18 --- /dev/null +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/ModelMapping.ps1 @@ -0,0 +1,97 @@ +# +# OpenAPI Petstore +# 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 Name +No description available. +.OUTPUTS + +ModelMapping +#> + +function Initialize-PSModelMapping { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] + [String] + ${Name} + ) + + Process { + 'Creating PSCustomObject: PSPetstore => PSModelMapping' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + + $PSO = [PSCustomObject]@{ + "name" = ${Name} + } + + + return $PSO + } +} + +<# +.SYNOPSIS + +Convert from JSON to ModelMapping + +.DESCRIPTION + +Convert from JSON to ModelMapping + +.PARAMETER Json + +Json object + +.OUTPUTS + +ModelMapping +#> +function ConvertFrom-PSJsonToModelMapping { + Param( + [AllowEmptyString()] + [string]$Json + ) + + Process { + 'Converting JSON to PSCustomObject: PSPetstore => PSModelMapping' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $JsonParameters = ConvertFrom-Json -InputObject $Json + + # check if Json contains properties not defined in PSModelMapping + $AllProperties = ("name") + 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 "name"))) { #optional property not found + $Name = $null + } else { + $Name = $JsonParameters.PSobject.Properties["name"].value + } + + $PSO = [PSCustomObject]@{ + "name" = ${Name} + } + + return $PSO + } + +} + diff --git a/samples/client/petstore/powershell/tests/Model/ModelMapping.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/ModelMapping.Tests.ps1 new file mode 100644 index 000000000000..c6c051a88bd3 --- /dev/null +++ b/samples/client/petstore/powershell/tests/Model/ModelMapping.Tests.ps1 @@ -0,0 +1,17 @@ +# +# OpenAPI Petstore +# 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 'PSModelMapping' { + Context 'PSModelMapping' { + It 'Initialize-PSModelMapping' { + # a simple test to create an object + #$NewObject = Initialize-PSModelMapping -Name "TEST_VALUE" + #$NewObject | Should -BeOfType ModelMapping + #$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 ed16a1e03d1c..f005dcee5522 100644 --- a/samples/client/petstore/ruby-autoload/.openapi-generator/FILES +++ b/samples/client/petstore/ruby-autoload/.openapi-generator/FILES @@ -17,6 +17,7 @@ docs/ArrayTest.md docs/Capitalization.md docs/Cat.md docs/Category.md +docs/ChildWithNullable.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md @@ -51,6 +52,7 @@ docs/OuterEnumDefaultValue.md docs/OuterEnumInteger.md docs/OuterEnumIntegerDefaultValue.md docs/OuterObjectWithEnumProperty.md +docs/ParentWithNullable.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md @@ -82,6 +84,7 @@ lib/petstore/models/array_test.rb lib/petstore/models/capitalization.rb lib/petstore/models/cat.rb lib/petstore/models/category.rb +lib/petstore/models/child_with_nullable.rb lib/petstore/models/class_model.rb lib/petstore/models/client.rb lib/petstore/models/deprecated_object.rb @@ -113,6 +116,7 @@ lib/petstore/models/outer_enum_default_value.rb lib/petstore/models/outer_enum_integer.rb lib/petstore/models/outer_enum_integer_default_value.rb lib/petstore/models/outer_object_with_enum_property.rb +lib/petstore/models/parent_with_nullable.rb lib/petstore/models/pet.rb lib/petstore/models/read_only_first.rb lib/petstore/models/single_ref_type.rb diff --git a/samples/client/petstore/ruby-autoload/README.md b/samples/client/petstore/ruby-autoload/README.md index 24656471c4bc..ee269a91bf61 100644 --- a/samples/client/petstore/ruby-autoload/README.md +++ b/samples/client/petstore/ruby-autoload/README.md @@ -94,6 +94,7 @@ Class | Method | HTTP request | Description *Petstore::FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *Petstore::FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *Petstore::FakeApi* | [**test_json_form_data**](docs/FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data +*Petstore::FakeApi* | [**test_nullable**](docs/FakeApi.md#test_nullable) | **POST** /fake/nullable | test nullable parent property *Petstore::FakeApi* | [**test_query_parameter_collection_format**](docs/FakeApi.md#test_query_parameter_collection_format) | **PUT** /fake/test-query-parameters | *Petstore::FakeClassnameTags123Api* | [**test_classname**](docs/FakeClassnameTags123Api.md#test_classname) | **PATCH** /fake_classname_test | To test class name in snake case *Petstore::PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store @@ -131,6 +132,7 @@ Class | Method | HTTP request | Description - [Petstore::Capitalization](docs/Capitalization.md) - [Petstore::Cat](docs/Cat.md) - [Petstore::Category](docs/Category.md) + - [Petstore::ChildWithNullable](docs/ChildWithNullable.md) - [Petstore::ClassModel](docs/ClassModel.md) - [Petstore::Client](docs/Client.md) - [Petstore::DeprecatedObject](docs/DeprecatedObject.md) @@ -162,6 +164,7 @@ Class | Method | HTTP request | Description - [Petstore::OuterEnumInteger](docs/OuterEnumInteger.md) - [Petstore::OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) - [Petstore::OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) + - [Petstore::ParentWithNullable](docs/ParentWithNullable.md) - [Petstore::Pet](docs/Pet.md) - [Petstore::ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Petstore::SingleRefType](docs/SingleRefType.md) diff --git a/samples/client/petstore/ruby-autoload/docs/ChildWithNullable.md b/samples/client/petstore/ruby-autoload/docs/ChildWithNullable.md new file mode 100644 index 000000000000..3e6ffffc4d30 --- /dev/null +++ b/samples/client/petstore/ruby-autoload/docs/ChildWithNullable.md @@ -0,0 +1,18 @@ +# Petstore::ChildWithNullable + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **other_property** | **String** | | [optional] | + +## Example + +```ruby +require 'petstore' + +instance = Petstore::ChildWithNullable.new( + other_property: null +) +``` + diff --git a/samples/client/petstore/ruby-autoload/docs/FakeApi.md b/samples/client/petstore/ruby-autoload/docs/FakeApi.md index 505e754f5ed4..3980b6c60d27 100644 --- a/samples/client/petstore/ruby-autoload/docs/FakeApi.md +++ b/samples/client/petstore/ruby-autoload/docs/FakeApi.md @@ -21,6 +21,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | [**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | | [**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**test_nullable**](FakeApi.md#test_nullable) | **POST** /fake/nullable | test nullable parent property | | [**test_query_parameter_collection_format**](FakeApi.md#test_query_parameter_collection_format) | **PUT** /fake/test-query-parameters | | @@ -1181,6 +1182,69 @@ No authorization required - **Accept**: Not defined +## test_nullable + +> test_nullable(child_with_nullable) + +test nullable parent property + + + +### Examples + +```ruby +require 'time' +require 'petstore' + +api_instance = Petstore::FakeApi.new +child_with_nullable = Petstore::ChildWithNullable.new # ChildWithNullable | request body + +begin + # test nullable parent property + api_instance.test_nullable(child_with_nullable) +rescue Petstore::ApiError => e + puts "Error when calling FakeApi->test_nullable: #{e}" +end +``` + +#### Using the test_nullable_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> test_nullable_with_http_info(child_with_nullable) + +```ruby +begin + # test nullable parent property + data, status_code, headers = api_instance.test_nullable_with_http_info(child_with_nullable) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue Petstore::ApiError => e + puts "Error when calling FakeApi->test_nullable_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **child_with_nullable** | [**ChildWithNullable**](ChildWithNullable.md) | request body | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + ## test_query_parameter_collection_format > test_query_parameter_collection_format(pipe, ioutil, http, url, context, allow_empty, opts) diff --git a/samples/client/petstore/ruby-autoload/docs/ParentWithNullable.md b/samples/client/petstore/ruby-autoload/docs/ParentWithNullable.md new file mode 100644 index 000000000000..0c77bf999dcb --- /dev/null +++ b/samples/client/petstore/ruby-autoload/docs/ParentWithNullable.md @@ -0,0 +1,20 @@ +# Petstore::ParentWithNullable + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | | [optional] | +| **nullable_property** | **String** | | [optional] | + +## Example + +```ruby +require 'petstore' + +instance = Petstore::ParentWithNullable.new( + type: null, + nullable_property: null +) +``` + diff --git a/samples/client/petstore/ruby-autoload/lib/petstore.rb b/samples/client/petstore/ruby-autoload/lib/petstore.rb index 4fc54294b592..c4354c2b3123 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore.rb @@ -27,6 +27,7 @@ Petstore.autoload :Capitalization, 'petstore/models/capitalization' Petstore.autoload :Cat, 'petstore/models/cat' Petstore.autoload :Category, 'petstore/models/category' +Petstore.autoload :ChildWithNullable, 'petstore/models/child_with_nullable' Petstore.autoload :ClassModel, 'petstore/models/class_model' Petstore.autoload :Client, 'petstore/models/client' Petstore.autoload :DeprecatedObject, 'petstore/models/deprecated_object' @@ -58,6 +59,7 @@ Petstore.autoload :OuterEnumInteger, 'petstore/models/outer_enum_integer' Petstore.autoload :OuterEnumIntegerDefaultValue, 'petstore/models/outer_enum_integer_default_value' Petstore.autoload :OuterObjectWithEnumProperty, 'petstore/models/outer_object_with_enum_property' +Petstore.autoload :ParentWithNullable, 'petstore/models/parent_with_nullable' Petstore.autoload :Pet, 'petstore/models/pet' Petstore.autoload :ReadOnlyFirst, 'petstore/models/read_only_first' Petstore.autoload :SingleRefType, 'petstore/models/single_ref_type' diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb index 554b0a48bc05..06e12cd00e55 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb @@ -1294,6 +1294,72 @@ def test_json_form_data_with_http_info(param, param2, opts = {}) return data, status_code, headers end + # test nullable parent property + # + # @param child_with_nullable [ChildWithNullable] request body + # @param [Hash] opts the optional parameters + # @return [nil] + def test_nullable(child_with_nullable, opts = {}) + test_nullable_with_http_info(child_with_nullable, opts) + nil + end + + # test nullable parent property + # + # @param child_with_nullable [ChildWithNullable] request body + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def test_nullable_with_http_info(child_with_nullable, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FakeApi.test_nullable ...' + end + # verify the required parameter 'child_with_nullable' is set + if @api_client.config.client_side_validation && child_with_nullable.nil? + fail ArgumentError, "Missing the required parameter 'child_with_nullable' when calling FakeApi.test_nullable" + end + # resource path + local_var_path = '/fake/nullable' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(child_with_nullable) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"FakeApi.test_nullable", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FakeApi#test_nullable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # To test the collection format in query parameters # @param pipe [Array] # @param ioutil [Array] diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/child_with_nullable.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/child_with_nullable.rb new file mode 100644 index 000000000000..e4027d5a7a0f --- /dev/null +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/child_with_nullable.rb @@ -0,0 +1,247 @@ +=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.1-SNAPSHOT + +=end + +require 'date' +require 'time' + +module Petstore + class ChildWithNullable < ParentWithNullable + attr_accessor :other_property + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'other_property' => :'otherProperty' + } + end + + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) + def self.acceptable_attributes + attribute_map.values.concat(superclass.acceptable_attributes) + end + + # Attribute type mapping. + def self.openapi_types + { + :'other_property' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'ParentWithNullable' + ] + 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::ChildWithNullable` 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::ChildWithNullable`. 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 + } + + # call parent's initialize + super(attributes) + + if attributes.key?(:'other_property') + self.other_property = attributes[:'other_property'] + 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 + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = super + 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? + warn '[DEPRECATED] the `valid?` method is obsolete' + true && super + 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 && + other_property == o.other_property && super(o) + 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 + [other_property].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) + return nil unless attributes.is_a?(Hash) + super(attributes) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{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[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._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 = super + 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/parent_with_nullable.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/parent_with_nullable.rb new file mode 100644 index 000000000000..80d5b087caa7 --- /dev/null +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/parent_with_nullable.rb @@ -0,0 +1,263 @@ +=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.1-SNAPSHOT + +=end + +require 'date' +require 'time' + +module Petstore + class ParentWithNullable + attr_accessor :type + + attr_accessor :nullable_property + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'nullable_property' => :'nullableProperty' + } + 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 + { + :'type' => :'String', + :'nullable_property' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'nullable_property' + ]) + end + + # discriminator's property name in OpenAPI v3 + def self.openapi_discriminator_name + :'type' + 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::ParentWithNullable` 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::ParentWithNullable`. 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?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'nullable_property') + self.nullable_property = attributes[:'nullable_property'] + 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 + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + 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? + warn '[DEPRECATED] the `valid?` method is obsolete' + type_validator = EnumAttributeValidator.new('String', ["ChildWithNullable"]) + return false unless type_validator.valid?(@type) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ["ChildWithNullable"]) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + 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 && + type == o.type && + nullable_property == o.nullable_property + 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 + [type, nullable_property].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) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{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[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._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/child_with_nullable_spec.rb b/samples/client/petstore/ruby-autoload/spec/models/child_with_nullable_spec.rb new file mode 100644 index 000000000000..2858c0502dbb --- /dev/null +++ b/samples/client/petstore/ruby-autoload/spec/models/child_with_nullable_spec.rb @@ -0,0 +1,34 @@ +=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.1-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::ChildWithNullable +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Petstore::ChildWithNullable do + let(:instance) { Petstore::ChildWithNullable.new } + + describe 'test an instance of ChildWithNullable' do + it 'should create an instance of ChildWithNullable' do + expect(instance).to be_instance_of(Petstore::ChildWithNullable) + end + end + describe 'test attribute "other_property"' 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/parent_with_nullable_spec.rb b/samples/client/petstore/ruby-autoload/spec/models/parent_with_nullable_spec.rb new file mode 100644 index 000000000000..763820497048 --- /dev/null +++ b/samples/client/petstore/ruby-autoload/spec/models/parent_with_nullable_spec.rb @@ -0,0 +1,44 @@ +=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.1-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::ParentWithNullable +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Petstore::ParentWithNullable do + let(:instance) { Petstore::ParentWithNullable.new } + + describe 'test an instance of ParentWithNullable' do + it 'should create an instance of ParentWithNullable' do + expect(instance).to be_instance_of(Petstore::ParentWithNullable) + end + end + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ChildWithNullable"]) + # validator.allowable_values.each do |value| + # expect { instance.type = value }.not_to raise_error + # end + end + end + + describe 'test attribute "nullable_property"' 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 ed16a1e03d1c..f005dcee5522 100644 --- a/samples/client/petstore/ruby-faraday/.openapi-generator/FILES +++ b/samples/client/petstore/ruby-faraday/.openapi-generator/FILES @@ -17,6 +17,7 @@ docs/ArrayTest.md docs/Capitalization.md docs/Cat.md docs/Category.md +docs/ChildWithNullable.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md @@ -51,6 +52,7 @@ docs/OuterEnumDefaultValue.md docs/OuterEnumInteger.md docs/OuterEnumIntegerDefaultValue.md docs/OuterObjectWithEnumProperty.md +docs/ParentWithNullable.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md @@ -82,6 +84,7 @@ lib/petstore/models/array_test.rb lib/petstore/models/capitalization.rb lib/petstore/models/cat.rb lib/petstore/models/category.rb +lib/petstore/models/child_with_nullable.rb lib/petstore/models/class_model.rb lib/petstore/models/client.rb lib/petstore/models/deprecated_object.rb @@ -113,6 +116,7 @@ lib/petstore/models/outer_enum_default_value.rb lib/petstore/models/outer_enum_integer.rb lib/petstore/models/outer_enum_integer_default_value.rb lib/petstore/models/outer_object_with_enum_property.rb +lib/petstore/models/parent_with_nullable.rb lib/petstore/models/pet.rb lib/petstore/models/read_only_first.rb lib/petstore/models/single_ref_type.rb diff --git a/samples/client/petstore/ruby-faraday/README.md b/samples/client/petstore/ruby-faraday/README.md index 24656471c4bc..ee269a91bf61 100644 --- a/samples/client/petstore/ruby-faraday/README.md +++ b/samples/client/petstore/ruby-faraday/README.md @@ -94,6 +94,7 @@ Class | Method | HTTP request | Description *Petstore::FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *Petstore::FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *Petstore::FakeApi* | [**test_json_form_data**](docs/FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data +*Petstore::FakeApi* | [**test_nullable**](docs/FakeApi.md#test_nullable) | **POST** /fake/nullable | test nullable parent property *Petstore::FakeApi* | [**test_query_parameter_collection_format**](docs/FakeApi.md#test_query_parameter_collection_format) | **PUT** /fake/test-query-parameters | *Petstore::FakeClassnameTags123Api* | [**test_classname**](docs/FakeClassnameTags123Api.md#test_classname) | **PATCH** /fake_classname_test | To test class name in snake case *Petstore::PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store @@ -131,6 +132,7 @@ Class | Method | HTTP request | Description - [Petstore::Capitalization](docs/Capitalization.md) - [Petstore::Cat](docs/Cat.md) - [Petstore::Category](docs/Category.md) + - [Petstore::ChildWithNullable](docs/ChildWithNullable.md) - [Petstore::ClassModel](docs/ClassModel.md) - [Petstore::Client](docs/Client.md) - [Petstore::DeprecatedObject](docs/DeprecatedObject.md) @@ -162,6 +164,7 @@ Class | Method | HTTP request | Description - [Petstore::OuterEnumInteger](docs/OuterEnumInteger.md) - [Petstore::OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) - [Petstore::OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) + - [Petstore::ParentWithNullable](docs/ParentWithNullable.md) - [Petstore::Pet](docs/Pet.md) - [Petstore::ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Petstore::SingleRefType](docs/SingleRefType.md) diff --git a/samples/client/petstore/ruby-faraday/docs/ChildWithNullable.md b/samples/client/petstore/ruby-faraday/docs/ChildWithNullable.md new file mode 100644 index 000000000000..3e6ffffc4d30 --- /dev/null +++ b/samples/client/petstore/ruby-faraday/docs/ChildWithNullable.md @@ -0,0 +1,18 @@ +# Petstore::ChildWithNullable + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **other_property** | **String** | | [optional] | + +## Example + +```ruby +require 'petstore' + +instance = Petstore::ChildWithNullable.new( + other_property: null +) +``` + diff --git a/samples/client/petstore/ruby-faraday/docs/FakeApi.md b/samples/client/petstore/ruby-faraday/docs/FakeApi.md index 505e754f5ed4..3980b6c60d27 100644 --- a/samples/client/petstore/ruby-faraday/docs/FakeApi.md +++ b/samples/client/petstore/ruby-faraday/docs/FakeApi.md @@ -21,6 +21,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | [**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | | [**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**test_nullable**](FakeApi.md#test_nullable) | **POST** /fake/nullable | test nullable parent property | | [**test_query_parameter_collection_format**](FakeApi.md#test_query_parameter_collection_format) | **PUT** /fake/test-query-parameters | | @@ -1181,6 +1182,69 @@ No authorization required - **Accept**: Not defined +## test_nullable + +> test_nullable(child_with_nullable) + +test nullable parent property + + + +### Examples + +```ruby +require 'time' +require 'petstore' + +api_instance = Petstore::FakeApi.new +child_with_nullable = Petstore::ChildWithNullable.new # ChildWithNullable | request body + +begin + # test nullable parent property + api_instance.test_nullable(child_with_nullable) +rescue Petstore::ApiError => e + puts "Error when calling FakeApi->test_nullable: #{e}" +end +``` + +#### Using the test_nullable_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> test_nullable_with_http_info(child_with_nullable) + +```ruby +begin + # test nullable parent property + data, status_code, headers = api_instance.test_nullable_with_http_info(child_with_nullable) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue Petstore::ApiError => e + puts "Error when calling FakeApi->test_nullable_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **child_with_nullable** | [**ChildWithNullable**](ChildWithNullable.md) | request body | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + ## test_query_parameter_collection_format > test_query_parameter_collection_format(pipe, ioutil, http, url, context, allow_empty, opts) diff --git a/samples/client/petstore/ruby-faraday/docs/ParentWithNullable.md b/samples/client/petstore/ruby-faraday/docs/ParentWithNullable.md new file mode 100644 index 000000000000..0c77bf999dcb --- /dev/null +++ b/samples/client/petstore/ruby-faraday/docs/ParentWithNullable.md @@ -0,0 +1,20 @@ +# Petstore::ParentWithNullable + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | | [optional] | +| **nullable_property** | **String** | | [optional] | + +## Example + +```ruby +require 'petstore' + +instance = Petstore::ParentWithNullable.new( + type: null, + nullable_property: null +) +``` + diff --git a/samples/client/petstore/ruby-faraday/lib/petstore.rb b/samples/client/petstore/ruby-faraday/lib/petstore.rb index 2a1517673953..6c6330b609ea 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore.rb @@ -56,6 +56,7 @@ require 'petstore/models/outer_enum_integer' require 'petstore/models/outer_enum_integer_default_value' require 'petstore/models/outer_object_with_enum_property' +require 'petstore/models/parent_with_nullable' require 'petstore/models/pet' require 'petstore/models/read_only_first' require 'petstore/models/single_ref_type' @@ -63,6 +64,7 @@ require 'petstore/models/tag' require 'petstore/models/user' require 'petstore/models/cat' +require 'petstore/models/child_with_nullable' require 'petstore/models/dog' # APIs diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb index 554b0a48bc05..06e12cd00e55 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb @@ -1294,6 +1294,72 @@ def test_json_form_data_with_http_info(param, param2, opts = {}) return data, status_code, headers end + # test nullable parent property + # + # @param child_with_nullable [ChildWithNullable] request body + # @param [Hash] opts the optional parameters + # @return [nil] + def test_nullable(child_with_nullable, opts = {}) + test_nullable_with_http_info(child_with_nullable, opts) + nil + end + + # test nullable parent property + # + # @param child_with_nullable [ChildWithNullable] request body + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def test_nullable_with_http_info(child_with_nullable, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FakeApi.test_nullable ...' + end + # verify the required parameter 'child_with_nullable' is set + if @api_client.config.client_side_validation && child_with_nullable.nil? + fail ArgumentError, "Missing the required parameter 'child_with_nullable' when calling FakeApi.test_nullable" + end + # resource path + local_var_path = '/fake/nullable' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(child_with_nullable) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"FakeApi.test_nullable", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FakeApi#test_nullable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # To test the collection format in query parameters # @param pipe [Array] # @param ioutil [Array] diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/child_with_nullable.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/child_with_nullable.rb new file mode 100644 index 000000000000..e4027d5a7a0f --- /dev/null +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/child_with_nullable.rb @@ -0,0 +1,247 @@ +=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.1-SNAPSHOT + +=end + +require 'date' +require 'time' + +module Petstore + class ChildWithNullable < ParentWithNullable + attr_accessor :other_property + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'other_property' => :'otherProperty' + } + end + + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) + def self.acceptable_attributes + attribute_map.values.concat(superclass.acceptable_attributes) + end + + # Attribute type mapping. + def self.openapi_types + { + :'other_property' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'ParentWithNullable' + ] + 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::ChildWithNullable` 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::ChildWithNullable`. 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 + } + + # call parent's initialize + super(attributes) + + if attributes.key?(:'other_property') + self.other_property = attributes[:'other_property'] + 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 + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = super + 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? + warn '[DEPRECATED] the `valid?` method is obsolete' + true && super + 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 && + other_property == o.other_property && super(o) + 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 + [other_property].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) + return nil unless attributes.is_a?(Hash) + super(attributes) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{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[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._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 = super + 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/parent_with_nullable.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/parent_with_nullable.rb new file mode 100644 index 000000000000..80d5b087caa7 --- /dev/null +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/parent_with_nullable.rb @@ -0,0 +1,263 @@ +=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.1-SNAPSHOT + +=end + +require 'date' +require 'time' + +module Petstore + class ParentWithNullable + attr_accessor :type + + attr_accessor :nullable_property + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'nullable_property' => :'nullableProperty' + } + 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 + { + :'type' => :'String', + :'nullable_property' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'nullable_property' + ]) + end + + # discriminator's property name in OpenAPI v3 + def self.openapi_discriminator_name + :'type' + 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::ParentWithNullable` 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::ParentWithNullable`. 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?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'nullable_property') + self.nullable_property = attributes[:'nullable_property'] + 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 + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + 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? + warn '[DEPRECATED] the `valid?` method is obsolete' + type_validator = EnumAttributeValidator.new('String', ["ChildWithNullable"]) + return false unless type_validator.valid?(@type) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ["ChildWithNullable"]) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + 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 && + type == o.type && + nullable_property == o.nullable_property + 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 + [type, nullable_property].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) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{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[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._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/child_with_nullable_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/child_with_nullable_spec.rb new file mode 100644 index 000000000000..2858c0502dbb --- /dev/null +++ b/samples/client/petstore/ruby-faraday/spec/models/child_with_nullable_spec.rb @@ -0,0 +1,34 @@ +=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.1-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::ChildWithNullable +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Petstore::ChildWithNullable do + let(:instance) { Petstore::ChildWithNullable.new } + + describe 'test an instance of ChildWithNullable' do + it 'should create an instance of ChildWithNullable' do + expect(instance).to be_instance_of(Petstore::ChildWithNullable) + end + end + describe 'test attribute "other_property"' 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/parent_with_nullable_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/parent_with_nullable_spec.rb new file mode 100644 index 000000000000..763820497048 --- /dev/null +++ b/samples/client/petstore/ruby-faraday/spec/models/parent_with_nullable_spec.rb @@ -0,0 +1,44 @@ +=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.1-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::ParentWithNullable +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Petstore::ParentWithNullable do + let(:instance) { Petstore::ParentWithNullable.new } + + describe 'test an instance of ParentWithNullable' do + it 'should create an instance of ParentWithNullable' do + expect(instance).to be_instance_of(Petstore::ParentWithNullable) + end + end + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ChildWithNullable"]) + # validator.allowable_values.each do |value| + # expect { instance.type = value }.not_to raise_error + # end + end + end + + describe 'test attribute "nullable_property"' 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 cce4fef430c6..f91496ca5b57 100644 --- a/samples/client/petstore/spring-http-interface-reactive/.openapi-generator/FILES +++ b/samples/client/petstore/spring-http-interface-reactive/.openapi-generator/FILES @@ -23,6 +23,7 @@ src/main/java/org/openapitools/model/BigCat.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ChildWithNullable.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 @@ -46,6 +47,7 @@ src/main/java/org/openapitools/model/NumberOnly.java src/main/java/org/openapitools/model/Order.java src/main/java/org/openapitools/model/OuterComposite.java src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/ParentWithNullable.java src/main/java/org/openapitools/model/Pet.java src/main/java/org/openapitools/model/ReadOnlyFirst.java src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java index 723d5e8c348c..537d7e748a60 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -321,6 +322,24 @@ Mono> testJsonFormData( ); + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/nullable", + accept = "application/json", + contentType = "application/json" + ) + Mono> testNullable( + @RequestBody Mono childWithNullable + ); + + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ChildWithNullable.java new file mode 100644 index 000000000000..dc42ffccaf90 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -0,0 +1,111 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ChildWithNullable + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @JsonProperty("otherProperty") + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullable type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullable nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java new file mode 100644 index 000000000000..9b071569af21 --- /dev/null +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -0,0 +1,163 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ParentWithNullable + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ParentWithNullable { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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 3dc47a340214..69906eac967c 100644 --- a/samples/client/petstore/spring-http-interface/.openapi-generator/FILES +++ b/samples/client/petstore/spring-http-interface/.openapi-generator/FILES @@ -24,6 +24,7 @@ src/main/java/org/openapitools/model/BigCatDto.java src/main/java/org/openapitools/model/CapitalizationDto.java src/main/java/org/openapitools/model/CatDto.java src/main/java/org/openapitools/model/CategoryDto.java +src/main/java/org/openapitools/model/ChildWithNullableDto.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 @@ -45,6 +46,7 @@ src/main/java/org/openapitools/model/NumberOnlyDto.java src/main/java/org/openapitools/model/OrderDto.java src/main/java/org/openapitools/model/OuterCompositeDto.java src/main/java/org/openapitools/model/OuterEnumDto.java +src/main/java/org/openapitools/model/ParentWithNullableDto.java src/main/java/org/openapitools/model/PetDto.java src/main/java/org/openapitools/model/ReadOnlyFirstDto.java src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java index cd1c35c6adbf..de4747c2d4c0 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullableDto; import org.openapitools.model.ClientDto; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClassDto; @@ -317,6 +318,24 @@ ResponseEntity testJsonFormData( ); + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullableDto request body (required) + * @return successful operation (status code 200) + */ + @HttpExchange( + method = "POST", + value = "/fake/nullable", + accept = "application/json", + contentType = "application/json" + ) + ResponseEntity testNullable( + @RequestBody ChildWithNullableDto childWithNullableDto + ); + + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ChildWithNullableDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ChildWithNullableDto.java new file mode 100644 index 000000000000..2a21344c37b7 --- /dev/null +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ChildWithNullableDto.java @@ -0,0 +1,113 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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 java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullableDto; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ChildWithNullableDto + */ + + +@JsonTypeName("ChildWithNullable") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ChildWithNullableDto extends ParentWithNullableDto { + + private String otherProperty; + + public ChildWithNullableDto otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @JsonProperty("otherProperty") + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullableDto type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullableDto nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullableDto childWithNullable = (ChildWithNullableDto) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullableDto {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/src/main/java/org/openapitools/model/ParentWithNullableDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ParentWithNullableDto.java new file mode 100644 index 000000000000..ee8d6b570d0c --- /dev/null +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ParentWithNullableDto.java @@ -0,0 +1,164 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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 java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.constraints.NotNull; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * ParentWithNullableDto + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullableDto.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ParentWithNullableDto { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullableDto type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullableDto nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullableDto parentWithNullable = (ParentWithNullableDto) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullableDto {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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/typescript-fetch/builds/default-v3.0/.openapi-generator/FILES b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/FILES index 0015dca0c838..ac49dcd75a09 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 @@ -16,6 +16,7 @@ models/ArrayTest.ts models/Capitalization.ts models/Cat.ts models/Category.ts +models/ChildWithNullable.ts models/ClassModel.ts models/Client.ts models/DeprecatedObject.ts @@ -47,6 +48,7 @@ models/OuterEnumDefaultValue.ts models/OuterEnumInteger.ts models/OuterEnumIntegerDefaultValue.ts models/OuterObjectWithEnumProperty.ts +models/ParentWithNullable.ts models/Pet.ts models/ReadOnlyFirst.ts models/Return.ts diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeApi.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeApi.ts index 0d9ea6361d7c..06eb695d3fa6 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/FakeApi.ts @@ -15,6 +15,7 @@ import * as runtime from '../runtime'; import type { + ChildWithNullable, Client, EnumClass, FakeBigDecimalMap200Response, @@ -26,6 +27,8 @@ import type { User, } from '../models/index'; import { + ChildWithNullableFromJSON, + ChildWithNullableToJSON, ClientFromJSON, ClientToJSON, EnumClassFromJSON, @@ -136,6 +139,10 @@ export interface TestJsonFormDataRequest { param2: string; } +export interface TestNullableRequest { + childWithNullable: ChildWithNullable; +} + export interface TestQueryParameterCollectionFormatRequest { pipe: Array; ioutil: Array; @@ -901,6 +908,40 @@ export class FakeApi extends runtime.BaseAPI { await this.testJsonFormDataRaw(requestParameters, initOverrides); } + /** + * + * test nullable parent property + */ + async testNullableRaw(requestParameters: TestNullableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.childWithNullable === null || requestParameters.childWithNullable === undefined) { + throw new runtime.RequiredError('childWithNullable','Required parameter requestParameters.childWithNullable was null or undefined when calling testNullable.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + const response = await this.request({ + path: `/fake/nullable`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ChildWithNullableToJSON(requestParameters.childWithNullable), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * + * test nullable parent property + */ + async testNullable(requestParameters: TestNullableRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.testNullableRaw(requestParameters, initOverrides); + } + /** * To test the collection format in query parameters */ diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ChildWithNullable.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ChildWithNullable.ts new file mode 100644 index 000000000000..4f53b0070e4b --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ChildWithNullable.ts @@ -0,0 +1,74 @@ +/* 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'; +import type { ParentWithNullable } from './ParentWithNullable'; +import { + ParentWithNullableFromJSON, + ParentWithNullableFromJSONTyped, + ParentWithNullableToJSON, +} from './ParentWithNullable'; + +/** + * + * @export + * @interface ChildWithNullable + */ +export interface ChildWithNullable extends ParentWithNullable { + /** + * + * @type {string} + * @memberof ChildWithNullable + */ + otherProperty?: string; +} + + + +/** + * Check if a given object implements the ChildWithNullable interface. + */ +export function instanceOfChildWithNullable(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function ChildWithNullableFromJSON(json: any): ChildWithNullable { + return ChildWithNullableFromJSONTyped(json, false); +} + +export function ChildWithNullableFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChildWithNullable { + if ((json === undefined) || (json === null)) { + return json; + } + return { + ...ParentWithNullableFromJSONTyped(json, ignoreDiscriminator), + 'otherProperty': !exists(json, 'otherProperty') ? undefined : json['otherProperty'], + }; +} + +export function ChildWithNullableToJSON(value?: ChildWithNullable | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + ...ParentWithNullableToJSON(value), + 'otherProperty': value.otherProperty, + }; +} + diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ParentWithNullable.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ParentWithNullable.ts new file mode 100644 index 000000000000..67c7574c229d --- /dev/null +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ParentWithNullable.ts @@ -0,0 +1,92 @@ +/* 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'; +import { + ChildWithNullableFromJSONTyped +} from './index'; + +/** + * + * @export + * @interface ParentWithNullable + */ +export interface ParentWithNullable { + /** + * + * @type {string} + * @memberof ParentWithNullable + */ + type?: ParentWithNullableTypeEnum; + /** + * + * @type {string} + * @memberof ParentWithNullable + */ + nullableProperty?: string | null; +} + + +/** + * @export + */ +export const ParentWithNullableTypeEnum = { + ChildWithNullable: 'ChildWithNullable' +} as const; +export type ParentWithNullableTypeEnum = typeof ParentWithNullableTypeEnum[keyof typeof ParentWithNullableTypeEnum]; + + +/** + * Check if a given object implements the ParentWithNullable interface. + */ +export function instanceOfParentWithNullable(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function ParentWithNullableFromJSON(json: any): ParentWithNullable { + return ParentWithNullableFromJSONTyped(json, false); +} + +export function ParentWithNullableFromJSONTyped(json: any, ignoreDiscriminator: boolean): ParentWithNullable { + if ((json === undefined) || (json === null)) { + return json; + } + if (!ignoreDiscriminator) { + if (json['type'] === 'ChildWithNullable') { + return ChildWithNullableFromJSONTyped(json, true); + } + } + return { + + 'type': !exists(json, 'type') ? undefined : json['type'], + 'nullableProperty': !exists(json, 'nullableProperty') ? undefined : json['nullableProperty'], + }; +} + +export function ParentWithNullableToJSON(value?: ParentWithNullable | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'nullableProperty': value.nullableProperty, + }; +} + 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 20b510f62cbf..1789038a2d95 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 @@ -9,6 +9,7 @@ export * from './ArrayTest'; export * from './Capitalization'; export * from './Cat'; export * from './Category'; +export * from './ChildWithNullable'; export * from './ClassModel'; export * from './Client'; export * from './DeprecatedObject'; @@ -40,6 +41,7 @@ export * from './OuterEnumDefaultValue'; export * from './OuterEnumInteger'; export * from './OuterEnumIntegerDefaultValue'; export * from './OuterObjectWithEnumProperty'; +export * from './ParentWithNullable'; export * from './Pet'; export * from './ReadOnlyFirst'; export * from './Return'; 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 fd331c256c8c..9507ce9ce3fb 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 @@ -13,6 +13,7 @@ doc/ArrayTest.md doc/Capitalization.md doc/Cat.md doc/Category.md +doc/ChildWithNullable.md doc/ClassModel.md doc/DefaultApi.md doc/DeprecatedObject.md @@ -47,6 +48,7 @@ doc/OuterEnumDefaultValue.md doc/OuterEnumInteger.md doc/OuterEnumIntegerDefaultValue.md doc/OuterObjectWithEnumProperty.md +doc/ParentWithNullable.md doc/Pet.md doc/PetApi.md doc/ReadOnlyFirst.md @@ -81,6 +83,7 @@ lib/src/model/array_test.dart lib/src/model/capitalization.dart lib/src/model/cat.dart lib/src/model/category.dart +lib/src/model/child_with_nullable.dart lib/src/model/class_model.dart lib/src/model/deprecated_object.dart lib/src/model/dog.dart @@ -112,6 +115,7 @@ lib/src/model/outer_enum_default_value.dart lib/src/model/outer_enum_integer.dart lib/src/model/outer_enum_integer_default_value.dart lib/src/model/outer_object_with_enum_property.dart +lib/src/model/parent_with_nullable.dart lib/src/model/pet.dart lib/src/model/read_only_first.dart lib/src/model/single_ref_type.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 8506db54bbfc..42ba566440d4 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 @@ -84,6 +84,7 @@ Class | Method | HTTP request | Description [*FakeApi*](doc/FakeApi.md) | [**testGroupParameters**](doc/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [*FakeApi*](doc/FakeApi.md) | [**testInlineAdditionalProperties**](doc/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [*FakeApi*](doc/FakeApi.md) | [**testJsonFormData**](doc/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +[*FakeApi*](doc/FakeApi.md) | [**testNullable**](doc/FakeApi.md#testnullable) | **POST** /fake/nullable | test nullable parent property [*FakeApi*](doc/FakeApi.md) | [**testQueryParameterCollectionFormat**](doc/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | [*FakeClassnameTags123Api*](doc/FakeClassnameTags123Api.md) | [**testClassname**](doc/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case [*PetApi*](doc/PetApi.md) | [**addPet**](doc/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store @@ -121,6 +122,7 @@ Class | Method | HTTP request | Description - [Capitalization](doc/Capitalization.md) - [Cat](doc/Cat.md) - [Category](doc/Category.md) + - [ChildWithNullable](doc/ChildWithNullable.md) - [ClassModel](doc/ClassModel.md) - [DeprecatedObject](doc/DeprecatedObject.md) - [Dog](doc/Dog.md) @@ -152,6 +154,7 @@ Class | Method | HTTP request | Description - [OuterEnumInteger](doc/OuterEnumInteger.md) - [OuterEnumIntegerDefaultValue](doc/OuterEnumIntegerDefaultValue.md) - [OuterObjectWithEnumProperty](doc/OuterObjectWithEnumProperty.md) + - [ParentWithNullable](doc/ParentWithNullable.md) - [Pet](doc/Pet.md) - [ReadOnlyFirst](doc/ReadOnlyFirst.md) - [SingleRefType](doc/SingleRefType.md) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ChildWithNullable.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ChildWithNullable.md new file mode 100644 index 000000000000..770494fcf4cc --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ChildWithNullable.md @@ -0,0 +1,17 @@ +# openapi.model.ChildWithNullable + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**nullableProperty** | **String** | | [optional] +**otherProperty** | **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/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeApi.md index 1587283037ec..41328617a637 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeApi.md @@ -26,6 +26,7 @@ Method | HTTP request | Description [**testGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**testJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +[**testNullable**](FakeApi.md#testnullable) | **POST** /fake/nullable | test nullable parent property [**testQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | @@ -800,6 +801,48 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **testNullable** +> testNullable(childWithNullable) + +test nullable parent property + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final ChildWithNullable childWithNullable = ; // ChildWithNullable | request body + +try { + api.testNullable(childWithNullable); +} catch on DioException (e) { + print('Exception when calling FakeApi->testNullable: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **testQueryParameterCollectionFormat** > testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ParentWithNullable.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ParentWithNullable.md new file mode 100644 index 000000000000..17aa5ca02941 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ParentWithNullable.md @@ -0,0 +1,16 @@ +# openapi.model.ParentWithNullable + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**nullableProperty** | **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 48d2103d57d9..81f241899a7d 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 @@ -26,6 +26,7 @@ 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/category.dart'; +export 'package:openapi/src/model/child_with_nullable.dart'; export 'package:openapi/src/model/class_model.dart'; export 'package:openapi/src/model/deprecated_object.dart'; export 'package:openapi/src/model/dog.dart'; @@ -57,6 +58,7 @@ export 'package:openapi/src/model/outer_enum_default_value.dart'; export 'package:openapi/src/model/outer_enum_integer.dart'; export 'package:openapi/src/model/outer_enum_integer_default_value.dart'; export 'package:openapi/src/model/outer_object_with_enum_property.dart'; +export 'package:openapi/src/model/parent_with_nullable.dart'; export 'package:openapi/src/model/pet.dart'; export 'package:openapi/src/model/read_only_first.dart'; export 'package:openapi/src/model/single_ref_type.dart'; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart index a6dd002c83cb..8335114effdc 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart @@ -9,6 +9,7 @@ import 'dart:convert'; import 'package:openapi/src/deserialize.dart'; import 'package:dio/dio.dart'; +import 'package:openapi/src/model/child_with_nullable.dart'; import 'package:openapi/src/model/fake_big_decimal_map200_response.dart'; import 'package:openapi/src/model/file_schema_test_class.dart'; import 'package:openapi/src/model/health_check_result.dart'; @@ -1377,6 +1378,71 @@ _bodyData=jsonEncode(requestBody); return _response; } + /// test nullable parent property + /// + /// + /// Parameters: + /// * [childWithNullable] - request body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> testNullable({ + required ChildWithNullable childWithNullable, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/nullable'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(childWithNullable); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + /// testQueryParameterCollectionFormat /// To test the collection format in query parameters /// 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 8babb656e60e..6a8bc0d47040 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 @@ -8,6 +8,7 @@ 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/category.dart'; +import 'package:openapi/src/model/child_with_nullable.dart'; import 'package:openapi/src/model/class_model.dart'; import 'package:openapi/src/model/deprecated_object.dart'; import 'package:openapi/src/model/dog.dart'; @@ -34,6 +35,7 @@ import 'package:openapi/src/model/object_with_deprecated_fields.dart'; import 'package:openapi/src/model/order.dart'; import 'package:openapi/src/model/outer_composite.dart'; import 'package:openapi/src/model/outer_object_with_enum_property.dart'; +import 'package:openapi/src/model/parent_with_nullable.dart'; import 'package:openapi/src/model/pet.dart'; import 'package:openapi/src/model/read_only_first.dart'; import 'package:openapi/src/model/special_model_name.dart'; @@ -78,6 +80,8 @@ final _regMap = RegExp(r'^Map$'); return Cat.fromJson(value as Map) as ReturnType; case 'Category': return Category.fromJson(value as Map) as ReturnType; + case 'ChildWithNullable': + return ChildWithNullable.fromJson(value as Map) as ReturnType; case 'ClassModel': return ClassModel.fromJson(value as Map) as ReturnType; case 'DeprecatedObject': @@ -145,6 +149,8 @@ final _regMap = RegExp(r'^Map$'); case 'OuterObjectWithEnumProperty': return OuterObjectWithEnumProperty.fromJson(value as Map) as ReturnType; + case 'ParentWithNullable': + return ParentWithNullable.fromJson(value as Map) as ReturnType; case 'Pet': return Pet.fromJson(value as Map) as ReturnType; case 'ReadOnlyFirst': diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/child_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/child_with_nullable.dart new file mode 100644 index 000000000000..674a58ca893e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/child_with_nullable.dart @@ -0,0 +1,98 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/parent_with_nullable.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'child_with_nullable.g.dart'; + +// ignore_for_file: unused_import + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class ChildWithNullable { + /// Returns a new [ChildWithNullable] instance. + ChildWithNullable({ + + this.type, + + this.nullableProperty, + + this.otherProperty, + }); + + @JsonKey( + + name: r'type', + required: false, + includeIfNull: false + ) + + + final ChildWithNullableTypeEnum? type; + + + + @JsonKey( + + name: r'nullableProperty', + required: false, + includeIfNull: false + ) + + + final String? nullableProperty; + + + + @JsonKey( + + name: r'otherProperty', + required: false, + includeIfNull: false + ) + + + final String? otherProperty; + + + + @override + bool operator ==(Object other) => identical(this, other) || other is ChildWithNullable && + other.type == type && + other.nullableProperty == nullableProperty && + other.otherProperty == otherProperty; + + @override + int get hashCode => + type.hashCode + + (nullableProperty == null ? 0 : nullableProperty.hashCode) + + otherProperty.hashCode; + + factory ChildWithNullable.fromJson(Map json) => _$ChildWithNullableFromJson(json); + + Map toJson() => _$ChildWithNullableToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + + +enum ChildWithNullableTypeEnum { + @JsonValue(r'ChildWithNullable') + childWithNullable, + @JsonValue(r'unknown_default_open_api') + unknownDefaultOpenApi, +} + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/parent_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/parent_with_nullable.dart new file mode 100644 index 000000000000..0490c4b2b078 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/parent_with_nullable.dart @@ -0,0 +1,79 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'parent_with_nullable.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class ParentWithNullable { + /// Returns a new [ParentWithNullable] instance. + ParentWithNullable({ + + this.type, + + this.nullableProperty, + }); + + @JsonKey( + + name: r'type', + required: false, + includeIfNull: false + ) + + + final ParentWithNullableTypeEnum? type; + + + + @JsonKey( + + name: r'nullableProperty', + required: false, + includeIfNull: false + ) + + + final String? nullableProperty; + + + + @override + bool operator ==(Object other) => identical(this, other) || other is ParentWithNullable && + other.type == type && + other.nullableProperty == nullableProperty; + + @override + int get hashCode => + type.hashCode + + (nullableProperty == null ? 0 : nullableProperty.hashCode); + + factory ParentWithNullable.fromJson(Map json) => _$ParentWithNullableFromJson(json); + + Map toJson() => _$ParentWithNullableToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + + +enum ParentWithNullableTypeEnum { + @JsonValue(r'ChildWithNullable') + childWithNullable, + @JsonValue(r'unknown_default_open_api') + unknownDefaultOpenApi, +} + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/test/child_with_nullable_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/test/child_with_nullable_test.dart new file mode 100644 index 000000000000..ce2afd9a8a6e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/test/child_with_nullable_test.dart @@ -0,0 +1,26 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ChildWithNullable +void main() { + final ChildWithNullable? instance = /* ChildWithNullable(...) */ null; + // TODO add properties to the entity + + group(ChildWithNullable, () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // String nullableProperty + test('to test the property `nullableProperty`', () async { + // TODO + }); + + // String otherProperty + test('to test the property `otherProperty`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/test/parent_with_nullable_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/test/parent_with_nullable_test.dart new file mode 100644 index 000000000000..b501d4220624 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/test/parent_with_nullable_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ParentWithNullable +void main() { + final ParentWithNullable? instance = /* ParentWithNullable(...) */ null; + // TODO add properties to the entity + + group(ParentWithNullable, () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // String nullableProperty + test('to test the property `nullableProperty`', () 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 1172e4bb425f..b6f2734cf3f7 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 @@ -12,6 +12,7 @@ doc/ArrayTest.md doc/Capitalization.md doc/Cat.md doc/Category.md +doc/ChildWithNullable.md doc/ClassModel.md doc/DefaultApi.md doc/DeprecatedObject.md @@ -46,6 +47,7 @@ doc/OuterEnumDefaultValue.md doc/OuterEnumInteger.md doc/OuterEnumIntegerDefaultValue.md doc/OuterObjectWithEnumProperty.md +doc/ParentWithNullable.md doc/Pet.md doc/PetApi.md doc/ReadOnlyFirst.md @@ -81,6 +83,7 @@ lib/src/model/array_test.dart lib/src/model/capitalization.dart lib/src/model/cat.dart lib/src/model/category.dart +lib/src/model/child_with_nullable.dart lib/src/model/class_model.dart lib/src/model/date.dart lib/src/model/deprecated_object.dart @@ -113,6 +116,7 @@ lib/src/model/outer_enum_default_value.dart lib/src/model/outer_enum_integer.dart lib/src/model/outer_enum_integer_default_value.dart lib/src/model/outer_object_with_enum_property.dart +lib/src/model/parent_with_nullable.dart lib/src/model/pet.dart lib/src/model/read_only_first.dart lib/src/model/single_ref_type.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 db7ed486d769..489ec4bec47b 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 @@ -83,6 +83,7 @@ Class | Method | HTTP request | Description [*FakeApi*](doc/FakeApi.md) | [**testGroupParameters**](doc/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [*FakeApi*](doc/FakeApi.md) | [**testInlineAdditionalProperties**](doc/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [*FakeApi*](doc/FakeApi.md) | [**testJsonFormData**](doc/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +[*FakeApi*](doc/FakeApi.md) | [**testNullable**](doc/FakeApi.md#testnullable) | **POST** /fake/nullable | test nullable parent property [*FakeApi*](doc/FakeApi.md) | [**testQueryParameterCollectionFormat**](doc/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | [*FakeClassnameTags123Api*](doc/FakeClassnameTags123Api.md) | [**testClassname**](doc/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case [*PetApi*](doc/PetApi.md) | [**addPet**](doc/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store @@ -120,6 +121,7 @@ Class | Method | HTTP request | Description - [Capitalization](doc/Capitalization.md) - [Cat](doc/Cat.md) - [Category](doc/Category.md) + - [ChildWithNullable](doc/ChildWithNullable.md) - [ClassModel](doc/ClassModel.md) - [DeprecatedObject](doc/DeprecatedObject.md) - [Dog](doc/Dog.md) @@ -151,6 +153,7 @@ Class | Method | HTTP request | Description - [OuterEnumInteger](doc/OuterEnumInteger.md) - [OuterEnumIntegerDefaultValue](doc/OuterEnumIntegerDefaultValue.md) - [OuterObjectWithEnumProperty](doc/OuterObjectWithEnumProperty.md) + - [ParentWithNullable](doc/ParentWithNullable.md) - [Pet](doc/Pet.md) - [ReadOnlyFirst](doc/ReadOnlyFirst.md) - [SingleRefType](doc/SingleRefType.md) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ChildWithNullable.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ChildWithNullable.md new file mode 100644 index 000000000000..770494fcf4cc --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ChildWithNullable.md @@ -0,0 +1,17 @@ +# openapi.model.ChildWithNullable + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**nullableProperty** | **String** | | [optional] +**otherProperty** | **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/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md index da73b9acb516..5caf751f1f49 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md @@ -26,6 +26,7 @@ Method | HTTP request | Description [**testGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**testJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +[**testNullable**](FakeApi.md#testnullable) | **POST** /fake/nullable | test nullable parent property [**testQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | @@ -800,6 +801,48 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **testNullable** +> testNullable(childWithNullable) + +test nullable parent property + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final ChildWithNullable childWithNullable = ; // ChildWithNullable | request body + +try { + api.testNullable(childWithNullable); +} catch on DioException (e) { + print('Exception when calling FakeApi->testNullable: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **testQueryParameterCollectionFormat** > testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ParentWithNullable.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ParentWithNullable.md new file mode 100644 index 000000000000..17aa5ca02941 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ParentWithNullable.md @@ -0,0 +1,16 @@ +# openapi.model.ParentWithNullable + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**nullableProperty** | **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 76140c466d31..1c2b397af324 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 @@ -27,6 +27,7 @@ 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/category.dart'; +export 'package:openapi/src/model/child_with_nullable.dart'; export 'package:openapi/src/model/class_model.dart'; export 'package:openapi/src/model/deprecated_object.dart'; export 'package:openapi/src/model/dog.dart'; @@ -58,6 +59,7 @@ export 'package:openapi/src/model/outer_enum_default_value.dart'; export 'package:openapi/src/model/outer_enum_integer.dart'; export 'package:openapi/src/model/outer_enum_integer_default_value.dart'; export 'package:openapi/src/model/outer_object_with_enum_property.dart'; +export 'package:openapi/src/model/parent_with_nullable.dart'; export 'package:openapi/src/model/pet.dart'; export 'package:openapi/src/model/read_only_first.dart'; export 'package:openapi/src/model/single_ref_type.dart'; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart index de710128f4ba..da3ce4b07687 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart @@ -10,6 +10,7 @@ import 'package:dio/dio.dart'; import 'dart:typed_data'; import 'package:built_collection/built_collection.dart'; import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/child_with_nullable.dart'; import 'package:openapi/src/model/date.dart'; import 'package:openapi/src/model/fake_big_decimal_map200_response.dart'; import 'package:openapi/src/model/file_schema_test_class.dart'; @@ -1446,6 +1447,73 @@ class FakeApi { return _response; } + /// test nullable parent property + /// + /// + /// Parameters: + /// * [childWithNullable] - request body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> testNullable({ + required ChildWithNullable childWithNullable, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/nullable'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(ChildWithNullable); + _bodyData = _serializers.serialize(childWithNullable, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + /// testQueryParameterCollectionFormat /// To test the collection format in query parameters /// diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart new file mode 100644 index 000000000000..8e40eb1d2371 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart @@ -0,0 +1,156 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/parent_with_nullable.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'child_with_nullable.g.dart'; + +/// ChildWithNullable +/// +/// Properties: +/// * [type] +/// * [nullableProperty] +/// * [otherProperty] +@BuiltValue() +abstract class ChildWithNullable implements ParentWithNullable, Built { + @BuiltValueField(wireName: r'otherProperty') + String? get otherProperty; + + ChildWithNullable._(); + + factory ChildWithNullable([void updates(ChildWithNullableBuilder b)]) = _$ChildWithNullable; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ChildWithNullableBuilder b) => b..type=b.discriminatorValue; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ChildWithNullableSerializer(); +} + +class _$ChildWithNullableSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ChildWithNullable, _$ChildWithNullable]; + + @override + final String wireName = r'ChildWithNullable'; + + Iterable _serializeProperties( + Serializers serializers, + ChildWithNullable object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.type != null) { + yield r'type'; + yield serializers.serialize( + object.type, + specifiedType: const FullType(ParentWithNullableTypeEnum), + ); + } + if (object.nullableProperty != null) { + yield r'nullableProperty'; + yield serializers.serialize( + object.nullableProperty, + specifiedType: const FullType.nullable(String), + ); + } + if (object.otherProperty != null) { + yield r'otherProperty'; + yield serializers.serialize( + object.otherProperty, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + ChildWithNullable object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ChildWithNullableBuilder 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'type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(ParentWithNullableTypeEnum), + ) as ParentWithNullableTypeEnum; + result.type = valueDes; + break; + case r'nullableProperty': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.nullableProperty = valueDes; + break; + case r'otherProperty': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.otherProperty = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ChildWithNullable deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ChildWithNullableBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + +class ChildWithNullableTypeEnum extends EnumClass { + + @BuiltValueEnumConst(wireName: r'ChildWithNullable') + static const ChildWithNullableTypeEnum childWithNullable = _$childWithNullableTypeEnum_childWithNullable; + @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) + static const ChildWithNullableTypeEnum unknownDefaultOpenApi = _$childWithNullableTypeEnum_unknownDefaultOpenApi; + + static Serializer get serializer => _$childWithNullableTypeEnumSerializer; + + const ChildWithNullableTypeEnum._(String name): super(name); + + static BuiltSet get values => _$childWithNullableTypeEnumValues; + static ChildWithNullableTypeEnum valueOf(String name) => _$childWithNullableTypeEnumValueOf(name); +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/parent_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/parent_with_nullable.dart new file mode 100644 index 000000000000..bf1252135cd9 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/parent_with_nullable.dart @@ -0,0 +1,212 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/child_with_nullable.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'parent_with_nullable.g.dart'; + +/// ParentWithNullable +/// +/// Properties: +/// * [type] +/// * [nullableProperty] +@BuiltValue(instantiable: false) +abstract class ParentWithNullable { + @BuiltValueField(wireName: r'type') + ParentWithNullableTypeEnum? get type; + // enum typeEnum { ChildWithNullable, }; + + @BuiltValueField(wireName: r'nullableProperty') + String? get nullableProperty; + + static const String discriminatorFieldName = r'type'; + + static const Map discriminatorMapping = { + r'ChildWithNullable': ChildWithNullable, + }; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ParentWithNullableSerializer(); +} + +extension ParentWithNullableDiscriminatorExt on ParentWithNullable { + String? get discriminatorValue { + if (this is ChildWithNullable) { + return r'ChildWithNullable'; + } + return null; + } +} +extension ParentWithNullableBuilderDiscriminatorExt on ParentWithNullableBuilder { + String? get discriminatorValue { + if (this is ChildWithNullableBuilder) { + return r'ChildWithNullable'; + } + return null; + } +} + +class _$ParentWithNullableSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ParentWithNullable]; + + @override + final String wireName = r'ParentWithNullable'; + + Iterable _serializeProperties( + Serializers serializers, + ParentWithNullable object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.type != null) { + yield r'type'; + yield serializers.serialize( + object.type, + specifiedType: const FullType(ParentWithNullableTypeEnum), + ); + } + if (object.nullableProperty != null) { + yield r'nullableProperty'; + yield serializers.serialize( + object.nullableProperty, + specifiedType: const FullType.nullable(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + ParentWithNullable object, { + FullType specifiedType = FullType.unspecified, + }) { + if (object is ChildWithNullable) { + return serializers.serialize(object, specifiedType: FullType(ChildWithNullable))!; + } + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + @override + ParentWithNullable deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final serializedList = (serialized as Iterable).toList(); + final discIndex = serializedList.indexOf(ParentWithNullable.discriminatorFieldName) + 1; + final discValue = serializers.deserialize(serializedList[discIndex], specifiedType: FullType(String)) as String; + switch (discValue) { + case r'ChildWithNullable': + return serializers.deserialize(serialized, specifiedType: FullType(ChildWithNullable)) as ChildWithNullable; + default: + return serializers.deserialize(serialized, specifiedType: FullType($ParentWithNullable)) as $ParentWithNullable; + } + } +} + +/// a concrete implementation of [ParentWithNullable], since [ParentWithNullable] is not instantiable +@BuiltValue(instantiable: true) +abstract class $ParentWithNullable implements ParentWithNullable, Built<$ParentWithNullable, $ParentWithNullableBuilder> { + $ParentWithNullable._(); + + factory $ParentWithNullable([void Function($ParentWithNullableBuilder)? updates]) = _$$ParentWithNullable; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults($ParentWithNullableBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer<$ParentWithNullable> get serializer => _$$ParentWithNullableSerializer(); +} + +class _$$ParentWithNullableSerializer implements PrimitiveSerializer<$ParentWithNullable> { + @override + final Iterable types = const [$ParentWithNullable, _$$ParentWithNullable]; + + @override + final String wireName = r'$ParentWithNullable'; + + @override + Object serialize( + Serializers serializers, + $ParentWithNullable object, { + FullType specifiedType = FullType.unspecified, + }) { + return serializers.serialize(object, specifiedType: FullType(ParentWithNullable))!; + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ParentWithNullableBuilder 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'type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(ParentWithNullableTypeEnum), + ) as ParentWithNullableTypeEnum; + result.type = valueDes; + break; + case r'nullableProperty': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.nullableProperty = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + $ParentWithNullable deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = $ParentWithNullableBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + +class ParentWithNullableTypeEnum extends EnumClass { + + @BuiltValueEnumConst(wireName: r'ChildWithNullable') + static const ParentWithNullableTypeEnum childWithNullable = _$parentWithNullableTypeEnum_childWithNullable; + @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) + static const ParentWithNullableTypeEnum unknownDefaultOpenApi = _$parentWithNullableTypeEnum_unknownDefaultOpenApi; + + static Serializer get serializer => _$parentWithNullableTypeEnumSerializer; + + const ParentWithNullableTypeEnum._(String name): super(name); + + static BuiltSet get values => _$parentWithNullableTypeEnumValues; + static ParentWithNullableTypeEnum valueOf(String name) => _$parentWithNullableTypeEnumValueOf(name); +} + 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 ca163ddac102..d4d742a42c2b 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 @@ -24,6 +24,7 @@ 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/category.dart'; +import 'package:openapi/src/model/child_with_nullable.dart'; import 'package:openapi/src/model/class_model.dart'; import 'package:openapi/src/model/deprecated_object.dart'; import 'package:openapi/src/model/dog.dart'; @@ -55,6 +56,7 @@ import 'package:openapi/src/model/outer_enum_default_value.dart'; import 'package:openapi/src/model/outer_enum_integer.dart'; import 'package:openapi/src/model/outer_enum_integer_default_value.dart'; import 'package:openapi/src/model/outer_object_with_enum_property.dart'; +import 'package:openapi/src/model/parent_with_nullable.dart'; import 'package:openapi/src/model/pet.dart'; import 'package:openapi/src/model/read_only_first.dart'; import 'package:openapi/src/model/single_ref_type.dart'; @@ -75,6 +77,7 @@ part 'serializers.g.dart'; Capitalization, Cat, Category, + ChildWithNullable, ClassModel, DeprecatedObject, Dog, @@ -106,6 +109,7 @@ part 'serializers.g.dart'; OuterEnumInteger, OuterEnumIntegerDefaultValue, OuterObjectWithEnumProperty, + ParentWithNullable,$ParentWithNullable, Pet, ReadOnlyFirst, SingleRefType, @@ -147,6 +151,7 @@ Serializers serializers = (_$serializers.toBuilder() () => ListBuilder(), ) ..add(Animal.serializer) + ..add(ParentWithNullable.serializer) ..add(const OneOfSerializer()) ..add(const AnyOfSerializer()) ..add(const DateSerializer()) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/child_with_nullable_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/child_with_nullable_test.dart new file mode 100644 index 000000000000..88361dff20e1 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/child_with_nullable_test.dart @@ -0,0 +1,26 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ChildWithNullable +void main() { + final instance = ChildWithNullableBuilder(); + // TODO add properties to the builder and call build() + + group(ChildWithNullable, () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // String nullableProperty + test('to test the property `nullableProperty`', () async { + // TODO + }); + + // String otherProperty + test('to test the property `otherProperty`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/parent_with_nullable_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/parent_with_nullable_test.dart new file mode 100644 index 000000000000..68edeb52bc26 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/parent_with_nullable_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ParentWithNullable +void main() { + //final instance = ParentWithNullableBuilder(); + // TODO add properties to the builder and call build() + + group(ParentWithNullable, () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // String nullableProperty + test('to test the property `nullableProperty`', () 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 727a5ef352b4..f9f1005bc081 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 @@ -13,6 +13,7 @@ doc/ArrayTest.md doc/Capitalization.md doc/Cat.md doc/Category.md +doc/ChildWithNullable.md doc/ClassModel.md doc/DefaultApi.md doc/DeprecatedObject.md @@ -47,6 +48,7 @@ doc/OuterEnumDefaultValue.md doc/OuterEnumInteger.md doc/OuterEnumIntegerDefaultValue.md doc/OuterObjectWithEnumProperty.md +doc/ParentWithNullable.md doc/Pet.md doc/PetApi.md doc/ReadOnlyFirst.md @@ -83,6 +85,7 @@ lib/model/array_test.dart lib/model/capitalization.dart lib/model/cat.dart lib/model/category.dart +lib/model/child_with_nullable.dart lib/model/class_model.dart lib/model/deprecated_object.dart lib/model/dog.dart @@ -114,6 +117,7 @@ lib/model/outer_enum_default_value.dart lib/model/outer_enum_integer.dart lib/model/outer_enum_integer_default_value.dart lib/model/outer_object_with_enum_property.dart +lib/model/parent_with_nullable.dart lib/model/pet.dart lib/model/read_only_first.dart lib/model/single_ref_type.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 940295f3df91..9d0fed4ca854 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 @@ -77,6 +77,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**testGroupParameters**](doc//FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](doc//FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties *FakeApi* | [**testJsonFormData**](doc//FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**testNullable**](doc//FakeApi.md#testnullable) | **POST** /fake/nullable | test nullable parent property *FakeApi* | [**testQueryParameterCollectionFormat**](doc//FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | *FakeClassnameTags123Api* | [**testClassname**](doc//FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case *PetApi* | [**addPet**](doc//PetApi.md#addpet) | **POST** /pet | Add a new pet to the store @@ -114,6 +115,7 @@ Class | Method | HTTP request | Description - [Capitalization](doc//Capitalization.md) - [Cat](doc//Cat.md) - [Category](doc//Category.md) + - [ChildWithNullable](doc//ChildWithNullable.md) - [ClassModel](doc//ClassModel.md) - [DeprecatedObject](doc//DeprecatedObject.md) - [Dog](doc//Dog.md) @@ -145,6 +147,7 @@ Class | Method | HTTP request | Description - [OuterEnumInteger](doc//OuterEnumInteger.md) - [OuterEnumIntegerDefaultValue](doc//OuterEnumIntegerDefaultValue.md) - [OuterObjectWithEnumProperty](doc//OuterObjectWithEnumProperty.md) + - [ParentWithNullable](doc//ParentWithNullable.md) - [Pet](doc//Pet.md) - [ReadOnlyFirst](doc//ReadOnlyFirst.md) - [SingleRefType](doc//SingleRefType.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ChildWithNullable.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ChildWithNullable.md new file mode 100644 index 000000000000..770494fcf4cc --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ChildWithNullable.md @@ -0,0 +1,17 @@ +# openapi.model.ChildWithNullable + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**nullableProperty** | **String** | | [optional] +**otherProperty** | **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/doc/FakeApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md index 5998db8502da..ee87ce7bafd2 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md @@ -26,6 +26,7 @@ Method | HTTP request | Description [**testGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**testJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +[**testNullable**](FakeApi.md#testnullable) | **POST** /fake/nullable | test nullable parent property [**testQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | @@ -806,6 +807,48 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **testNullable** +> testNullable(childWithNullable) + +test nullable parent property + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final childWithNullable = ChildWithNullable(); // ChildWithNullable | request body + +try { + api_instance.testNullable(childWithNullable); +} catch (e) { + print('Exception when calling FakeApi->testNullable: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **testQueryParameterCollectionFormat** > testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ParentWithNullable.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ParentWithNullable.md new file mode 100644 index 000000000000..17aa5ca02941 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ParentWithNullable.md @@ -0,0 +1,16 @@ +# openapi.model.ParentWithNullable + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**nullableProperty** | **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 c48f9bf6a260..167a8a32b6cd 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 @@ -46,6 +46,7 @@ part 'model/array_test.dart'; part 'model/capitalization.dart'; part 'model/cat.dart'; part 'model/category.dart'; +part 'model/child_with_nullable.dart'; part 'model/class_model.dart'; part 'model/deprecated_object.dart'; part 'model/dog.dart'; @@ -77,6 +78,7 @@ part 'model/outer_enum_default_value.dart'; part 'model/outer_enum_integer.dart'; part 'model/outer_enum_integer_default_value.dart'; part 'model/outer_object_with_enum_property.dart'; +part 'model/parent_with_nullable.dart'; part 'model/pet.dart'; part 'model/read_only_first.dart'; part 'model/single_ref_type.dart'; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart index f808cb0cf33f..2873d1bcd75a 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart @@ -1131,6 +1131,56 @@ class FakeApi { } } + /// test nullable parent property + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [ChildWithNullable] childWithNullable (required): + /// request body + Future testNullableWithHttpInfo(ChildWithNullable childWithNullable,) async { + // ignore: prefer_const_declarations + final path = r'/fake/nullable'; + + // ignore: prefer_final_locals + Object? postBody = childWithNullable; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// test nullable parent property + /// + /// + /// + /// Parameters: + /// + /// * [ChildWithNullable] childWithNullable (required): + /// request body + Future testNullable(ChildWithNullable childWithNullable,) async { + final response = await testNullableWithHttpInfo(childWithNullable,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + /// To test the collection format in query parameters /// /// Note: This method returns the HTTP [Response]. 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 d494ed9f13fb..7f4bd6b05679 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 @@ -202,6 +202,8 @@ class ApiClient { return Cat.fromJson(value); case 'Category': return Category.fromJson(value); + case 'ChildWithNullable': + return ChildWithNullable.fromJson(value); case 'ClassModel': return ClassModel.fromJson(value); case 'DeprecatedObject': @@ -264,6 +266,8 @@ class ApiClient { return OuterEnumIntegerDefaultValueTypeTransformer().decode(value); case 'OuterObjectWithEnumProperty': return OuterObjectWithEnumProperty.fromJson(value); + case 'ParentWithNullable': + return ParentWithNullable.fromJson(value); case 'Pet': return Pet.fromJson(value); case 'ReadOnlyFirst': diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/child_with_nullable.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/child_with_nullable.dart new file mode 100644 index 000000000000..7ade7785fc73 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/child_with_nullable.dart @@ -0,0 +1,211 @@ +// +// 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 ChildWithNullable { + /// Returns a new [ChildWithNullable] instance. + ChildWithNullable({ + this.type, + this.nullableProperty, + this.otherProperty, + }); + + ChildWithNullableTypeEnum? type; + + String? nullableProperty; + + /// + /// 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? otherProperty; + + @override + bool operator ==(Object other) => identical(this, other) || other is ChildWithNullable && + other.type == type && + other.nullableProperty == nullableProperty && + other.otherProperty == otherProperty; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (nullableProperty == null ? 0 : nullableProperty!.hashCode) + + (otherProperty == null ? 0 : otherProperty!.hashCode); + + @override + String toString() => 'ChildWithNullable[type=$type, nullableProperty=$nullableProperty, otherProperty=$otherProperty]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.nullableProperty != null) { + json[r'nullableProperty'] = this.nullableProperty; + } else { + json[r'nullableProperty'] = null; + } + if (this.otherProperty != null) { + json[r'otherProperty'] = this.otherProperty; + } else { + json[r'otherProperty'] = null; + } + return json; + } + + /// Returns a new [ChildWithNullable] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ChildWithNullable? 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 "ChildWithNullable[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ChildWithNullable[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ChildWithNullable( + type: ChildWithNullableTypeEnum.fromJson(json[r'type']), + nullableProperty: mapValueOfType(json, r'nullableProperty'), + otherProperty: mapValueOfType(json, r'otherProperty'), + ); + } + 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 = ChildWithNullable.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 = ChildWithNullable.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ChildWithNullable-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] = ChildWithNullable.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + + +class ChildWithNullableTypeEnum { + /// Instantiate a new enum with the provided [value]. + const ChildWithNullableTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const childWithNullable = ChildWithNullableTypeEnum._(r'ChildWithNullable'); + + /// List of all possible values in this [enum][ChildWithNullableTypeEnum]. + static const values = [ + childWithNullable, + ]; + + static ChildWithNullableTypeEnum? fromJson(dynamic value) => ChildWithNullableTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ChildWithNullableTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [ChildWithNullableTypeEnum] to String, +/// and [decode] dynamic data back to [ChildWithNullableTypeEnum]. +class ChildWithNullableTypeEnumTypeTransformer { + factory ChildWithNullableTypeEnumTypeTransformer() => _instance ??= const ChildWithNullableTypeEnumTypeTransformer._(); + + const ChildWithNullableTypeEnumTypeTransformer._(); + + String encode(ChildWithNullableTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a ChildWithNullableTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + ChildWithNullableTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'ChildWithNullable': return ChildWithNullableTypeEnum.childWithNullable; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [ChildWithNullableTypeEnumTypeTransformer] instance. + static ChildWithNullableTypeEnumTypeTransformer? _instance; +} + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/parent_with_nullable.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/parent_with_nullable.dart new file mode 100644 index 000000000000..24f4ee75874e --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/parent_with_nullable.dart @@ -0,0 +1,194 @@ +// +// 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 ParentWithNullable { + /// Returns a new [ParentWithNullable] instance. + ParentWithNullable({ + this.type, + this.nullableProperty, + }); + + ParentWithNullableTypeEnum? type; + + String? nullableProperty; + + @override + bool operator ==(Object other) => identical(this, other) || other is ParentWithNullable && + other.type == type && + other.nullableProperty == nullableProperty; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (nullableProperty == null ? 0 : nullableProperty!.hashCode); + + @override + String toString() => 'ParentWithNullable[type=$type, nullableProperty=$nullableProperty]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.nullableProperty != null) { + json[r'nullableProperty'] = this.nullableProperty; + } else { + json[r'nullableProperty'] = null; + } + return json; + } + + /// Returns a new [ParentWithNullable] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ParentWithNullable? 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 "ParentWithNullable[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ParentWithNullable[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ParentWithNullable( + type: ParentWithNullableTypeEnum.fromJson(json[r'type']), + nullableProperty: mapValueOfType(json, r'nullableProperty'), + ); + } + 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 = ParentWithNullable.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 = ParentWithNullable.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ParentWithNullable-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] = ParentWithNullable.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + + +class ParentWithNullableTypeEnum { + /// Instantiate a new enum with the provided [value]. + const ParentWithNullableTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const childWithNullable = ParentWithNullableTypeEnum._(r'ChildWithNullable'); + + /// List of all possible values in this [enum][ParentWithNullableTypeEnum]. + static const values = [ + childWithNullable, + ]; + + static ParentWithNullableTypeEnum? fromJson(dynamic value) => ParentWithNullableTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ParentWithNullableTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [ParentWithNullableTypeEnum] to String, +/// and [decode] dynamic data back to [ParentWithNullableTypeEnum]. +class ParentWithNullableTypeEnumTypeTransformer { + factory ParentWithNullableTypeEnumTypeTransformer() => _instance ??= const ParentWithNullableTypeEnumTypeTransformer._(); + + const ParentWithNullableTypeEnumTypeTransformer._(); + + String encode(ParentWithNullableTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a ParentWithNullableTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + ParentWithNullableTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'ChildWithNullable': return ParentWithNullableTypeEnum.childWithNullable; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [ParentWithNullableTypeEnumTypeTransformer] instance. + static ParentWithNullableTypeEnumTypeTransformer? _instance; +} + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/child_with_nullable_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/child_with_nullable_test.dart new file mode 100644 index 000000000000..30d4588bd807 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/child_with_nullable_test.dart @@ -0,0 +1,37 @@ +// +// 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'; + +// tests for ChildWithNullable +void main() { + // final instance = ChildWithNullable(); + + group('test ChildWithNullable', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // String nullableProperty + test('to test the property `nullableProperty`', () async { + // TODO + }); + + // String otherProperty + test('to test the property `otherProperty`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/parent_with_nullable_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/parent_with_nullable_test.dart new file mode 100644 index 000000000000..3d16052226f6 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/parent_with_nullable_test.dart @@ -0,0 +1,32 @@ +// +// 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'; + +// tests for ParentWithNullable +void main() { + // final instance = ParentWithNullable(); + + group('test ParentWithNullable', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // String nullableProperty + test('to test the property `nullableProperty`', () async { + // TODO + }); + + + }); + +} 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 13cc68d73666..e233021944ac 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 @@ -22,6 +22,7 @@ src/main/java/org/openapitools/model/BigCat.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ChildWithNullable.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 @@ -45,6 +46,7 @@ src/main/java/org/openapitools/model/NumberOnly.java src/main/java/org/openapitools/model/Order.java src/main/java/org/openapitools/model/OuterComposite.java src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/ParentWithNullable.java src/main/java/org/openapitools/model/Pet.java src/main/java/org/openapitools/model/ReadOnlyFirst.java src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java index 9d8480d8fdeb..72d45bdee9e3 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -451,6 +452,32 @@ ResponseEntity testJsonFormData( ); + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "testNullable", + summary = "test nullable parent property", + description = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/nullable", + consumes = "application/json" + ) + ResponseEntity testNullable( + @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + ); + + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ChildWithNullable.java new file mode 100644 index 000000000000..fb169e0b74a8 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -0,0 +1,114 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullable; +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; + +/** + * ChildWithNullable + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @Schema(name = "otherProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("otherProperty") + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullable type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullable nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ParentWithNullable.java new file mode 100644 index 000000000000..7ddb5ac9fb72 --- /dev/null +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -0,0 +1,167 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +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; + +/** + * ParentWithNullable + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ParentWithNullable { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @Schema(name = "nullableProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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/.openapi-generator/FILES b/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/FILES index 440528a91a44..8e12e3455c0a 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/FILES +++ b/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/FILES @@ -40,6 +40,7 @@ src/main/java/org/openapitools/model/BigCat.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ChildWithNullable.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 @@ -63,6 +64,7 @@ src/main/java/org/openapitools/model/NumberOnly.java src/main/java/org/openapitools/model/Order.java src/main/java/org/openapitools/model/OuterComposite.java src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/ParentWithNullable.java src/main/java/org/openapitools/model/Pet.java src/main/java/org/openapitools/model/ReadOnlyFirst.java src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index ae12a17eb3bd..47db3311b8aa 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -506,6 +507,34 @@ default ResponseEntity testJsonFormData( } + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "testNullable", + summary = "test nullable parent property", + description = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/nullable", + consumes = { "application/json" } + ) + default ResponseEntity testNullable( + @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + ) { + return getDelegate().testNullable(childWithNullable); + } + + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java index b88f61719554..c0125b8d57d3 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index c8b380f33c01..e04c34be3b06 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -299,6 +300,19 @@ default ResponseEntity testJsonFormData(String param, } + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + * @see FakeApi#testNullable + */ + default ResponseEntity testNullable(ChildWithNullable childWithNullable) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java new file mode 100644 index 000000000000..fb169e0b74a8 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -0,0 +1,114 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullable; +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; + +/** + * ChildWithNullable + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @Schema(name = "otherProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("otherProperty") + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullable type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullable nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java new file mode 100644 index 000000000000..7ddb5ac9fb72 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -0,0 +1,167 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +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; + +/** + * ParentWithNullable + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ParentWithNullable { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @Schema(name = "nullableProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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 17951cb6c3ff..3ebfb97645f2 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 @@ -986,6 +986,27 @@ paths: x-accepts: application/json x-tags: - tag: fake + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: fake /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1883,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES b/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES index f9623c283a27..8e1c754a6cd6 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES @@ -34,6 +34,7 @@ src/main/java/org/openapitools/model/BigCat.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ChildWithNullable.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 @@ -57,6 +58,7 @@ src/main/java/org/openapitools/model/NumberOnly.java src/main/java/org/openapitools/model/Order.java src/main/java/org/openapitools/model/OuterComposite.java src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/ParentWithNullable.java src/main/java/org/openapitools/model/Pet.java src/main/java/org/openapitools/model/ReadOnlyFirst.java src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 8933208533ce..48b273fb6fce 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -551,6 +552,35 @@ default ResponseEntity testJsonFormData( } + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "testNullable", + summary = "test nullable parent property", + description = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/nullable", + consumes = { "application/json" } + ) + default ResponseEntity testNullable( + @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java index 9121a3951829..4f901db76d70 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ChildWithNullable.java new file mode 100644 index 000000000000..fb169e0b74a8 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -0,0 +1,114 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullable; +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; + +/** + * ChildWithNullable + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @Schema(name = "otherProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("otherProperty") + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullable type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullable nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java new file mode 100644 index 000000000000..7ddb5ac9fb72 --- /dev/null +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -0,0 +1,167 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +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; + +/** + * ParentWithNullable + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ParentWithNullable { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @Schema(name = "nullableProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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 17951cb6c3ff..3ebfb97645f2 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 @@ -986,6 +986,27 @@ paths: x-accepts: application/json x-tags: - tag: fake + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: fake /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1883,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/schema/petstore/mysql/.openapi-generator/FILES b/samples/schema/petstore/mysql/.openapi-generator/FILES index 0a914acd736d..a70d72bf53b9 100644 --- a/samples/schema/petstore/mysql/.openapi-generator/FILES +++ b/samples/schema/petstore/mysql/.openapi-generator/FILES @@ -9,6 +9,7 @@ Model/ArrayTest.sql Model/Capitalization.sql Model/Cat.sql Model/Category.sql +Model/ChildWithNullable.sql Model/ClassModel.sql Model/Client.sql Model/DeprecatedObject.sql @@ -38,6 +39,7 @@ Model/OuterEnumDefaultValue.sql Model/OuterEnumInteger.sql Model/OuterEnumIntegerDefaultValue.sql Model/OuterObjectWithEnumProperty.sql +Model/ParentWithNullable.sql Model/Pet.sql Model/ReadOnlyFirst.sql Model/Return.sql diff --git a/samples/schema/petstore/mysql/Model/ChildWithNullable.sql b/samples/schema/petstore/mysql/Model/ChildWithNullable.sql new file mode 100644 index 000000000000..1ebeb48d32a1 --- /dev/null +++ b/samples/schema/petstore/mysql/Model/ChildWithNullable.sql @@ -0,0 +1,26 @@ +-- +-- OpenAPI Petstore. +-- Prepared SQL queries for 'ChildWithNullable' definition. +-- + + +-- +-- SELECT template for table `ChildWithNullable` +-- +SELECT `type`, `nullableProperty`, `otherProperty` FROM `ChildWithNullable` WHERE 1; + +-- +-- INSERT template for table `ChildWithNullable` +-- +INSERT INTO `ChildWithNullable`(`type`, `nullableProperty`, `otherProperty`) VALUES (?, ?, ?); + +-- +-- UPDATE template for table `ChildWithNullable` +-- +UPDATE `ChildWithNullable` SET `type` = ?, `nullableProperty` = ?, `otherProperty` = ? WHERE 1; + +-- +-- DELETE template for table `ChildWithNullable` +-- +DELETE FROM `ChildWithNullable` WHERE 0; + diff --git a/samples/schema/petstore/mysql/Model/ParentWithNullable.sql b/samples/schema/petstore/mysql/Model/ParentWithNullable.sql new file mode 100644 index 000000000000..bea4e901ca04 --- /dev/null +++ b/samples/schema/petstore/mysql/Model/ParentWithNullable.sql @@ -0,0 +1,26 @@ +-- +-- OpenAPI Petstore. +-- Prepared SQL queries for 'ParentWithNullable' definition. +-- + + +-- +-- SELECT template for table `ParentWithNullable` +-- +SELECT `type`, `nullableProperty` FROM `ParentWithNullable` WHERE 1; + +-- +-- INSERT template for table `ParentWithNullable` +-- +INSERT INTO `ParentWithNullable`(`type`, `nullableProperty`) VALUES (?, ?); + +-- +-- UPDATE template for table `ParentWithNullable` +-- +UPDATE `ParentWithNullable` SET `type` = ?, `nullableProperty` = ? WHERE 1; + +-- +-- DELETE template for table `ParentWithNullable` +-- +DELETE FROM `ParentWithNullable` WHERE 0; + diff --git a/samples/schema/petstore/mysql/mysql_schema.sql b/samples/schema/petstore/mysql/mysql_schema.sql index 46629b427305..30257267116c 100644 --- a/samples/schema/petstore/mysql/mysql_schema.sql +++ b/samples/schema/petstore/mysql/mysql_schema.sql @@ -110,6 +110,16 @@ CREATE TABLE IF NOT EXISTS `Category` ( `name` TEXT NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +-- +-- Table structure for table `ChildWithNullable` generated from model 'ChildWithNullable' +-- + +CREATE TABLE IF NOT EXISTS `ChildWithNullable` ( + `type` ENUM('ChildWithNullable') DEFAULT NULL, + `nullableProperty` TEXT DEFAULT NULL, + `otherProperty` TEXT DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + -- -- Table structure for table `ClassModel` generated from model 'ClassModel' -- Model for testing model with \"_class\" property @@ -363,6 +373,15 @@ CREATE TABLE IF NOT EXISTS `OuterObjectWithEnumProperty` ( `value` TEXT NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +-- +-- Table structure for table `ParentWithNullable` generated from model 'ParentWithNullable' +-- + +CREATE TABLE IF NOT EXISTS `ParentWithNullable` ( + `type` ENUM('ChildWithNullable') DEFAULT NULL, + `nullableProperty` TEXT DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + -- -- Table structure for table `Pet` generated from model 'Pet' -- 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 538c54f0c20a..97c17ae836fb 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 @@ -37,6 +37,8 @@ model/Cat.cpp model/Cat.h model/Category.cpp model/Category.h +model/ChildWithNullable.cpp +model/ChildWithNullable.h model/ClassModel.cpp model/ClassModel.h model/Client.cpp @@ -93,6 +95,8 @@ model/OuterEnumIntegerDefaultValue.cpp model/OuterEnumIntegerDefaultValue.h model/OuterObjectWithEnumProperty.cpp model/OuterObjectWithEnumProperty.h +model/ParentWithNullable.cpp +model/ParentWithNullable.h model/Pet.cpp model/Pet.h model/ReadOnlyFirst.cpp diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.cpp index c0cf18be8bd3..28c0d4e0ba3a 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.cpp @@ -1903,6 +1903,119 @@ std::string FakeJsonFormDataResource::extractFormParamsFromBody(const std::strin } return ""; } +FakeNullableResource::FakeNullableResource(const std::string& context /* = "/v2" */) +{ + this->set_path(context + "/fake/nullable"); + this->set_method_handler("POST", + std::bind(&FakeNullableResource::handler_POST_internal, this, + std::placeholders::_1)); +} + +std::pair FakeNullableResource::handleFakeApiException(const FakeApiException& e) +{ + return std::make_pair(e.getStatus(), e.what()); +} + +std::pair FakeNullableResource::handleStdException(const std::exception& e) +{ + return std::make_pair(500, e.what()); +} + +std::pair FakeNullableResource::handleUnspecifiedException() +{ + return std::make_pair(500, "Unknown exception occurred"); +} + +void FakeNullableResource::setResponseHeader(const std::shared_ptr& session, const std::string& header) +{ + session->set_header(header, ""); +} + +void FakeNullableResource::returnResponse(const std::shared_ptr& session, const int status, const std::string& result, std::multimap& responseHeaders) +{ + responseHeaders.insert(std::make_pair("Connection", "close")); + session->close(status, result, responseHeaders); +} + +void FakeNullableResource::defaultSessionClose(const std::shared_ptr& session, const int status, const std::string& result) +{ + session->close(status, result, { {"Connection", "close"} }); +} + +void FakeNullableResource::handler_POST_internal(const std::shared_ptr session) +{ + const auto request = session->get_request(); + // body params or form params here from the body content string + std::string bodyContent = extractBodyContent(session); + auto childWithNullable = extractJsonModelBodyParam(bodyContent); + + int status_code = 500; + std::string result = ""; + + try { + status_code = + handler_POST(childWithNullable); + } + catch(const FakeApiException& e) { + std::tie(status_code, result) = handleFakeApiException(e); + } + catch(const std::exception& e) { + std::tie(status_code, result) = handleStdException(e); + } + catch(...) { + std::tie(status_code, result) = handleUnspecifiedException(); + } + + std::multimap< std::string, std::string > responseHeaders {}; + static const std::vector contentTypes{ + "application/json" + }; + static const std::string acceptTypes{ + "application/json, " + }; + + if (status_code == 200) { + responseHeaders.insert(std::make_pair("Content-Type", selectPreferredContentType(contentTypes))); + if (!acceptTypes.empty()) { + responseHeaders.insert(std::make_pair("Accept", acceptTypes)); + } + + returnResponse(session, 200, result.empty() ? "{}" : result, responseHeaders); + return; + } + defaultSessionClose(session, status_code, result); +} + + +int FakeNullableResource::handler_POST( + ChildWithNullable & childWithNullable) +{ + return handler_POST_func(childWithNullable); +} + + +std::string FakeNullableResource::extractBodyContent(const std::shared_ptr& session) { + const auto request = session->get_request(); + int content_length = request->get_header("Content-Length", 0); + std::string bodyContent; + session->fetch(content_length, + [&bodyContent](const std::shared_ptr session, + const restbed::Bytes &body) { + bodyContent = restbed::String::format( + "%.*s\n", (int)body.size(), body.data()); + }); + return bodyContent; +} + +std::string FakeNullableResource::extractFormParamsFromBody(const std::string& paramName, const std::string& body) { + const auto uri = restbed::Uri("urlencoded?" + body, true); + const auto params = uri.get_query_parameters(); + const auto result = params.find(paramName); + if (result != params.cend()) { + return result->second; + } + return ""; +} FakeTest_query_parametersResource::FakeTest_query_parametersResource(const std::string& context /* = "/v2" */) { this->set_path(context + "/fake/test-query-parameters"); @@ -2140,6 +2253,12 @@ std::shared_ptr FakeApi::getFakeJson } return m_spFakeJsonFormDataResource; } +std::shared_ptr FakeApi::getFakeNullableResource() { + if (!m_spFakeNullableResource) { + setResource(std::make_shared()); + } + return m_spFakeNullableResource; +} std::shared_ptr FakeApi::getFakeTest_query_parametersResource() { if (!m_spFakeTest_query_parametersResource) { setResource(std::make_shared()); @@ -2202,6 +2321,10 @@ void FakeApi::setResource(std::shared_ptrpublish(m_spFakeJsonFormDataResource); } +void FakeApi::setResource(std::shared_ptr resource) { + m_spFakeNullableResource = resource; + m_service->publish(m_spFakeNullableResource); +} void FakeApi::setResource(std::shared_ptr resource) { m_spFakeTest_query_parametersResource = resource; m_service->publish(m_spFakeTest_query_parametersResource); @@ -2262,6 +2385,10 @@ void FakeApi::setFakeApiFakeJsonFormDataResource(std::shared_ptrpublish(m_spFakeJsonFormDataResource); } +void FakeApi::setFakeApiFakeNullableResource(std::shared_ptr spFakeNullableResource) { + m_spFakeNullableResource = spFakeNullableResource; + m_service->publish(m_spFakeNullableResource); +} void FakeApi::setFakeApiFakeTest_query_parametersResource(std::shared_ptr spFakeTest_query_parametersResource) { m_spFakeTest_query_parametersResource = spFakeTest_query_parametersResource; m_service->publish(m_spFakeTest_query_parametersResource); @@ -2311,6 +2438,9 @@ void FakeApi::publishDefaultResources() { if (!m_spFakeJsonFormDataResource) { setResource(std::make_shared()); } + if (!m_spFakeNullableResource) { + setResource(std::make_shared()); + } if (!m_spFakeTest_query_parametersResource) { setResource(std::make_shared()); } diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.h b/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.h index 17f76507ffb9..46dc5181826c 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.h @@ -31,6 +31,7 @@ #include #include +#include "ChildWithNullable.h" #include "Client.h" #include "EnumClass.h" #include "FakeBigDecimalMap_200_response.h" @@ -960,6 +961,68 @@ class FakeJsonFormDataResource: public restbed::Resource void handler_GET_internal(const std::shared_ptr session); }; +/// +/// test nullable parent property +/// +/// +/// +/// +class FakeNullableResource: public restbed::Resource +{ +public: + FakeNullableResource(const std::string& context = "/v2"); + virtual ~FakeNullableResource() = default; + + FakeNullableResource( + const FakeNullableResource& other) = default; // copy constructor + FakeNullableResource(FakeNullableResource&& other) noexcept = default; // move constructor + + FakeNullableResource& operator=(const FakeNullableResource& other) = default; // copy assignment + FakeNullableResource& operator=(FakeNullableResource&& other) noexcept = default; // move assignment + + ///////////////////////////////////////////////////// + // Set these to implement the server functionality // + ///////////////////////////////////////////////////// + std::function handler_POST_func = + [](ChildWithNullable &) -> int + { throw FakeApiException(501, "Not implemented"); }; + + +protected: + ////////////////////////////////////////////////////////// + // As an alternative to setting the `std::function`s // + // override these to implement the server functionality // + ////////////////////////////////////////////////////////// + + virtual int handler_POST( + ChildWithNullable & childWithNullable); + + +protected: + ////////////////////////////////////// + // Override these for customization // + ////////////////////////////////////// + + virtual std::string extractBodyContent(const std::shared_ptr& session); + virtual std::string extractFormParamsFromBody(const std::string& paramName, const std::string& body); + + virtual std::pair handleFakeApiException(const FakeApiException& e); + virtual std::pair handleStdException(const std::exception& e); + virtual std::pair handleUnspecifiedException(); + + virtual void setResponseHeader(const std::shared_ptr& session, + const std::string& header); + + virtual void returnResponse(const std::shared_ptr& session, + const int status, const std::string& result, std::multimap& contentType); + virtual void defaultSessionClose(const std::shared_ptr& session, + const int status, const std::string& result); + +private: + void handler_POST_internal(const std::shared_ptr session); +}; + /// /// /// @@ -1038,6 +1101,7 @@ using FakeApiFakeBody_with_query_paramsResource [[deprecated]] = FakeApiResource using FakeApiFakeResource [[deprecated]] = FakeApiResources::FakeResource; using FakeApiFakeInline_additionalPropertiesResource [[deprecated]] = FakeApiResources::FakeInline_additionalPropertiesResource; using FakeApiFakeJsonFormDataResource [[deprecated]] = FakeApiResources::FakeJsonFormDataResource; +using FakeApiFakeNullableResource [[deprecated]] = FakeApiResources::FakeNullableResource; using FakeApiFakeTest_query_parametersResource [[deprecated]] = FakeApiResources::FakeTest_query_parametersResource; // @@ -1063,6 +1127,7 @@ class FakeApi std::shared_ptr getFakeResource(); std::shared_ptr getFakeInline_additionalPropertiesResource(); std::shared_ptr getFakeJsonFormDataResource(); + std::shared_ptr getFakeNullableResource(); std::shared_ptr getFakeTest_query_parametersResource(); void setResource(std::shared_ptr resource); @@ -1079,6 +1144,7 @@ class FakeApi void setResource(std::shared_ptr resource); void setResource(std::shared_ptr resource); void setResource(std::shared_ptr resource); + void setResource(std::shared_ptr resource); void setResource(std::shared_ptr resource); [[deprecated("use setResource()")]] virtual void setFakeApiFakeBigDecimalMapResource(std::shared_ptr spFakeApiFakeBigDecimalMapResource); @@ -1109,6 +1175,8 @@ class FakeApi [[deprecated("use setResource()")]] virtual void setFakeApiFakeJsonFormDataResource(std::shared_ptr spFakeApiFakeJsonFormDataResource); [[deprecated("use setResource()")]] + virtual void setFakeApiFakeNullableResource(std::shared_ptr spFakeApiFakeNullableResource); + [[deprecated("use setResource()")]] virtual void setFakeApiFakeTest_query_parametersResource(std::shared_ptr spFakeApiFakeTest_query_parametersResource); virtual void publishDefaultResources(); @@ -1130,6 +1198,7 @@ class FakeApi std::shared_ptr m_spFakeResource; std::shared_ptr m_spFakeInline_additionalPropertiesResource; std::shared_ptr m_spFakeJsonFormDataResource; + std::shared_ptr m_spFakeNullableResource; std::shared_ptr m_spFakeTest_query_parametersResource; private: diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ChildWithNullable.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/ChildWithNullable.cpp new file mode 100644 index 000000000000..48dd4b6314b3 --- /dev/null +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ChildWithNullable.cpp @@ -0,0 +1,140 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +#include "ChildWithNullable.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "helpers.h" + +using boost::property_tree::ptree; +using boost::property_tree::read_json; +using boost::property_tree::write_json; + +namespace org { +namespace openapitools { +namespace server { +namespace model { + +ChildWithNullable::ChildWithNullable(boost::property_tree::ptree const& pt) +{ + fromPropertyTree(pt); +} + + +std::string ChildWithNullable::toJsonString(bool prettyJson /* = false */) const +{ + std::stringstream ss; + write_json(ss, this->toPropertyTree(), prettyJson); + // workaround inspired by: https://stackoverflow.com/a/56395440 + std::regex reg("\\\"([0-9]+\\.{0,1}[0-9]*)\\\""); + std::string result = std::regex_replace(ss.str(), reg, "$1"); + return result; +} + +void ChildWithNullable::fromJsonString(std::string const& jsonString) +{ + std::stringstream ss(jsonString); + ptree pt; + read_json(ss,pt); + this->fromPropertyTree(pt); +} + +ptree ChildWithNullable::toPropertyTree() const +{ + ptree pt; + ptree tmp_node; + pt.put("type", m_Type); + pt.put("nullableProperty", m_NullableProperty); + pt.put("otherProperty", m_OtherProperty); + return pt; +} + +void ChildWithNullable::fromPropertyTree(ptree const &pt) +{ + ptree tmp_node; + setType(pt.get("type", "")); + m_NullableProperty = pt.get("nullableProperty", ""); + m_OtherProperty = pt.get("otherProperty", ""); +} + +std::string ChildWithNullable::getType() const +{ + return m_Type; +} + +void ChildWithNullable::setType(std::string value) +{ + static const std::array allowedValues = { + "ChildWithNullable" + }; + + if (std::find(allowedValues.begin(), allowedValues.end(), value) != allowedValues.end()) { + m_Type = value; + } else { + throw std::runtime_error("Value " + boost::lexical_cast(value) + " not allowed"); + } +} + + +std::string ChildWithNullable::getNullableProperty() const +{ + return m_NullableProperty; +} + +void ChildWithNullable::setNullableProperty(std::string value) +{ + m_NullableProperty = value; +} + + +std::string ChildWithNullable::getOtherProperty() const +{ + return m_OtherProperty; +} + +void ChildWithNullable::setOtherProperty(std::string value) +{ + m_OtherProperty = value; +} + + + +std::vector createChildWithNullableVectorFromJsonString(const std::string& json) +{ + std::stringstream sstream(json); + boost::property_tree::ptree pt; + boost::property_tree::json_parser::read_json(sstream,pt); + + auto vec = std::vector(); + for (const auto& child: pt) { + vec.emplace_back(ChildWithNullable(child.second)); + } + + return vec; +} + +} +} +} +} + diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ChildWithNullable.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/ChildWithNullable.h new file mode 100644 index 000000000000..7044b8204ee0 --- /dev/null +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ChildWithNullable.h @@ -0,0 +1,106 @@ +/** + * OpenAPI Petstore + * 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 7.0.1-SNAPSHOT. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/* + * ChildWithNullable.h + * + * + */ + +#ifndef ChildWithNullable_H_ +#define ChildWithNullable_H_ + + + +#include "ParentWithNullable.h" +#include +#include +#include +#include +#include +#include "ParentWithNullable.h" +#include "helpers.h" + +namespace org { +namespace openapitools { +namespace server { +namespace model { + +/// +/// +/// +class ChildWithNullable : public ParentWithNullable +{ +public: + ChildWithNullable() = default; + explicit ChildWithNullable(boost::property_tree::ptree const& pt); + virtual ~ChildWithNullable() = default; + + ChildWithNullable(const ChildWithNullable& other) = default; // copy constructor + ChildWithNullable(ChildWithNullable&& other) noexcept = default; // move constructor + + ChildWithNullable& operator=(const ChildWithNullable& other) = default; // copy assignment + ChildWithNullable& operator=(ChildWithNullable&& other) noexcept = default; // move assignment + + std::string toJsonString(bool prettyJson = false) const; + void fromJsonString(std::string const& jsonString); + boost::property_tree::ptree toPropertyTree() const; + void fromPropertyTree(boost::property_tree::ptree const& pt); + + + ///////////////////////////////////////////// + /// ChildWithNullable members + + /// + /// + /// + std::string getType() const; + void setType(std::string value); + + /// + /// + /// + std::string getNullableProperty() const; + void setNullableProperty(std::string value); + + /// + /// + /// + std::string getOtherProperty() const; + void setOtherProperty(std::string value); + +protected: + std::string m_Type = ""; + std::string m_NullableProperty = ""; + std::string m_OtherProperty = ""; +}; + +std::vector createChildWithNullableVectorFromJsonString(const std::string& json); + +template<> +inline boost::property_tree::ptree toPt(const ChildWithNullable& val) { + return val.toPropertyTree(); +} + +template<> +inline ChildWithNullable fromPt(const boost::property_tree::ptree& pt) { + ChildWithNullable ret; + ret.fromPropertyTree(pt); + return ret; +} + +} +} +} +} + +#endif /* ChildWithNullable_H_ */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ParentWithNullable.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/ParentWithNullable.cpp new file mode 100644 index 000000000000..28226e76d8a9 --- /dev/null +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ParentWithNullable.cpp @@ -0,0 +1,127 @@ +/** + * OpenAPI Petstore + * 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 7.0.1-SNAPSHOT. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +#include "ParentWithNullable.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "helpers.h" + +using boost::property_tree::ptree; +using boost::property_tree::read_json; +using boost::property_tree::write_json; + +namespace org { +namespace openapitools { +namespace server { +namespace model { + +ParentWithNullable::ParentWithNullable(boost::property_tree::ptree const& pt) +{ + fromPropertyTree(pt); +} + + +std::string ParentWithNullable::toJsonString(bool prettyJson /* = false */) const +{ + std::stringstream ss; + write_json(ss, this->toPropertyTree(), prettyJson); + // workaround inspired by: https://stackoverflow.com/a/56395440 + std::regex reg("\\\"([0-9]+\\.{0,1}[0-9]*)\\\""); + std::string result = std::regex_replace(ss.str(), reg, "$1"); + return result; +} + +void ParentWithNullable::fromJsonString(std::string const& jsonString) +{ + std::stringstream ss(jsonString); + ptree pt; + read_json(ss,pt); + this->fromPropertyTree(pt); +} + +ptree ParentWithNullable::toPropertyTree() const +{ + ptree pt; + ptree tmp_node; + pt.put("type", m_Type); + pt.put("nullableProperty", m_NullableProperty); + return pt; +} + +void ParentWithNullable::fromPropertyTree(ptree const &pt) +{ + ptree tmp_node; + setType(pt.get("type", "")); + m_NullableProperty = pt.get("nullableProperty", ""); +} + +std::string ParentWithNullable::getType() const +{ + return m_Type; +} + +void ParentWithNullable::setType(std::string value) +{ + static const std::array allowedValues = { + "ChildWithNullable" + }; + + if (std::find(allowedValues.begin(), allowedValues.end(), value) != allowedValues.end()) { + m_Type = value; + } else { + throw std::runtime_error("Value " + boost::lexical_cast(value) + " not allowed"); + } +} + + +std::string ParentWithNullable::getNullableProperty() const +{ + return m_NullableProperty; +} + +void ParentWithNullable::setNullableProperty(std::string value) +{ + m_NullableProperty = value; +} + + + +std::vector createParentWithNullableVectorFromJsonString(const std::string& json) +{ + std::stringstream sstream(json); + boost::property_tree::ptree pt; + boost::property_tree::json_parser::read_json(sstream,pt); + + auto vec = std::vector(); + for (const auto& child: pt) { + vec.emplace_back(ParentWithNullable(child.second)); + } + + return vec; +} + +} +} +} +} + diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ParentWithNullable.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/ParentWithNullable.h new file mode 100644 index 000000000000..adb872bbee33 --- /dev/null +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ParentWithNullable.h @@ -0,0 +1,97 @@ +/** + * OpenAPI Petstore + * 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 7.0.1-SNAPSHOT. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/* + * ParentWithNullable.h + * + * + */ + +#ifndef ParentWithNullable_H_ +#define ParentWithNullable_H_ + + + +#include +#include +#include +#include +#include +#include "helpers.h" + +namespace org { +namespace openapitools { +namespace server { +namespace model { + +/// +/// +/// +class ParentWithNullable +{ +public: + ParentWithNullable() = default; + explicit ParentWithNullable(boost::property_tree::ptree const& pt); + virtual ~ParentWithNullable() = default; + + ParentWithNullable(const ParentWithNullable& other) = default; // copy constructor + ParentWithNullable(ParentWithNullable&& other) noexcept = default; // move constructor + + ParentWithNullable& operator=(const ParentWithNullable& other) = default; // copy assignment + ParentWithNullable& operator=(ParentWithNullable&& other) noexcept = default; // move assignment + + std::string toJsonString(bool prettyJson = false) const; + void fromJsonString(std::string const& jsonString); + boost::property_tree::ptree toPropertyTree() const; + void fromPropertyTree(boost::property_tree::ptree const& pt); + + + ///////////////////////////////////////////// + /// ParentWithNullable members + + /// + /// + /// + std::string getType() const; + void setType(std::string value); + + /// + /// + /// + std::string getNullableProperty() const; + void setNullableProperty(std::string value); + +protected: + std::string m_Type = ""; + std::string m_NullableProperty = ""; +}; + +std::vector createParentWithNullableVectorFromJsonString(const std::string& json); + +template<> +inline boost::property_tree::ptree toPt(const ParentWithNullable& val) { + return val.toPropertyTree(); +} + +template<> +inline ParentWithNullable fromPt(const boost::property_tree::ptree& pt) { + ParentWithNullable ret; + ret.fromPropertyTree(pt); + return ret; +} + +} +} +} +} + +#endif /* ParentWithNullable_H_ */ 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 5aaf8ee8e3aa..7fb08618a074 100644 --- a/samples/server/petstore/java-helidon-server/mp/.openapi-generator/FILES +++ b/samples/server/petstore/java-helidon-server/mp/.openapi-generator/FILES @@ -26,6 +26,7 @@ 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/Category.java +src/main/java/org/openapitools/server/model/ChildWithNullable.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 @@ -58,6 +59,7 @@ src/main/java/org/openapitools/server/model/OuterEnumDefaultValue.java src/main/java/org/openapitools/server/model/OuterEnumInteger.java src/main/java/org/openapitools/server/model/OuterEnumIntegerDefaultValue.java src/main/java/org/openapitools/server/model/OuterObjectWithEnumProperty.java +src/main/java/org/openapitools/server/model/ParentWithNullable.java src/main/java/org/openapitools/server/model/Pet.java src/main/java/org/openapitools/server/model/ReadOnlyFirst.java src/main/java/org/openapitools/server/model/SingleRefType.java diff --git a/samples/server/petstore/java-helidon-server/mp/README.md b/samples/server/petstore/java-helidon-server/mp/README.md index 8f4d37807e6d..5fcf51dcd376 100644 --- a/samples/server/petstore/java-helidon-server/mp/README.md +++ b/samples/server/petstore/java-helidon-server/mp/README.md @@ -30,6 +30,7 @@ curl -X GET http://petstore.swagger.io:80/v2 curl -X DELETE http://petstore.swagger.io:80/v2 curl -X POST http://petstore.swagger.io:80/v2/inline-additionalProperties curl -X GET http://petstore.swagger.io:80/v2/jsonFormData +curl -X POST http://petstore.swagger.io:80/v2/nullable curl -X PUT http://petstore.swagger.io:80/v2/test-query-parameters curl -X PATCH http://petstore.swagger.io:80/v2 curl -X POST http://petstore.swagger.io:80/v2/pet diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/FakeService.java b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/FakeService.java index 83b858b3d8a4..fdc92a3bb8d9 100644 --- a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/FakeService.java +++ b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/FakeService.java @@ -13,6 +13,7 @@ package org.openapitools.server.api; import java.math.BigDecimal; +import org.openapitools.server.model.ChildWithNullable; import org.openapitools.server.model.Client; import org.openapitools.server.model.EnumClass; import org.openapitools.server.model.FakeBigDecimalMap200Response; @@ -126,6 +127,11 @@ public interface FakeService { @Consumes({ "application/x-www-form-urlencoded" }) void testJsonFormData(@FormParam(value = "param") String param, @FormParam(value = "param2") String param2); + @POST + @Path("/nullable") + @Consumes({ "application/json" }) + void testNullable(@Valid @NotNull ChildWithNullable childWithNullable); + @PUT @Path("/test-query-parameters") void testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe, @QueryParam("ioutil") @NotNull List ioutil, @QueryParam("http") @NotNull List http, @QueryParam("url") @NotNull List url, @QueryParam("context") @NotNull List context, @QueryParam("allowEmpty") @NotNull String allowEmpty, @QueryParam("language") Map language); diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/FakeServiceImpl.java b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/FakeServiceImpl.java index e20e96c568b7..74dae73bfa08 100644 --- a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/FakeServiceImpl.java +++ b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/api/FakeServiceImpl.java @@ -13,6 +13,7 @@ package org.openapitools.server.api; import java.math.BigDecimal; +import org.openapitools.server.model.ChildWithNullable; import org.openapitools.server.model.Client; import org.openapitools.server.model.EnumClass; import org.openapitools.server.model.FakeBigDecimalMap200Response; @@ -160,6 +161,12 @@ public void testInlineAdditionalProperties(@Valid @NotNull Map r public void testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2) { } + @POST + @Path("/nullable") + @Consumes({ "application/json" }) + public void testNullable(@Valid @NotNull ChildWithNullable childWithNullable) { + } + @PUT @Path("/test-query-parameters") public void testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe,@QueryParam("ioutil") @NotNull List ioutil,@QueryParam("http") @NotNull List http,@QueryParam("url") @NotNull List url,@QueryParam("context") @NotNull List context,@QueryParam("allowEmpty") @NotNull String allowEmpty,@QueryParam("language") Map language) { diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/ChildWithNullable.java b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/ChildWithNullable.java new file mode 100644 index 000000000000..abe443a27f85 --- /dev/null +++ b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/ChildWithNullable.java @@ -0,0 +1,80 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.server.model.ParentWithNullable; +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 ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + /** + * Get otherProperty + * @return otherProperty + **/ + public String getOtherProperty() { + return otherProperty; + } + + /** + * Set otherProperty + **/ + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + + /** + * Create a string representation of this pojo. + **/ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/ParentWithNullable.java new file mode 100644 index 000000000000..beb88e89ed56 --- /dev/null +++ b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/ParentWithNullable.java @@ -0,0 +1,149 @@ +/* + * OpenAPI Petstore + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +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 ParentWithNullable { + +public enum TypeEnum { + + CHILDWITHNULLABLE(String.valueOf("ChildWithNullable")); + + + private String value; + + TypeEnum (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 TypeEnum fromString(String s) { + for (TypeEnum b : TypeEnum.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 TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + + private TypeEnum type; + + private String nullableProperty; + + /** + * Get type + * @return type + **/ + public TypeEnum getType() { + return type; + } + + /** + * Set type + **/ + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + **/ + public String getNullableProperty() { + return nullableProperty; + } + + /** + * Set nullableProperty + **/ + public void setNullableProperty(String nullableProperty) { + this.nullableProperty = nullableProperty; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = nullableProperty; + return this; + } + + + /** + * Create a string representation of this pojo. + **/ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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 66bea57fa648..59328fa022de 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 @@ -1031,6 +1031,25 @@ paths: - fake x-content-type: application/json x-accepts: application/json + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1881,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/server/petstore/java-helidon-server/mp/src/test/java/org/openapitools/server/model/ChildWithNullableTest.java b/samples/server/petstore/java-helidon-server/mp/src/test/java/org/openapitools/server/model/ChildWithNullableTest.java new file mode 100644 index 000000000000..6246621383e2 --- /dev/null +++ b/samples/server/petstore/java-helidon-server/mp/src/test/java/org/openapitools/server/model/ChildWithNullableTest.java @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.server.model.ParentWithNullable; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ChildWithNullable + */ +public class ChildWithNullableTest { + private final ChildWithNullable model = new ChildWithNullable(); + + /** + * Model tests for ChildWithNullable + */ + @Test + public void testChildWithNullable() { + // TODO: test ChildWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + + /** + * Test the property 'otherProperty' + */ + @Test + public void otherPropertyTest() { + // TODO: test otherProperty + } + +} diff --git a/samples/server/petstore/java-helidon-server/mp/src/test/java/org/openapitools/server/model/ParentWithNullableTest.java b/samples/server/petstore/java-helidon-server/mp/src/test/java/org/openapitools/server/model/ParentWithNullableTest.java new file mode 100644 index 000000000000..466dc910f557 --- /dev/null +++ b/samples/server/petstore/java-helidon-server/mp/src/test/java/org/openapitools/server/model/ParentWithNullableTest.java @@ -0,0 +1,53 @@ +/* + * OpenAPI Petstore + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ParentWithNullable + */ +public class ParentWithNullableTest { + private final ParentWithNullable model = new ParentWithNullable(); + + /** + * Model tests for ParentWithNullable + */ + @Test + public void testParentWithNullable() { + // TODO: test ParentWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + +} 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 c3c751515ab3..7202c2d2cdc3 100644 --- a/samples/server/petstore/java-helidon-server/se/.openapi-generator/FILES +++ b/samples/server/petstore/java-helidon-server/se/.openapi-generator/FILES @@ -27,6 +27,7 @@ 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/Category.java +src/main/java/org/openapitools/server/model/ChildWithNullable.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 @@ -59,6 +60,7 @@ src/main/java/org/openapitools/server/model/OuterEnumDefaultValue.java src/main/java/org/openapitools/server/model/OuterEnumInteger.java src/main/java/org/openapitools/server/model/OuterEnumIntegerDefaultValue.java src/main/java/org/openapitools/server/model/OuterObjectWithEnumProperty.java +src/main/java/org/openapitools/server/model/ParentWithNullable.java src/main/java/org/openapitools/server/model/Pet.java src/main/java/org/openapitools/server/model/ReadOnlyFirst.java src/main/java/org/openapitools/server/model/SingleRefType.java diff --git a/samples/server/petstore/java-helidon-server/se/README.md b/samples/server/petstore/java-helidon-server/se/README.md index 6bf2ea9caa79..3eda86a8663a 100644 --- a/samples/server/petstore/java-helidon-server/se/README.md +++ b/samples/server/petstore/java-helidon-server/se/README.md @@ -30,6 +30,7 @@ curl -X GET http://petstore.swagger.io:80/v2/fake curl -X DELETE http://petstore.swagger.io:80/v2/fake curl -X POST http://petstore.swagger.io:80/v2/fake/inline-additionalProperties curl -X GET http://petstore.swagger.io:80/v2/fake/jsonFormData +curl -X POST http://petstore.swagger.io:80/v2/fake/nullable curl -X PUT http://petstore.swagger.io:80/v2/fake/test-query-parameters curl -X PATCH http://petstore.swagger.io:80/v2/fake_classname_test curl -X POST http://petstore.swagger.io:80/v2/pet diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/api/FakeService.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/api/FakeService.java index bdcf915f1b5a..16e4aa15e8ba 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/api/FakeService.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/api/FakeService.java @@ -1,6 +1,7 @@ package org.openapitools.server.api; import java.math.BigDecimal; +import org.openapitools.server.model.ChildWithNullable; import org.openapitools.server.model.Client; import org.openapitools.server.model.EnumClass; import org.openapitools.server.model.FakeBigDecimalMap200Response; @@ -48,6 +49,7 @@ default void update(Routing.Rules rules) { rules.delete("/fake", this::testGroupParameters); rules.post("/fake/inline-additionalProperties", this::testInlineAdditionalProperties); rules.get("/fake/jsonFormData", this::testJsonFormData); + rules.post("/fake/nullable", Handler.create(ChildWithNullable.class, this::testNullable)); rules.put("/fake/test-query-parameters", this::testQueryParameterCollectionFormat); } @@ -177,6 +179,14 @@ default void update(Routing.Rules rules) { */ void testJsonFormData(ServerRequest request, ServerResponse response); + /** + * POST /fake/nullable : test nullable parent property. + * @param request the server request + * @param response the server response + * @param childWithNullable request body + */ + void testNullable(ServerRequest request, ServerResponse response, ChildWithNullable childWithNullable); + /** * PUT /fake/test-query-parameters. * @param request the server request diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/api/FakeServiceImpl.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/api/FakeServiceImpl.java index 05a148cdbcc1..11eb9fb2c68b 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/api/FakeServiceImpl.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/api/FakeServiceImpl.java @@ -1,6 +1,7 @@ package org.openapitools.server.api; import java.math.BigDecimal; +import org.openapitools.server.model.ChildWithNullable; import org.openapitools.server.model.Client; import org.openapitools.server.model.EnumClass; import org.openapitools.server.model.FakeBigDecimalMap200Response; @@ -97,6 +98,10 @@ public void testJsonFormData(ServerRequest request, ServerResponse response) { response.status(HTTP_CODE_NOT_IMPLEMENTED).send(); } + public void testNullable(ServerRequest request, ServerResponse response, ChildWithNullable childWithNullable) { + response.status(HTTP_CODE_NOT_IMPLEMENTED).send(); + } + public void testQueryParameterCollectionFormat(ServerRequest request, ServerResponse response) { response.status(HTTP_CODE_NOT_IMPLEMENTED).send(); } diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ChildWithNullable.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ChildWithNullable.java new file mode 100644 index 000000000000..aced0bb7a9ef --- /dev/null +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ChildWithNullable.java @@ -0,0 +1,73 @@ +package org.openapitools.server.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.server.model.ParentWithNullable; + + + +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + /** + * Default constructor. + */ + public ChildWithNullable() { + // JSON-B / Jackson + } + + /** + * Create ChildWithNullable. + * + * @param otherProperty otherProperty + */ + public ChildWithNullable( + String otherProperty + ) { + this.otherProperty = otherProperty; + } + + + + /** + * Get otherProperty + * @return otherProperty + */ + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + /** + * Create a string representation of this pojo. + **/ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ParentWithNullable.java new file mode 100644 index 000000000000..22a7bc13fce2 --- /dev/null +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/ParentWithNullable.java @@ -0,0 +1,125 @@ +package org.openapitools.server.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; + + + +public class ParentWithNullable { + + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + + @JsonCreator + public static TypeEnum fromValue(String text) { + for (TypeEnum b : TypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + text + "'"); + } + } + + + private TypeEnum type; + private String nullableProperty; + + /** + * Default constructor. + */ + public ParentWithNullable() { + // JSON-B / Jackson + } + + /** + * Create ParentWithNullable. + * + * @param type type + * @param nullableProperty nullableProperty + */ + public ParentWithNullable( + TypeEnum type, + String nullableProperty + ) { + this.type = type; + this.nullableProperty = nullableProperty; + } + + + + /** + * Get type + * @return type + */ + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + public String getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(String nullableProperty) { + this.nullableProperty = nullableProperty; + } + + /** + * Create a string representation of this pojo. + **/ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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 66bea57fa648..59328fa022de 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 @@ -1031,6 +1031,25 @@ paths: - fake x-content-type: application/json x-accepts: application/json + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1881,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/server/petstore/java-helidon-server/se/src/test/java/org/openapitools/server/model/ChildWithNullableTest.java b/samples/server/petstore/java-helidon-server/se/src/test/java/org/openapitools/server/model/ChildWithNullableTest.java new file mode 100644 index 000000000000..6246621383e2 --- /dev/null +++ b/samples/server/petstore/java-helidon-server/se/src/test/java/org/openapitools/server/model/ChildWithNullableTest.java @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.server.model.ParentWithNullable; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ChildWithNullable + */ +public class ChildWithNullableTest { + private final ChildWithNullable model = new ChildWithNullable(); + + /** + * Model tests for ChildWithNullable + */ + @Test + public void testChildWithNullable() { + // TODO: test ChildWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + + /** + * Test the property 'otherProperty' + */ + @Test + public void otherPropertyTest() { + // TODO: test otherProperty + } + +} diff --git a/samples/server/petstore/java-helidon-server/se/src/test/java/org/openapitools/server/model/ParentWithNullableTest.java b/samples/server/petstore/java-helidon-server/se/src/test/java/org/openapitools/server/model/ParentWithNullableTest.java new file mode 100644 index 000000000000..466dc910f557 --- /dev/null +++ b/samples/server/petstore/java-helidon-server/se/src/test/java/org/openapitools/server/model/ParentWithNullableTest.java @@ -0,0 +1,53 @@ +/* + * OpenAPI Petstore + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ParentWithNullable + */ +public class ParentWithNullableTest { + private final ParentWithNullable model = new ParentWithNullable(); + + /** + * Model tests for ParentWithNullable + */ + @Test + public void testParentWithNullable() { + // TODO: test ParentWithNullable + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'nullableProperty' + */ + @Test + public void nullablePropertyTest() { + // TODO: test nullableProperty + } + +} diff --git a/samples/server/petstore/jaxrs-jersey/.openapi-generator/FILES b/samples/server/petstore/jaxrs-jersey/.openapi-generator/FILES index c991a1e399e1..d76f1d408ebd 100644 --- a/samples/server/petstore/jaxrs-jersey/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-jersey/.openapi-generator/FILES @@ -30,6 +30,7 @@ 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/Category.java +src/gen/java/org/openapitools/model/ChildWithNullable.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 @@ -62,6 +63,7 @@ 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/OuterObjectWithEnumProperty.java +src/gen/java/org/openapitools/model/ParentWithNullable.java src/gen/java/org/openapitools/model/Pet.java src/gen/java/org/openapitools/model/ReadOnlyFirst.java src/gen/java/org/openapitools/model/SingleRefType.java diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java index b65155e0d453..6ec67df2d1a6 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java @@ -7,6 +7,7 @@ import io.swagger.jaxrs.*; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import java.util.Date; import org.openapitools.model.EnumClass; @@ -280,6 +281,18 @@ public Response testJsonFormData(@ApiParam(value = "field1", required=true) @Fo throws NotFoundException { return delegate.testJsonFormData(param, param2, securityContext); } + @javax.ws.rs.POST + @Path("/nullable") + @Consumes({ "application/json" }) + + @io.swagger.annotations.ApiOperation(value = "test nullable parent property", notes = "", response = Void.class, tags={ "fake", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) + }) + public Response testNullable(@ApiParam(value = "request body", required = true) @NotNull @Valid ChildWithNullable childWithNullable,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.testNullable(childWithNullable, securityContext); + } @javax.ws.rs.PUT @Path("/test-query-parameters") diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApiService.java index 8fbf2434e379..6675105bdc60 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApiService.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApiService.java @@ -5,6 +5,7 @@ import org.glassfish.jersey.media.multipart.FormDataBodyPart; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import java.util.Date; import org.openapitools.model.EnumClass; @@ -46,6 +47,7 @@ public abstract class FakeApiService { public abstract Response testGroupParameters( @NotNull Integer requiredStringGroup, @NotNull Boolean requiredBooleanGroup, @NotNull Long requiredInt64Group,Integer stringGroup,Boolean booleanGroup,Long int64Group,SecurityContext securityContext) throws NotFoundException; public abstract Response testInlineAdditionalProperties(Map requestBody,SecurityContext securityContext) throws NotFoundException; public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext) throws NotFoundException; + public abstract Response testNullable(ChildWithNullable childWithNullable,SecurityContext securityContext) throws NotFoundException; public abstract Response testQueryParameterCollectionFormat( @NotNull List pipe, @NotNull List ioutil, @NotNull List http, @NotNull List url, @NotNull List context, @NotNull String allowEmpty,Map language,SecurityContext securityContext) throws NotFoundException; public abstract Response uploadFileWithRequiredFile(Long petId,FormDataBodyPart requiredFileBodypart,String additionalMetadata,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ChildWithNullable.java new file mode 100644 index 000000000000..371f22123bc4 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ChildWithNullable.java @@ -0,0 +1,98 @@ +/* + * OpenAPI Petstore + * 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.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.model.ParentWithNullable; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import javax.validation.constraints.*; +import javax.validation.Valid; + +/** + * ChildWithNullable + */ +@JsonPropertyOrder({ + ChildWithNullable.JSON_PROPERTY_OTHER_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") +public class ChildWithNullable extends ParentWithNullable { + public static final String JSON_PROPERTY_OTHER_PROPERTY = "otherProperty"; + @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) + private String otherProperty; + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + **/ + @JsonProperty(value = "otherProperty") + @ApiModelProperty(value = "") + + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return super.equals(o) && Objects.equals(otherProperty, childWithNullable.otherProperty); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode(), otherProperty); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ParentWithNullable.java new file mode 100644 index 000000000000..eedfd014e9c6 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ParentWithNullable.java @@ -0,0 +1,160 @@ +/* + * OpenAPI Petstore + * 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.JsonIgnoreProperties; +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.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; + +/** + * ParentWithNullable + */ +@JsonPropertyOrder({ + ParentWithNullable.JSON_PROPERTY_TYPE, + ParentWithNullable.JSON_PROPERTY_NULLABLE_PROPERTY +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable"), +}) + +public class ParentWithNullable { + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @JsonProperty(JSON_PROPERTY_TYPE) + private TypeEnum type; + + public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; + @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) + private String nullableProperty; + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @JsonProperty(value = "type") + @ApiModelProperty(value = "") + + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = nullableProperty; + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + **/ + @JsonProperty(value = "nullableProperty") + @ApiModelProperty(value = "") + + public String getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(String nullableProperty) { + this.nullableProperty = nullableProperty; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(type, parentWithNullable.type) && + Objects.equals(nullableProperty, parentWithNullable.nullableProperty); + } + + @Override + public int hashCode() { + return Objects.hash(type, nullableProperty); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index 1f513684a47a..8f60cba30a63 100644 --- a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -2,6 +2,7 @@ import org.openapitools.api.*; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import java.util.Date; import org.openapitools.model.EnumClass; @@ -114,6 +115,11 @@ public Response testJsonFormData(String param, String param2, SecurityContext se return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } @Override + public Response testNullable(ChildWithNullable childWithNullable, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override public Response testQueryParameterCollectionFormat( @NotNull List pipe, @NotNull List ioutil, @NotNull List http, @NotNull List url, @NotNull List context, @NotNull String allowEmpty, Map language, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/php-laravel/.openapi-generator/FILES b/samples/server/petstore/php-laravel/.openapi-generator/FILES index dbd3b18a17d0..b962dea822e3 100644 --- a/samples/server/petstore/php-laravel/.openapi-generator/FILES +++ b/samples/server/petstore/php-laravel/.openapi-generator/FILES @@ -32,6 +32,7 @@ lib/app/Models/ArrayTest.php lib/app/Models/Capitalization.php lib/app/Models/Cat.php lib/app/Models/Category.php +lib/app/Models/ChildWithNullable.php lib/app/Models/ClassModel.php lib/app/Models/Client.php lib/app/Models/DeprecatedObject.php @@ -63,6 +64,7 @@ lib/app/Models/OuterEnumDefaultValue.php lib/app/Models/OuterEnumInteger.php lib/app/Models/OuterEnumIntegerDefaultValue.php lib/app/Models/OuterObjectWithEnumProperty.php +lib/app/Models/ParentWithNullable.php lib/app/Models/Pet.php lib/app/Models/ReadOnlyFirst.php lib/app/Models/SingleRefType.php diff --git a/samples/server/petstore/php-laravel/lib/app/Http/Controllers/FakeController.php b/samples/server/petstore/php-laravel/lib/app/Http/Controllers/FakeController.php index 2aadf9fe902c..486d313b45d2 100644 --- a/samples/server/petstore/php-laravel/lib/app/Http/Controllers/FakeController.php +++ b/samples/server/petstore/php-laravel/lib/app/Http/Controllers/FakeController.php @@ -426,6 +426,30 @@ public function testJsonFormData() return response('How about implementing testJsonFormData as a get method ?'); } + /** + * Operation testNullable + * + * test nullable parent property. + * + * + * @return Http response + */ + public function testNullable() + { + $input = Request::all(); + + //path params validation + + + //not path params validation + if (!isset($input['childWithNullable'])) { + throw new \InvalidArgumentException('Missing the required parameter $childWithNullable when calling testNullable'); + } + $childWithNullable = $input['childWithNullable']; + + + return response('How about implementing testNullable as a post method ?'); + } /** * Operation fakeOuterBooleanSerialize * diff --git a/samples/server/petstore/php-laravel/lib/app/Models/ChildWithNullable.php b/samples/server/petstore/php-laravel/lib/app/Models/ChildWithNullable.php new file mode 100644 index 000000000000..f1354195cb4b --- /dev/null +++ b/samples/server/petstore/php-laravel/lib/app/Models/ChildWithNullable.php @@ -0,0 +1,21 @@ +get('/v2/fake/jsonFormData', 'FakeApi@testJsonFormData'); +/** + * post testNullable + * Summary: test nullable parent property + * Notes: + */ +$router->post('/v2/fake/nullable', 'FakeApi@testNullable'); + /** * post fakeOuterBooleanSerialize * Summary: 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 2f3e054109bb..eb1a4d69db4d 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator/FILES +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator/FILES @@ -23,6 +23,7 @@ src/main/java/org/openapitools/model/BigCat.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ChildWithNullable.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 @@ -46,6 +47,7 @@ src/main/java/org/openapitools/model/NumberOnly.java src/main/java/org/openapitools/model/Order.java src/main/java/org/openapitools/model/OuterComposite.java src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/ParentWithNullable.java src/main/java/org/openapitools/model/Pet.java src/main/java/org/openapitools/model/ReadOnlyFirst.java src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java index 1b881b2651d9..173ca2a64051 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -478,6 +479,32 @@ ResponseEntity testJsonFormData( ) throws Exception; + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "testNullable", + summary = "test nullable parent property", + description = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/nullable", + consumes = { "application/json" } + ) + ResponseEntity testNullable( + @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + ) throws Exception; + + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ChildWithNullable.java new file mode 100644 index 000000000000..fb169e0b74a8 --- /dev/null +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -0,0 +1,114 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullable; +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; + +/** + * ChildWithNullable + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @Schema(name = "otherProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("otherProperty") + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullable type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullable nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ParentWithNullable.java new file mode 100644 index 000000000000..7ddb5ac9fb72 --- /dev/null +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -0,0 +1,167 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +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; + +/** + * ParentWithNullable + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ParentWithNullable { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @Schema(name = "nullableProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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 2863ea22e3b7..f3691a72bd48 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/FILES @@ -34,6 +34,7 @@ src/main/java/org/openapitools/model/BigCat.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ChildWithNullable.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 @@ -57,6 +58,7 @@ src/main/java/org/openapitools/model/NumberOnly.java src/main/java/org/openapitools/model/Order.java src/main/java/org/openapitools/model/OuterComposite.java src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/ParentWithNullable.java src/main/java/org/openapitools/model/Pet.java src/main/java/org/openapitools/model/ReadOnlyFirst.java src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 2223eaece425..ac40279c6702 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -544,6 +545,35 @@ default ResponseEntity testJsonFormData( } + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + */ + @ApiOperation( + tags = { "fake" }, + value = "test nullable parent property", + nickname = "testNullable", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/nullable", + consumes = { "application/json" } + ) + default ResponseEntity testNullable( + @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java index 9121a3951829..4f901db76d70 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApiController.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ChildWithNullable.java new file mode 100644 index 000000000000..3ce936a5302f --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -0,0 +1,101 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.openapitools.model.ParentWithNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * ChildWithNullable + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("otherProperty") + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullable type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullable nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ParentWithNullable.java new file mode 100644 index 000000000000..8c57b73ad6b6 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -0,0 +1,153 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.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; + +/** + * ParentWithNullable + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ParentWithNullable { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private TypeEnum type; + + private String nullableProperty = null; + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @ApiModelProperty(value = "") + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = nullableProperty; + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("nullableProperty") + public String getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(String nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + Objects.equals(this.nullableProperty, parentWithNullable.nullableProperty); + } + + @Override + public int hashCode() { + return Objects.hash(type, nullableProperty); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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 17951cb6c3ff..3ebfb97645f2 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 @@ -986,6 +986,27 @@ paths: x-accepts: application/json x-tags: - tag: fake + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: fake /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1883,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/FILES b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/FILES index d757e50ecff4..3ac88a992f94 100644 --- a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/FILES @@ -34,6 +34,7 @@ src/main/java/org/openapitools/model/BigCat.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ChildWithNullable.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 @@ -57,6 +58,7 @@ src/main/java/org/openapitools/model/NumberOnly.java src/main/java/org/openapitools/model/Order.java src/main/java/org/openapitools/model/OuterComposite.java src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/ParentWithNullable.java src/main/java/org/openapitools/model/Pet.java src/main/java/org/openapitools/model/ReadOnlyFirst.java src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 2223eaece425..ac40279c6702 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -544,6 +545,35 @@ default ResponseEntity testJsonFormData( } + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + */ + @ApiOperation( + tags = { "fake" }, + value = "test nullable parent property", + nickname = "testNullable", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/nullable", + consumes = { "application/json" } + ) + default ResponseEntity testNullable( + @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java index 9121a3951829..4f901db76d70 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ChildWithNullable.java new file mode 100644 index 000000000000..49094e267a20 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -0,0 +1,115 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullable; +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; + +/** + * ChildWithNullable + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("otherProperty") + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullable type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullable nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ParentWithNullable.java new file mode 100644 index 000000000000..88477c887c25 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -0,0 +1,168 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +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; + +/** + * ParentWithNullable + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ParentWithNullable { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @ApiModelProperty(value = "") + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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 17951cb6c3ff..3ebfb97645f2 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml @@ -986,6 +986,27 @@ paths: x-accepts: application/json x-tags: - tag: fake + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: fake /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1883,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/FILES b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/FILES index a0317e155796..fc1d5a0fa9ec 100644 --- a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/FILES @@ -40,6 +40,7 @@ src/main/java/org/openapitools/model/BigCat.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ChildWithNullable.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 @@ -63,6 +64,7 @@ src/main/java/org/openapitools/model/NumberOnly.java src/main/java/org/openapitools/model/Order.java src/main/java/org/openapitools/model/OuterComposite.java src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/ParentWithNullable.java src/main/java/org/openapitools/model/Pet.java src/main/java/org/openapitools/model/ReadOnlyFirst.java src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index b06abb7467f8..601013398bea 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -499,6 +500,34 @@ default ResponseEntity testJsonFormData( } + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + */ + @ApiOperation( + tags = { "fake" }, + value = "test nullable parent property", + nickname = "testNullable", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/nullable", + consumes = { "application/json" } + ) + default ResponseEntity testNullable( + @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + ) { + return getDelegate().testNullable(childWithNullable); + } + + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiController.java index b88f61719554..c0125b8d57d3 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiController.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java index c8b380f33c01..e04c34be3b06 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -299,6 +300,19 @@ default ResponseEntity testJsonFormData(String param, } + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + * @see FakeApi#testNullable + */ + default ResponseEntity testNullable(ChildWithNullable childWithNullable) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ChildWithNullable.java new file mode 100644 index 000000000000..49094e267a20 --- /dev/null +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -0,0 +1,115 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullable; +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; + +/** + * ChildWithNullable + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("otherProperty") + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullable type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullable nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ParentWithNullable.java new file mode 100644 index 000000000000..88477c887c25 --- /dev/null +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -0,0 +1,168 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +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; + +/** + * ParentWithNullable + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ParentWithNullable { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @ApiModelProperty(value = "") + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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 17951cb6c3ff..3ebfb97645f2 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 @@ -986,6 +986,27 @@ paths: x-accepts: application/json x-tags: - tag: fake + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: fake /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1883,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/server/petstore/springboot-delegate/.openapi-generator/FILES b/samples/server/petstore/springboot-delegate/.openapi-generator/FILES index a0317e155796..fc1d5a0fa9ec 100644 --- a/samples/server/petstore/springboot-delegate/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-delegate/.openapi-generator/FILES @@ -40,6 +40,7 @@ src/main/java/org/openapitools/model/BigCat.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ChildWithNullable.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 @@ -63,6 +64,7 @@ src/main/java/org/openapitools/model/NumberOnly.java src/main/java/org/openapitools/model/Order.java src/main/java/org/openapitools/model/OuterComposite.java src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/ParentWithNullable.java src/main/java/org/openapitools/model/Pet.java src/main/java/org/openapitools/model/ReadOnlyFirst.java src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index b06abb7467f8..601013398bea 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -499,6 +500,34 @@ default ResponseEntity testJsonFormData( } + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + */ + @ApiOperation( + tags = { "fake" }, + value = "test nullable parent property", + nickname = "testNullable", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/nullable", + consumes = { "application/json" } + ) + default ResponseEntity testNullable( + @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + ) { + return getDelegate().testNullable(childWithNullable); + } + + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java index b88f61719554..c0125b8d57d3 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index c8b380f33c01..e04c34be3b06 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -299,6 +300,19 @@ default ResponseEntity testJsonFormData(String param, } + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + * @see FakeApi#testNullable + */ + default ResponseEntity testNullable(ChildWithNullable childWithNullable) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java new file mode 100644 index 000000000000..49094e267a20 --- /dev/null +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -0,0 +1,115 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullable; +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; + +/** + * ChildWithNullable + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("otherProperty") + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullable type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullable nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java new file mode 100644 index 000000000000..88477c887c25 --- /dev/null +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -0,0 +1,168 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +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; + +/** + * ParentWithNullable + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ParentWithNullable { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @ApiModelProperty(value = "") + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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 17951cb6c3ff..3ebfb97645f2 100644 --- a/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -986,6 +986,27 @@ paths: x-accepts: application/json x-tags: - tag: fake + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: fake /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1883,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES index 2863ea22e3b7..f3691a72bd48 100644 --- a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES @@ -34,6 +34,7 @@ src/main/java/org/openapitools/model/BigCat.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ChildWithNullable.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 @@ -57,6 +58,7 @@ src/main/java/org/openapitools/model/NumberOnly.java src/main/java/org/openapitools/model/Order.java src/main/java/org/openapitools/model/OuterComposite.java src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/ParentWithNullable.java src/main/java/org/openapitools/model/Pet.java src/main/java/org/openapitools/model/ReadOnlyFirst.java src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 3cb28e2bcc1a..21a90acea537 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -544,6 +545,35 @@ default ResponseEntity testJsonFormData( } + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + */ + @ApiOperation( + tags = { "fake" }, + value = "test nullable parent property", + nickname = "testNullable", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/nullable", + consumes = { "application/json" } + ) + default ResponseEntity testNullable( + @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java index 9121a3951829..4f901db76d70 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApiController.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ChildWithNullable.java new file mode 100644 index 000000000000..49094e267a20 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -0,0 +1,115 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullable; +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; + +/** + * ChildWithNullable + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("otherProperty") + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullable type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullable nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java new file mode 100644 index 000000000000..88477c887c25 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -0,0 +1,168 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +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; + +/** + * ParentWithNullable + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ParentWithNullable { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @ApiModelProperty(value = "") + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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 17951cb6c3ff..3ebfb97645f2 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -986,6 +986,27 @@ paths: x-accepts: application/json x-tags: - tag: fake + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: fake /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1883,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/.openapi-generator/FILES b/samples/server/petstore/springboot-reactive-noResponseEntity/.openapi-generator/FILES index 65881ecd9360..64711ce47178 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/.openapi-generator/FILES @@ -39,6 +39,7 @@ src/main/java/org/openapitools/model/BigCat.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ChildWithNullable.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 @@ -62,6 +63,7 @@ src/main/java/org/openapitools/model/NumberOnly.java src/main/java/org/openapitools/model/Order.java src/main/java/org/openapitools/model/OuterComposite.java src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/ParentWithNullable.java src/main/java/org/openapitools/model/Pet.java src/main/java/org/openapitools/model/ReadOnlyFirst.java src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java index c007639214d9..c9470e15a9f6 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java @@ -7,6 +7,7 @@ import springfox.documentation.annotations.ApiIgnore; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -532,6 +533,36 @@ default Mono testJsonFormData( } + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + */ + @ApiOperation( + tags = { "fake" }, + value = "test nullable parent property", + nickname = "testNullable", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/nullable", + consumes = { "application/json" } + ) + @ResponseStatus(HttpStatus.OK) + default Mono testNullable( + @ApiParam(value = "request body", required = true) @Valid @RequestBody Mono childWithNullable, + @ApiIgnore final ServerWebExchange exchange + ) { + return getDelegate().testNullable(childWithNullable, exchange); + } + + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApiController.java index 159a5330fcb7..26840ffb0ead 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,6 +2,7 @@ import springfox.documentation.annotations.ApiIgnore; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApiDelegate.java index 5392a1a9baf9..e606ecfe26a4 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -2,6 +2,7 @@ import springfox.documentation.annotations.ApiIgnore; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -339,6 +340,22 @@ default Mono testJsonFormData(String param, } + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + * @see FakeApi#testNullable + */ + default Mono testNullable(Mono childWithNullable, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(childWithNullable).then(Mono.empty()); + + } + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ChildWithNullable.java new file mode 100644 index 000000000000..49094e267a20 --- /dev/null +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -0,0 +1,115 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullable; +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; + +/** + * ChildWithNullable + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("otherProperty") + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullable type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullable nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullable.java new file mode 100644 index 000000000000..88477c887c25 --- /dev/null +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -0,0 +1,168 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +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; + +/** + * ParentWithNullable + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ParentWithNullable { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @ApiModelProperty(value = "") + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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-noResponseEntity/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml index 17951cb6c3ff..3ebfb97645f2 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml @@ -986,6 +986,27 @@ paths: x-accepts: application/json x-tags: - tag: fake + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: fake /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1883,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/server/petstore/springboot-reactive/.openapi-generator/FILES b/samples/server/petstore/springboot-reactive/.openapi-generator/FILES index 65881ecd9360..64711ce47178 100644 --- a/samples/server/petstore/springboot-reactive/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-reactive/.openapi-generator/FILES @@ -39,6 +39,7 @@ src/main/java/org/openapitools/model/BigCat.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ChildWithNullable.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 @@ -62,6 +63,7 @@ src/main/java/org/openapitools/model/NumberOnly.java src/main/java/org/openapitools/model/Order.java src/main/java/org/openapitools/model/OuterComposite.java src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/ParentWithNullable.java src/main/java/org/openapitools/model/Pet.java src/main/java/org/openapitools/model/ReadOnlyFirst.java src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index a957c78388c6..1ce75cf75866 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -7,6 +7,7 @@ import springfox.documentation.annotations.ApiIgnore; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -518,6 +519,35 @@ default Mono> testJsonFormData( } + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + */ + @ApiOperation( + tags = { "fake" }, + value = "test nullable parent property", + nickname = "testNullable", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/nullable", + consumes = { "application/json" } + ) + default Mono> testNullable( + @ApiParam(value = "request body", required = true) @Valid @RequestBody Mono childWithNullable, + @ApiIgnore final ServerWebExchange exchange + ) { + return getDelegate().testNullable(childWithNullable, exchange); + } + + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java index ea2bb6629564..cb1695a319e1 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,6 +2,7 @@ import springfox.documentation.annotations.ApiIgnore; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java index 8fa3ade10771..e1303c319373 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -2,6 +2,7 @@ import springfox.documentation.annotations.ApiIgnore; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -340,6 +341,22 @@ default Mono> testJsonFormData(String param, } + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + * @see FakeApi#testNullable + */ + default Mono> testNullable(Mono childWithNullable, + ServerWebExchange exchange) { + Mono result = Mono.empty(); + exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED); + return result.then(childWithNullable).then(Mono.empty()); + + } + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ChildWithNullable.java new file mode 100644 index 000000000000..49094e267a20 --- /dev/null +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -0,0 +1,115 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullable; +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; + +/** + * ChildWithNullable + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("otherProperty") + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullable type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullable nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java new file mode 100644 index 000000000000..88477c887c25 --- /dev/null +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -0,0 +1,168 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +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; + +/** + * ParentWithNullable + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ParentWithNullable { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @ApiModelProperty(value = "") + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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 17951cb6c3ff..3ebfb97645f2 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -986,6 +986,27 @@ paths: x-accepts: application/json x-tags: - tag: fake + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: fake /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1883,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/server/petstore/springboot-useoptional/.openapi-generator/FILES b/samples/server/petstore/springboot-useoptional/.openapi-generator/FILES index 2863ea22e3b7..f3691a72bd48 100644 --- a/samples/server/petstore/springboot-useoptional/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-useoptional/.openapi-generator/FILES @@ -34,6 +34,7 @@ src/main/java/org/openapitools/model/BigCat.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ChildWithNullable.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 @@ -57,6 +58,7 @@ src/main/java/org/openapitools/model/NumberOnly.java src/main/java/org/openapitools/model/Order.java src/main/java/org/openapitools/model/OuterComposite.java src/main/java/org/openapitools/model/OuterEnum.java +src/main/java/org/openapitools/model/ParentWithNullable.java src/main/java/org/openapitools/model/Pet.java src/main/java/org/openapitools/model/ReadOnlyFirst.java src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNames.java diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index eb001348b4e9..19bcbf722b64 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; @@ -544,6 +545,35 @@ default ResponseEntity testJsonFormData( } + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + */ + @ApiOperation( + tags = { "fake" }, + value = "test nullable parent property", + nickname = "testNullable", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/nullable", + consumes = { "application/json" } + ) + default ResponseEntity testNullable( + @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java index 9121a3951829..4f901db76d70 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApiController.java @@ -1,6 +1,7 @@ package org.openapitools.api; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullable; import org.openapitools.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClass; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ChildWithNullable.java new file mode 100644 index 000000000000..49094e267a20 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -0,0 +1,115 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullable; +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; + +/** + * ChildWithNullable + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("otherProperty") + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullable type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullable nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ParentWithNullable.java new file mode 100644 index 000000000000..88477c887c25 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -0,0 +1,168 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +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; + +/** + * ParentWithNullable + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ParentWithNullable { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @ApiModelProperty(value = "") + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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 17951cb6c3ff..3ebfb97645f2 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml @@ -986,6 +986,27 @@ paths: x-accepts: application/json x-tags: - tag: fake + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: fake /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1883,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/server/petstore/springboot-virtualan/.openapi-generator/FILES b/samples/server/petstore/springboot-virtualan/.openapi-generator/FILES index 68986fd2794f..1f44133fbd09 100644 --- a/samples/server/petstore/springboot-virtualan/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-virtualan/.openapi-generator/FILES @@ -34,6 +34,7 @@ src/main/java/org/openapitools/virtualan/model/BigCat.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/Category.java +src/main/java/org/openapitools/virtualan/model/ChildWithNullable.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 @@ -57,6 +58,7 @@ src/main/java/org/openapitools/virtualan/model/NumberOnly.java src/main/java/org/openapitools/virtualan/model/Order.java src/main/java/org/openapitools/virtualan/model/OuterComposite.java src/main/java/org/openapitools/virtualan/model/OuterEnum.java +src/main/java/org/openapitools/virtualan/model/ParentWithNullable.java src/main/java/org/openapitools/virtualan/model/Pet.java src/main/java/org/openapitools/virtualan/model/ReadOnlyFirst.java src/main/java/org/openapitools/virtualan/model/ResponseObjectWithDifferentFieldNames.java diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index 8f23a56bccb0..9410ee5fea14 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.virtualan.api; import java.math.BigDecimal; +import org.openapitools.virtualan.model.ChildWithNullable; import org.openapitools.virtualan.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.virtualan.model.FileSchemaTestClass; @@ -568,6 +569,36 @@ default ResponseEntity testJsonFormData( } + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullable request body (required) + * @return successful operation (status code 200) + */ + @ApiVirtual + @Operation( + operationId = "testNullable", + summary = "test nullable parent property", + description = "", + tags = { "fake" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/nullable", + consumes = { "application/json" } + ) + default ResponseEntity testNullable( + @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApiController.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApiController.java index 6745966de43f..2073874d33cc 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApiController.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApiController.java @@ -1,6 +1,7 @@ package org.openapitools.virtualan.api; import java.math.BigDecimal; +import org.openapitools.virtualan.model.ChildWithNullable; import org.openapitools.virtualan.model.Client; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.virtualan.model.FileSchemaTestClass; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ChildWithNullable.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ChildWithNullable.java new file mode 100644 index 000000000000..040cd5c6afeb --- /dev/null +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ChildWithNullable.java @@ -0,0 +1,114 @@ +package org.openapitools.virtualan.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.virtualan.model.ParentWithNullable; +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; + +/** + * ChildWithNullable + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ChildWithNullable extends ParentWithNullable { + + private String otherProperty; + + public ChildWithNullable otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @Schema(name = "otherProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("otherProperty") + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullable type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullable nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullable childWithNullable = (ChildWithNullable) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullable {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/ParentWithNullable.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ParentWithNullable.java new file mode 100644 index 000000000000..3ef9d3cff29b --- /dev/null +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ParentWithNullable.java @@ -0,0 +1,167 @@ +package org.openapitools.virtualan.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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.JsonValue; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +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; + +/** + * ParentWithNullable + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ParentWithNullable { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullable type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullable nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @Schema(name = "nullableProperty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullable parentWithNullable = (ParentWithNullable) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullable {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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 17951cb6c3ff..3ebfb97645f2 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml @@ -986,6 +986,27 @@ paths: x-accepts: application/json x-tags: - tag: fake + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: fake /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1883,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean diff --git a/samples/server/petstore/springboot/.openapi-generator/FILES b/samples/server/petstore/springboot/.openapi-generator/FILES index 849ad35dca3f..17c1e122b6b5 100644 --- a/samples/server/petstore/springboot/.openapi-generator/FILES +++ b/samples/server/petstore/springboot/.openapi-generator/FILES @@ -35,6 +35,7 @@ src/main/java/org/openapitools/model/BigCatDto.java src/main/java/org/openapitools/model/CapitalizationDto.java src/main/java/org/openapitools/model/CatDto.java src/main/java/org/openapitools/model/CategoryDto.java +src/main/java/org/openapitools/model/ChildWithNullableDto.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 @@ -56,6 +57,7 @@ src/main/java/org/openapitools/model/NumberOnlyDto.java src/main/java/org/openapitools/model/OrderDto.java src/main/java/org/openapitools/model/OuterCompositeDto.java src/main/java/org/openapitools/model/OuterEnumDto.java +src/main/java/org/openapitools/model/ParentWithNullableDto.java src/main/java/org/openapitools/model/PetDto.java src/main/java/org/openapitools/model/ReadOnlyFirstDto.java src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index e4f57a07a066..72ec8da42af4 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ApiResponseDto; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullableDto; import org.openapitools.model.ClientDto; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClassDto; @@ -544,6 +545,35 @@ default ResponseEntity testJsonFormData( } + /** + * POST /fake/nullable : test nullable parent property + * + * + * @param childWithNullableDto request body (required) + * @return successful operation (status code 200) + */ + @ApiOperation( + tags = { "fake" }, + value = "test nullable parent property", + nickname = "testNullable", + notes = "" + ) + @ApiResponses({ + @ApiResponse(code = 200, message = "successful operation") + }) + @RequestMapping( + method = RequestMethod.POST, + value = "/fake/nullable", + consumes = { "application/json" } + ) + default ResponseEntity testNullable( + @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullableDto childWithNullableDto + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** * PUT /fake/test-query-parameters * To test the collection format in query parameters diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApiController.java index ad3ca0f55b62..47ca2590812e 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApiController.java @@ -2,6 +2,7 @@ import org.openapitools.model.ApiResponseDto; import java.math.BigDecimal; +import org.openapitools.model.ChildWithNullableDto; import org.openapitools.model.ClientDto; import org.springframework.format.annotation.DateTimeFormat; import org.openapitools.model.FileSchemaTestClassDto; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ChildWithNullableDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ChildWithNullableDto.java new file mode 100644 index 000000000000..d954f1970942 --- /dev/null +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ChildWithNullableDto.java @@ -0,0 +1,117 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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 java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.model.ParentWithNullableDto; +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; + +/** + * ChildWithNullableDto + */ + + +@JsonTypeName("ChildWithNullable") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ChildWithNullableDto extends ParentWithNullableDto { + + private String otherProperty; + + public ChildWithNullableDto otherProperty(String otherProperty) { + this.otherProperty = otherProperty; + return this; + } + + /** + * Get otherProperty + * @return otherProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("otherProperty") + public String getOtherProperty() { + return otherProperty; + } + + public void setOtherProperty(String otherProperty) { + this.otherProperty = otherProperty; + } + + + public ChildWithNullableDto type(TypeEnum type) { + super.type(type); + return this; + } + + public ChildWithNullableDto nullableProperty(String nullableProperty) { + super.nullableProperty(nullableProperty); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChildWithNullableDto childWithNullable = (ChildWithNullableDto) o; + return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(otherProperty, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChildWithNullableDto {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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/src/main/java/org/openapitools/model/ParentWithNullableDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ParentWithNullableDto.java new file mode 100644 index 000000000000..5a76b286e6b0 --- /dev/null +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ParentWithNullableDto.java @@ -0,0 +1,169 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +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 java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +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; + +/** + * ParentWithNullableDto + */ + +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ChildWithNullableDto.class, name = "ChildWithNullable") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ParentWithNullableDto { + + /** + * Gets or Sets type + */ + public enum TypeEnum { + CHILDWITHNULLABLE("ChildWithNullable"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private TypeEnum type; + + private JsonNullable nullableProperty = JsonNullable.undefined(); + + public ParentWithNullableDto type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @ApiModelProperty(value = "") + @JsonProperty("type") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public ParentWithNullableDto nullableProperty(String nullableProperty) { + this.nullableProperty = JsonNullable.of(nullableProperty); + return this; + } + + /** + * Get nullableProperty + * @return nullableProperty + */ + + @ApiModelProperty(value = "") + @JsonProperty("nullableProperty") + public JsonNullable getNullableProperty() { + return nullableProperty; + } + + public void setNullableProperty(JsonNullable nullableProperty) { + this.nullableProperty = nullableProperty; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParentWithNullableDto parentWithNullable = (ParentWithNullableDto) o; + return Objects.equals(this.type, parentWithNullable.type) && + equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, hashCodeNullable(nullableProperty)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParentWithNullableDto {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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/src/main/resources/openapi.yaml b/samples/server/petstore/springboot/src/main/resources/openapi.yaml index 7e70129174ac..42dd7db5f53b 100644 --- a/samples/server/petstore/springboot/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot/src/main/resources/openapi.yaml @@ -986,6 +986,27 @@ paths: x-accepts: application/json x-tags: - tag: fake + /fake/nullable: + post: + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + summary: test nullable parent property + tags: + - fake + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: fake /fake/body-with-query-params: put: operationId: testBodyWithQueryParams @@ -1862,6 +1883,25 @@ components: OuterBoolean: type: boolean x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + discriminator: + propertyName: type + properties: + type: + enum: + - ChildWithNullable + type: string + nullableProperty: + nullable: true + type: string + type: object + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - properties: + otherProperty: + type: string + type: object StringBooleanMap: additionalProperties: type: boolean From 70543126f2c55b525041d4ca143042e2ab7ccec2 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 12 Sep 2023 16:51:05 +0800 Subject: [PATCH 09/59] fix jaxrs sample tests (#16566) --- .../api/impl/AnotherFakeApiServiceImpl.java | 38 ------------------- 1 file changed, 38 deletions(-) delete mode 100644 samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java deleted file mode 100644 index ee9663c04551..000000000000 --- a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.openapitools.api.impl; - -import 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 org.apache.cxf.jaxrs.model.wadl.Description; -import org.apache.cxf.jaxrs.model.wadl.DocTarget; - -import org.apache.cxf.jaxrs.ext.multipart.*; - -import io.swagger.annotations.Api; - -/** - * OpenAPI Petstore - * - *

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - */ -public class AnotherFakeApiServiceImpl implements AnotherFakeApi { - /** - * To test special tags - * - * To test special tags and operation ID starting with number - * - */ - public Client call123testSpecialTags(Client body) { - // TODO: Implement... - - return null; - } - -} From a5f79a7bdccb59ed9881930d4f925da4dbf91168 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 12 Sep 2023 16:55:53 +0800 Subject: [PATCH 10/59] [python] Update github workflow, use debug instead of warning (#16565) * update github workflow, use debug instead of warning * use debug instead of warn --- .../java/org/openapitools/codegen/DefaultCodegen.java | 4 ++-- .../codegen/languages/AbstractPythonCodegen.java | 4 ++-- .../src/main/resources/python/github-workflow.mustache | 1 + .../src/main/resources/python/gitlab-ci.mustache | 8 +++++++- .../src/main/resources/python/requirements.mustache | 3 +++ .../src/main/resources/python/test-requirements.mustache | 3 --- .../client/echo_api/python/.github/workflows/python.yml | 1 + samples/client/echo_api/python/.gitlab-ci.yml | 8 +++++++- .../petstore/python-aiohttp/.github/workflows/python.yml | 1 + .../client/petstore/python-aiohttp/.gitlab-ci.yml | 8 +++++++- .../client/petstore/python-aiohttp/requirements.txt | 1 + .../client/petstore/python-aiohttp/test-requirements.txt | 1 - .../client/petstore/python/.github/workflows/python.yml | 1 + samples/openapi3/client/petstore/python/.gitlab-ci.yml | 8 +++++++- samples/openapi3/client/petstore/python/requirements.txt | 1 + .../openapi3/client/petstore/python/test-requirements.txt | 1 - 16 files changed, 41 insertions(+), 13 deletions(-) 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 624729f3cdeb..cfe1b493216d 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 @@ -2747,14 +2747,14 @@ protected void updateModelForComposedSchema(CodegenModel m, Schema schema, Map includedSchem } example += ")"; } else { - LOGGER.warn("Type {} not handled properly in toExampleValue", schema.getType()); + LOGGER.debug("Type {} not handled properly in toExampleValue", schema.getType()); } if (ModelUtils.isStringSchema(schema)) { @@ -591,7 +591,7 @@ public void setParameterExampleValue(CodegenParameter p) { // type is a model class, e.g. User example = this.packageName + "." + type + "()"; } else { - LOGGER.warn("Type {} not handled properly in setParameterExampleValue", type); + LOGGER.debug("Type {} not handled properly in setParameterExampleValue", type); } if (example == null) { diff --git a/modules/openapi-generator/src/main/resources/python/github-workflow.mustache b/modules/openapi-generator/src/main/resources/python/github-workflow.mustache index a3aae3f5bf68..868124c0bc55 100644 --- a/modules/openapi-generator/src/main/resources/python/github-workflow.mustache +++ b/modules/openapi-generator/src/main/resources/python/github-workflow.mustache @@ -27,6 +27,7 @@ jobs: python -m pip install --upgrade pip pip install flake8 pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names diff --git a/modules/openapi-generator/src/main/resources/python/gitlab-ci.mustache b/modules/openapi-generator/src/main/resources/python/gitlab-ci.mustache index 0bb48fd6d8c8..8a6130a2f7b9 100644 --- a/modules/openapi-generator/src/main/resources/python/gitlab-ci.mustache +++ b/modules/openapi-generator/src/main/resources/python/gitlab-ci.mustache @@ -22,4 +22,10 @@ pytest-3.8: image: python:3.8-alpine pytest-3.9: extends: .pytest - image: python:3.9-alpine \ No newline at end of file + image: python:3.9-alpine +pytest-3.10: + extends: .pytest + image: python:3.10-alpine +pytest-3.11: + extends: .pytest + image: python:3.11-alpine diff --git a/modules/openapi-generator/src/main/resources/python/requirements.mustache b/modules/openapi-generator/src/main/resources/python/requirements.mustache index bd4fe39d883b..f204cda05c52 100644 --- a/modules/openapi-generator/src/main/resources/python/requirements.mustache +++ b/modules/openapi-generator/src/main/resources/python/requirements.mustache @@ -6,3 +6,6 @@ aenum >= 3.1.11 {{#asyncio}} aiohttp >= 3.0.0 {{/asyncio}} +{{#hasHttpSignatureMethods}} +pycryptodome >= 3.9.0 +{{/hasHttpSignatureMethods}} diff --git a/modules/openapi-generator/src/main/resources/python/test-requirements.mustache b/modules/openapi-generator/src/main/resources/python/test-requirements.mustache index ca8eb277004b..3a0d0b939a1e 100644 --- a/modules/openapi-generator/src/main/resources/python/test-requirements.mustache +++ b/modules/openapi-generator/src/main/resources/python/test-requirements.mustache @@ -1,6 +1,3 @@ pytest~=7.1.3 pytest-cov>=2.8.1 pytest-randomly>=3.12.0 -{{#hasHttpSignatureMethods}} -pycryptodome>=3.9.0 -{{/hasHttpSignatureMethods}} \ No newline at end of file diff --git a/samples/client/echo_api/python/.github/workflows/python.yml b/samples/client/echo_api/python/.github/workflows/python.yml index bcc6ea7b19bd..f128ba25e3dd 100644 --- a/samples/client/echo_api/python/.github/workflows/python.yml +++ b/samples/client/echo_api/python/.github/workflows/python.yml @@ -26,6 +26,7 @@ jobs: python -m pip install --upgrade pip pip install flake8 pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names diff --git a/samples/client/echo_api/python/.gitlab-ci.yml b/samples/client/echo_api/python/.gitlab-ci.yml index 00e696fca263..29da7211174d 100644 --- a/samples/client/echo_api/python/.gitlab-ci.yml +++ b/samples/client/echo_api/python/.gitlab-ci.yml @@ -22,4 +22,10 @@ pytest-3.8: image: python:3.8-alpine pytest-3.9: extends: .pytest - image: python:3.9-alpine \ No newline at end of file + image: python:3.9-alpine +pytest-3.10: + extends: .pytest + image: python:3.10-alpine +pytest-3.11: + extends: .pytest + image: python:3.11-alpine diff --git a/samples/openapi3/client/petstore/python-aiohttp/.github/workflows/python.yml b/samples/openapi3/client/petstore/python-aiohttp/.github/workflows/python.yml index 6752d090a969..fed030f265ed 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/.github/workflows/python.yml +++ b/samples/openapi3/client/petstore/python-aiohttp/.github/workflows/python.yml @@ -26,6 +26,7 @@ jobs: python -m pip install --upgrade pip pip install flake8 pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names diff --git a/samples/openapi3/client/petstore/python-aiohttp/.gitlab-ci.yml b/samples/openapi3/client/petstore/python-aiohttp/.gitlab-ci.yml index 1d94e3846964..b4719756536b 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/.gitlab-ci.yml +++ b/samples/openapi3/client/petstore/python-aiohttp/.gitlab-ci.yml @@ -22,4 +22,10 @@ pytest-3.8: image: python:3.8-alpine pytest-3.9: extends: .pytest - image: python:3.9-alpine \ No newline at end of file + image: python:3.9-alpine +pytest-3.10: + extends: .pytest + image: python:3.10-alpine +pytest-3.11: + extends: .pytest + image: python:3.11-alpine diff --git a/samples/openapi3/client/petstore/python-aiohttp/requirements.txt b/samples/openapi3/client/petstore/python-aiohttp/requirements.txt index 6833ad6202a4..bd242be2a0f4 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/requirements.txt +++ b/samples/openapi3/client/petstore/python-aiohttp/requirements.txt @@ -4,3 +4,4 @@ urllib3 >= 1.25.3, < 2.1.0 pydantic >= 1.10.5, < 2 aenum >= 3.1.11 aiohttp >= 3.0.0 +pycryptodome >= 3.9.0 diff --git a/samples/openapi3/client/petstore/python-aiohttp/test-requirements.txt b/samples/openapi3/client/petstore/python-aiohttp/test-requirements.txt index 8fc452fe6edd..3a0d0b939a1e 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/test-requirements.txt +++ b/samples/openapi3/client/petstore/python-aiohttp/test-requirements.txt @@ -1,4 +1,3 @@ pytest~=7.1.3 pytest-cov>=2.8.1 pytest-randomly>=3.12.0 -pycryptodome>=3.9.0 diff --git a/samples/openapi3/client/petstore/python/.github/workflows/python.yml b/samples/openapi3/client/petstore/python/.github/workflows/python.yml index 6752d090a969..fed030f265ed 100644 --- a/samples/openapi3/client/petstore/python/.github/workflows/python.yml +++ b/samples/openapi3/client/petstore/python/.github/workflows/python.yml @@ -26,6 +26,7 @@ jobs: python -m pip install --upgrade pip pip install flake8 pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names diff --git a/samples/openapi3/client/petstore/python/.gitlab-ci.yml b/samples/openapi3/client/petstore/python/.gitlab-ci.yml index 1d94e3846964..b4719756536b 100755 --- a/samples/openapi3/client/petstore/python/.gitlab-ci.yml +++ b/samples/openapi3/client/petstore/python/.gitlab-ci.yml @@ -22,4 +22,10 @@ pytest-3.8: image: python:3.8-alpine pytest-3.9: extends: .pytest - image: python:3.9-alpine \ No newline at end of file + image: python:3.9-alpine +pytest-3.10: + extends: .pytest + image: python:3.10-alpine +pytest-3.11: + extends: .pytest + image: python:3.11-alpine diff --git a/samples/openapi3/client/petstore/python/requirements.txt b/samples/openapi3/client/petstore/python/requirements.txt index 258c179c10b2..e807d94fe0a2 100755 --- a/samples/openapi3/client/petstore/python/requirements.txt +++ b/samples/openapi3/client/petstore/python/requirements.txt @@ -3,3 +3,4 @@ setuptools >= 21.0.0 urllib3 >= 1.25.3, < 2.1.0 pydantic >= 1.10.5, < 2 aenum >= 3.1.11 +pycryptodome >= 3.9.0 diff --git a/samples/openapi3/client/petstore/python/test-requirements.txt b/samples/openapi3/client/petstore/python/test-requirements.txt index 8fc452fe6edd..3a0d0b939a1e 100755 --- a/samples/openapi3/client/petstore/python/test-requirements.txt +++ b/samples/openapi3/client/petstore/python/test-requirements.txt @@ -1,4 +1,3 @@ pytest~=7.1.3 pytest-cov>=2.8.1 pytest-randomly>=3.12.0 -pycryptodome>=3.9.0 From 9c4f6c46f7efc933bcac915c32be4ed3cbee5549 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 12 Sep 2023 17:38:51 +0800 Subject: [PATCH 11/59] Fix integer default value with double quote (kotlin jaxrs server generator) (#16563) * fix integer default value with double qutoe (kotlin jaxrs) * add enum tests * fix typo * update samples --- .gitignore | 1 + .../openapitools/codegen/DefaultCodegen.java | 1 + .../mustache/DoubleQuoteLambda.java | 50 +++++++++++++++ .../mustache/ForwardSlashLambda.java | 2 +- .../jaxrs-spec/cookieParams.mustache | 2 +- .../jaxrs-spec/headerParams.mustache | 2 +- .../libraries/jaxrs-spec/queryParams.mustache | 2 +- .../resources/3_0/parameter-test-spec.yaml | 51 +++++++++++++++ .../docs/DefaultApi.md | 16 ++++- .../openapitools/client/apis/DefaultApi.kt | 63 +++++++++++++++++-- .../openapitools/server/apis/DefaultApi.kt | 2 +- 11 files changed, 180 insertions(+), 12 deletions(-) create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/DoubleQuoteLambda.java diff --git a/.gitignore b/.gitignore index 33731657c228..d632589eb6c1 100644 --- a/.gitignore +++ b/.gitignore @@ -212,6 +212,7 @@ samples/server/petstore/kotlin-server/ktor/build samples/server/petstore/kotlin-springboot/build samples/client/petstore/kotlin*/src/main/kotlin/test/ samples/client/petstore/kotlin*/build/ +samples/server/others/kotlin-server/jaxrs-spec/build/ # haskell .stack-work 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 cfe1b493216d..3c58a95deeae 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 @@ -449,6 +449,7 @@ protected ImmutableMap.Builder addMustacheLambdas() { .put("pascalcase", new CamelCaseLambda(false).generator(this)) .put("forwardslash", new ForwardSlashLambda()) .put("backslash", new BackSlashLambda()) + .put("doublequote", new DoubleQuoteLambda()) .put("indented", new IndentedLambda()) .put("indented_8", new IndentedLambda(8, " ", false)) .put("indented_12", new IndentedLambda(12, " ", false)) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/DoubleQuoteLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/DoubleQuoteLambda.java new file mode 100644 index 000000000000..9979e0e817eb --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/DoubleQuoteLambda.java @@ -0,0 +1,50 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.templating.mustache; + +import com.samskivert.mustache.Mustache; +import com.samskivert.mustache.Template; + +import java.io.IOException; +import java.io.Writer; + +import static org.openapitools.codegen.utils.StringUtils.underscore; + +/** + * Double quote the text if it's not already the case. + * + * Register: + *

+ * additionalProperties.put("doublequote", new DoubleQuoteLambda());
+ * 
+ * + * Use: + *
+ * {{#doublequote}}{{summary}}{{/doublequote}}
+ * 
+ */ +public class DoubleQuoteLambda implements Mustache.Lambda { + @Override + public void execute(Template.Fragment fragment, Writer writer) throws IOException { + String input = fragment.execute(); + if (input.startsWith("\"") && input.endsWith("\"")) { + writer.write(input); + } else { + writer.write("\"" + input + "\""); + } + } +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/ForwardSlashLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/ForwardSlashLambda.java index 56f903974aac..a9f39b59ae1b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/ForwardSlashLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/ForwardSlashLambda.java @@ -34,7 +34,7 @@ * * Use: *
- * {{#fforwardslash}}{{summary}}{{/forwardslash}}
+ * {{#forwardslash}}{{summary}}{{/forwardslash}}
  * 
*/ public class ForwardSlashLambda implements Mustache.Lambda { diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/cookieParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/cookieParams.mustache index 40648eb494d6..a2d0343c1730 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/cookieParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/cookieParams.mustache @@ -1 +1 @@ -{{#isCookieParam}}@CookieParam("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue({{{.}}}){{/defaultValue}}{{/isContainer}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}} {{paramName}}: {{{dataType}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^defaultValue}}{{^required}}?{{/required}}{{/defaultValue}}{{/isNullable}}{{/isCookieParam}} \ No newline at end of file +{{#isCookieParam}}@CookieParam("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue({{#lambda.doublequote}}{{{.}}}{{/lambda.doublequote}}){{/defaultValue}}{{/isContainer}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}} {{paramName}}: {{{dataType}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^defaultValue}}{{^required}}?{{/required}}{{/defaultValue}}{{/isNullable}}{{/isCookieParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/headerParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/headerParams.mustache index e5b328fa2009..b637f85e0501 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}@HeaderParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationHeaderParams}}{{/useBeanValidation}} {{#defaultValue}} @DefaultValue({{{.}}}){{/defaultValue}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}} {{paramName}}: {{{dataType}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^defaultValue}}{{^required}}?{{/required}}{{/defaultValue}}{{/isNullable}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}@HeaderParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationHeaderParams}}{{/useBeanValidation}} {{#defaultValue}} @DefaultValue({{#lambda.doublequote}}{{{.}}}{{/lambda.doublequote}}){{/defaultValue}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}} {{paramName}}: {{{dataType}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^defaultValue}}{{^required}}?{{/required}}{{/defaultValue}}{{/isNullable}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/queryParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/queryParams.mustache index fa6f1c583cbe..690cef49eb48 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/jaxrs-spec/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}@QueryParam("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue({{{.}}}){{/defaultValue}}{{/isContainer}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}} {{paramName}}: {{{dataType}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^defaultValue}}{{^required}}?{{/required}}{{/defaultValue}}{{/isNullable}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}@QueryParam("{{#lambda.escapeDollar}}{{baseName}}{{/lambda.escapeDollar}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue({{#lambda.doublequote}}{{{.}}}{{/lambda.doublequote}}){{/defaultValue}}{{/isContainer}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}} {{paramName}}: {{{dataType}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^defaultValue}}{{^required}}?{{/required}}{{/defaultValue}}{{/isNullable}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/test/resources/3_0/parameter-test-spec.yaml b/modules/openapi-generator/src/test/resources/3_0/parameter-test-spec.yaml index 14d1b311ebff..db07e2d16ebd 100644 --- a/modules/openapi-generator/src/test/resources/3_0/parameter-test-spec.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/parameter-test-spec.yaml @@ -24,12 +24,46 @@ paths: schema: type: string default: available + - name: query_default_enum + in: query + description: query default enum + schema: + type: string + enum: + - A + - B + - C + default: B + - name: query_default_int + in: query + description: query default int + schema: + type: number + format: int32 + default: 3 - name: header_default in: header description: header default schema: type: string default: available + - name: header_default_enum + in: header + description: header default enum + schema: + type: string + enum: + - A + - B + - C + default: B + - name: header_default_int + in: header + description: header default int + schema: + type: number + format: int32 + default: 3 - name: path_default in: path description: path default @@ -42,6 +76,23 @@ paths: schema: type: string default: available + - name: cookie_default_enum + in: cookie + description: cookie default enum + schema: + type: string + enum: + - A + - B + - C + default: B + - name: cookie_default_int + in: cookie + description: cookie default int + schema: + type: number + format: int32 + default: 3 - name: query_nullable in: query description: query nullable diff --git a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/docs/DefaultApi.md b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/docs/DefaultApi.md index 9082c6dd97da..4e81da579cb3 100644 --- a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/docs/DefaultApi.md +++ b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/docs/DefaultApi.md @@ -9,7 +9,7 @@ Method | HTTP request | Description # **findPetsByStatus** -> findPetsByStatus(pathDefault, pathNullable, queryDefault, headerDefault, cookieDefault, queryNullable, headerNullable, cookieNullable, dollarQueryDollarDollarSign) +> findPetsByStatus(pathDefault, pathNullable, queryDefault, queryDefaultEnum, queryDefaultInt, headerDefault, headerDefaultEnum, headerDefaultInt, cookieDefault, cookieDefaultEnum, cookieDefaultInt, queryNullable, headerNullable, cookieNullable, dollarQueryDollarDollarSign) Finds Pets by status @@ -25,14 +25,20 @@ val apiInstance = DefaultApi() val pathDefault : kotlin.String = pathDefault_example // kotlin.String | path default val pathNullable : kotlin.String = pathNullable_example // kotlin.String | path_nullable val queryDefault : kotlin.String = queryDefault_example // kotlin.String | query default +val queryDefaultEnum : kotlin.String = queryDefaultEnum_example // kotlin.String | query default enum +val queryDefaultInt : java.math.BigDecimal = 8.14 // java.math.BigDecimal | query default int val headerDefault : kotlin.String = headerDefault_example // kotlin.String | header default +val headerDefaultEnum : kotlin.String = headerDefaultEnum_example // kotlin.String | header default enum +val headerDefaultInt : java.math.BigDecimal = 8.14 // java.math.BigDecimal | header default int val cookieDefault : kotlin.String = cookieDefault_example // kotlin.String | cookie default +val cookieDefaultEnum : kotlin.String = cookieDefaultEnum_example // kotlin.String | cookie default enum +val cookieDefaultInt : java.math.BigDecimal = 8.14 // java.math.BigDecimal | cookie default int val queryNullable : kotlin.String = queryNullable_example // kotlin.String | query nullable val headerNullable : kotlin.String = headerNullable_example // kotlin.String | header nullable val cookieNullable : kotlin.String = cookieNullable_example // kotlin.String | cookie_nullable val dollarQueryDollarDollarSign : kotlin.String = dollarQueryDollarDollarSign_example // kotlin.String | query parameter with dollar sign try { - apiInstance.findPetsByStatus(pathDefault, pathNullable, queryDefault, headerDefault, cookieDefault, queryNullable, headerNullable, cookieNullable, dollarQueryDollarDollarSign) + apiInstance.findPetsByStatus(pathDefault, pathNullable, queryDefault, queryDefaultEnum, queryDefaultInt, headerDefault, headerDefaultEnum, headerDefaultInt, cookieDefault, cookieDefaultEnum, cookieDefaultInt, queryNullable, headerNullable, cookieNullable, dollarQueryDollarDollarSign) } catch (e: ClientException) { println("4xx response calling DefaultApi#findPetsByStatus") e.printStackTrace() @@ -49,8 +55,14 @@ Name | Type | Description | Notes **pathDefault** | **kotlin.String**| path default | **pathNullable** | **kotlin.String**| path_nullable | **queryDefault** | **kotlin.String**| query default | [optional] [default to "available"] + **queryDefaultEnum** | **kotlin.String**| query default enum | [optional] [default to B] [enum: A, B, C] + **queryDefaultInt** | **java.math.BigDecimal**| query default int | [optional] [default to 3] **headerDefault** | **kotlin.String**| header default | [optional] [default to "available"] + **headerDefaultEnum** | **kotlin.String**| header default enum | [optional] [default to B] [enum: A, B, C] + **headerDefaultInt** | **java.math.BigDecimal**| header default int | [optional] [default to 3] **cookieDefault** | **kotlin.String**| cookie default | [optional] [default to "available"] + **cookieDefaultEnum** | **kotlin.String**| cookie default enum | [optional] [default to B] [enum: A, B, C] + **cookieDefaultInt** | **java.math.BigDecimal**| cookie default int | [optional] [default to 3] **queryNullable** | **kotlin.String**| query nullable | [optional] **headerNullable** | **kotlin.String**| header nullable | [optional] **cookieNullable** | **kotlin.String**| cookie_nullable | [optional] diff --git a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt index 531aec837a98..751d87de7816 100644 --- a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt @@ -44,14 +44,47 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient } } + /** + * enum for parameter queryDefaultEnum + */ + enum class QueryDefaultEnumFindPetsByStatus(val value: kotlin.String) { + @Json(name = "A") a("A"), + @Json(name = "B") b("B"), + @Json(name = "C") c("C") + } + + /** + * enum for parameter headerDefaultEnum + */ + enum class HeaderDefaultEnumFindPetsByStatus(val value: kotlin.String) { + @Json(name = "A") a("A"), + @Json(name = "B") b("B"), + @Json(name = "C") c("C") + } + + /** + * enum for parameter cookieDefaultEnum + */ + enum class CookieDefaultEnumFindPetsByStatus(val value: kotlin.String) { + @Json(name = "A") a("A"), + @Json(name = "B") b("B"), + @Json(name = "C") c("C") + } + /** * Finds Pets by status * Multiple status values can be provided with comma separated strings * @param pathDefault path default * @param pathNullable path_nullable * @param queryDefault query default (optional, default to "available") + * @param queryDefaultEnum query default enum (optional, default to B) + * @param queryDefaultInt query default int (optional, default to 3) * @param headerDefault header default (optional, default to "available") + * @param headerDefaultEnum header default enum (optional, default to B) + * @param headerDefaultInt header default int (optional, default to 3) * @param cookieDefault cookie default (optional, default to "available") + * @param cookieDefaultEnum cookie default enum (optional, default to B) + * @param cookieDefaultInt cookie default int (optional, default to 3) * @param queryNullable query nullable (optional) * @param headerNullable header nullable (optional) * @param cookieNullable cookie_nullable (optional) @@ -64,8 +97,8 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient * @throws ServerException If the API returns a server error response */ @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) - fun findPetsByStatus(pathDefault: kotlin.String, pathNullable: kotlin.String, queryDefault: kotlin.String? = "available", headerDefault: kotlin.String? = "available", cookieDefault: kotlin.String? = "available", queryNullable: kotlin.String? = null, headerNullable: kotlin.String? = null, cookieNullable: kotlin.String? = null, dollarQueryDollarDollarSign: kotlin.String? = null) : Unit { - val localVarResponse = findPetsByStatusWithHttpInfo(pathDefault = pathDefault, pathNullable = pathNullable, queryDefault = queryDefault, headerDefault = headerDefault, cookieDefault = cookieDefault, queryNullable = queryNullable, headerNullable = headerNullable, cookieNullable = cookieNullable, dollarQueryDollarDollarSign = dollarQueryDollarDollarSign) + fun findPetsByStatus(pathDefault: kotlin.String, pathNullable: kotlin.String, queryDefault: kotlin.String? = "available", queryDefaultEnum: QueryDefaultEnumFindPetsByStatus? = QueryDefaultEnumFindPetsByStatus.b, queryDefaultInt: java.math.BigDecimal? = java.math.BigDecimal("3"), headerDefault: kotlin.String? = "available", headerDefaultEnum: HeaderDefaultEnumFindPetsByStatus? = HeaderDefaultEnumFindPetsByStatus.b, headerDefaultInt: java.math.BigDecimal? = java.math.BigDecimal("3"), cookieDefault: kotlin.String? = "available", cookieDefaultEnum: CookieDefaultEnumFindPetsByStatus? = CookieDefaultEnumFindPetsByStatus.b, cookieDefaultInt: java.math.BigDecimal? = java.math.BigDecimal("3"), queryNullable: kotlin.String? = null, headerNullable: kotlin.String? = null, cookieNullable: kotlin.String? = null, dollarQueryDollarDollarSign: kotlin.String? = null) : Unit { + val localVarResponse = findPetsByStatusWithHttpInfo(pathDefault = pathDefault, pathNullable = pathNullable, queryDefault = queryDefault, queryDefaultEnum = queryDefaultEnum, queryDefaultInt = queryDefaultInt, headerDefault = headerDefault, headerDefaultEnum = headerDefaultEnum, headerDefaultInt = headerDefaultInt, cookieDefault = cookieDefault, cookieDefaultEnum = cookieDefaultEnum, cookieDefaultInt = cookieDefaultInt, queryNullable = queryNullable, headerNullable = headerNullable, cookieNullable = cookieNullable, dollarQueryDollarDollarSign = dollarQueryDollarDollarSign) return when (localVarResponse.responseType) { ResponseType.Success -> Unit @@ -88,8 +121,14 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient * @param pathDefault path default * @param pathNullable path_nullable * @param queryDefault query default (optional, default to "available") + * @param queryDefaultEnum query default enum (optional, default to B) + * @param queryDefaultInt query default int (optional, default to 3) * @param headerDefault header default (optional, default to "available") + * @param headerDefaultEnum header default enum (optional, default to B) + * @param headerDefaultInt header default int (optional, default to 3) * @param cookieDefault cookie default (optional, default to "available") + * @param cookieDefaultEnum cookie default enum (optional, default to B) + * @param cookieDefaultInt cookie default int (optional, default to 3) * @param queryNullable query nullable (optional) * @param headerNullable header nullable (optional) * @param cookieNullable cookie_nullable (optional) @@ -99,8 +138,8 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient * @throws IOException Rethrows the OkHttp execute method exception */ @Throws(IllegalStateException::class, IOException::class) - fun findPetsByStatusWithHttpInfo(pathDefault: kotlin.String, pathNullable: kotlin.String, queryDefault: kotlin.String?, headerDefault: kotlin.String?, cookieDefault: kotlin.String?, queryNullable: kotlin.String?, headerNullable: kotlin.String?, cookieNullable: kotlin.String?, dollarQueryDollarDollarSign: kotlin.String?) : ApiResponse { - val localVariableConfig = findPetsByStatusRequestConfig(pathDefault = pathDefault, pathNullable = pathNullable, queryDefault = queryDefault, headerDefault = headerDefault, cookieDefault = cookieDefault, queryNullable = queryNullable, headerNullable = headerNullable, cookieNullable = cookieNullable, dollarQueryDollarDollarSign = dollarQueryDollarDollarSign) + fun findPetsByStatusWithHttpInfo(pathDefault: kotlin.String, pathNullable: kotlin.String, queryDefault: kotlin.String?, queryDefaultEnum: QueryDefaultEnumFindPetsByStatus?, queryDefaultInt: java.math.BigDecimal?, headerDefault: kotlin.String?, headerDefaultEnum: HeaderDefaultEnumFindPetsByStatus?, headerDefaultInt: java.math.BigDecimal?, cookieDefault: kotlin.String?, cookieDefaultEnum: CookieDefaultEnumFindPetsByStatus?, cookieDefaultInt: java.math.BigDecimal?, queryNullable: kotlin.String?, headerNullable: kotlin.String?, cookieNullable: kotlin.String?, dollarQueryDollarDollarSign: kotlin.String?) : ApiResponse { + val localVariableConfig = findPetsByStatusRequestConfig(pathDefault = pathDefault, pathNullable = pathNullable, queryDefault = queryDefault, queryDefaultEnum = queryDefaultEnum, queryDefaultInt = queryDefaultInt, headerDefault = headerDefault, headerDefaultEnum = headerDefaultEnum, headerDefaultInt = headerDefaultInt, cookieDefault = cookieDefault, cookieDefaultEnum = cookieDefaultEnum, cookieDefaultInt = cookieDefaultInt, queryNullable = queryNullable, headerNullable = headerNullable, cookieNullable = cookieNullable, dollarQueryDollarDollarSign = dollarQueryDollarDollarSign) return request( localVariableConfig @@ -113,21 +152,33 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient * @param pathDefault path default * @param pathNullable path_nullable * @param queryDefault query default (optional, default to "available") + * @param queryDefaultEnum query default enum (optional, default to B) + * @param queryDefaultInt query default int (optional, default to 3) * @param headerDefault header default (optional, default to "available") + * @param headerDefaultEnum header default enum (optional, default to B) + * @param headerDefaultInt header default int (optional, default to 3) * @param cookieDefault cookie default (optional, default to "available") + * @param cookieDefaultEnum cookie default enum (optional, default to B) + * @param cookieDefaultInt cookie default int (optional, default to 3) * @param queryNullable query nullable (optional) * @param headerNullable header nullable (optional) * @param cookieNullable cookie_nullable (optional) * @param dollarQueryDollarDollarSign query parameter with dollar sign (optional) * @return RequestConfig */ - fun findPetsByStatusRequestConfig(pathDefault: kotlin.String, pathNullable: kotlin.String, queryDefault: kotlin.String?, headerDefault: kotlin.String?, cookieDefault: kotlin.String?, queryNullable: kotlin.String?, headerNullable: kotlin.String?, cookieNullable: kotlin.String?, dollarQueryDollarDollarSign: kotlin.String?) : RequestConfig { + fun findPetsByStatusRequestConfig(pathDefault: kotlin.String, pathNullable: kotlin.String, queryDefault: kotlin.String?, queryDefaultEnum: QueryDefaultEnumFindPetsByStatus?, queryDefaultInt: java.math.BigDecimal?, headerDefault: kotlin.String?, headerDefaultEnum: HeaderDefaultEnumFindPetsByStatus?, headerDefaultInt: java.math.BigDecimal?, cookieDefault: kotlin.String?, cookieDefaultEnum: CookieDefaultEnumFindPetsByStatus?, cookieDefaultInt: java.math.BigDecimal?, queryNullable: kotlin.String?, headerNullable: kotlin.String?, cookieNullable: kotlin.String?, dollarQueryDollarDollarSign: kotlin.String?) : RequestConfig { val localVariableBody = null val localVariableQuery: MultiValueMap = mutableMapOf>() .apply { if (queryDefault != null) { put("query_default", listOf(queryDefault.toString())) } + if (queryDefaultEnum != null) { + put("query_default_enum", listOf(queryDefaultEnum.value)) + } + if (queryDefaultInt != null) { + put("query_default_int", listOf(queryDefaultInt.toString())) + } if (queryNullable != null) { put("query_nullable", listOf(queryNullable.toString())) } @@ -137,6 +188,8 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient } val localVariableHeaders: MutableMap = mutableMapOf() headerDefault?.apply { localVariableHeaders["header_default"] = this.toString() } + headerDefaultEnum?.apply { localVariableHeaders["header_default_enum"] = this.toString() } + headerDefaultInt?.apply { localVariableHeaders["header_default_int"] = this.toString() } headerNullable?.apply { localVariableHeaders["header_nullable"] = this.toString() } return RequestConfig( diff --git a/samples/server/others/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/DefaultApi.kt b/samples/server/others/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/DefaultApi.kt index 984bb8420d94..721b1fca424c 100644 --- a/samples/server/others/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/DefaultApi.kt +++ b/samples/server/others/kotlin-server/jaxrs-spec/src/main/kotlin/org/openapitools/server/apis/DefaultApi.kt @@ -14,7 +14,7 @@ import java.io.InputStream class DefaultApi { @GET - suspend fun findPetsByStatus(@PathParam("path_default") pathDefault: kotlin.String,@PathParam("path_nullable") pathNullable: kotlin.String,@QueryParam("query_default") @DefaultValue("available") queryDefault: kotlin.String,@HeaderParam("header_default") @DefaultValue("available") headerDefault: kotlin.String,@CookieParam("cookie_default") @DefaultValue("available") cookieDefault: kotlin.String,@QueryParam("query_nullable") queryNullable: kotlin.String?,@HeaderParam("header_nullable") headerNullable: kotlin.String?,@CookieParam("cookie_nullable") cookieNullable: kotlin.String?,@QueryParam("\$query-\$dollar-sign") dollarQueryDollarDollarSign: kotlin.String?): Response { + suspend fun findPetsByStatus(@PathParam("path_default") pathDefault: kotlin.String,@PathParam("path_nullable") pathNullable: kotlin.String,@QueryParam("query_default") @DefaultValue("available") queryDefault: kotlin.String,@QueryParam("query_default_enum") @DefaultValue("B") queryDefaultEnum: kotlin.String,@QueryParam("query_default_int") @DefaultValue("3") queryDefaultInt: java.math.BigDecimal,@HeaderParam("header_default") @DefaultValue("available") headerDefault: kotlin.String,@HeaderParam("header_default_enum") @DefaultValue("B") headerDefaultEnum: kotlin.String,@HeaderParam("header_default_int") @DefaultValue("3") headerDefaultInt: java.math.BigDecimal,@CookieParam("cookie_default") @DefaultValue("available") cookieDefault: kotlin.String,@CookieParam("cookie_default_enum") @DefaultValue("B") cookieDefaultEnum: kotlin.String,@CookieParam("cookie_default_int") @DefaultValue("3") cookieDefaultInt: java.math.BigDecimal,@QueryParam("query_nullable") queryNullable: kotlin.String?,@HeaderParam("header_nullable") headerNullable: kotlin.String?,@CookieParam("cookie_nullable") cookieNullable: kotlin.String?,@QueryParam("\$query-\$dollar-sign") dollarQueryDollarDollarSign: kotlin.String?): Response { return Response.ok().entity("magic!").build(); } } From 5b4d97016a950b2fe0d4911773cdd5286cec36b0 Mon Sep 17 00:00:00 2001 From: Charles Treatman Date: Tue, 12 Sep 2023 10:42:54 -0500 Subject: [PATCH 12/59] [Go] return errors that happen while unmarshalling objects (#16525) * [Go] return errors that happen while unmarshalling objects * Update model samples * More updates to samples * Update failing Go store API test to match the one that passes --- .../src/main/resources/go/model_simple.mustache | 16 ++++++++++++---- .../model_additional_properties_any_type.go | 8 ++++++-- .../model_additional_properties_array.go | 8 ++++++-- .../model_additional_properties_boolean.go | 8 ++++++-- .../model_additional_properties_integer.go | 8 ++++++-- .../model_additional_properties_number.go | 8 ++++++-- .../model_additional_properties_object.go | 8 ++++++-- .../model_additional_properties_string.go | 8 ++++++-- .../go/go-petstore/model_200_response.go | 8 ++++++-- .../model__foo_get_default_response.go | 8 ++++++-- .../go/go-petstore/model__special_model_name_.go | 8 ++++++-- .../model_additional_properties_class.go | 8 ++++++-- .../go-petstore/model_all_of_primitive_types.go | 8 ++++++-- .../petstore/go/go-petstore/model_animal.go | 8 ++++++-- .../go/go-petstore/model_api_response.go | 8 ++++++-- .../petstore/go/go-petstore/model_apple.go | 8 ++++++-- .../petstore/go/go-petstore/model_apple_req.go | 8 ++++++-- .../model_array_of_array_of_number_only.go | 8 ++++++-- .../go/go-petstore/model_array_of_number_only.go | 8 ++++++-- .../petstore/go/go-petstore/model_array_test_.go | 8 ++++++-- .../petstore/go/go-petstore/model_banana.go | 8 ++++++-- .../petstore/go/go-petstore/model_banana_req.go | 8 ++++++-- .../go/go-petstore/model_capitalization.go | 8 ++++++-- .../petstore/go/go-petstore/model_category.go | 8 ++++++-- .../petstore/go/go-petstore/model_class_model.go | 8 ++++++-- .../petstore/go/go-petstore/model_client.go | 8 ++++++-- .../go-petstore/model_duplicated_prop_parent.go | 8 ++++++-- .../petstore/go/go-petstore/model_enum_arrays.go | 8 ++++++-- .../petstore/go/go-petstore/model_enum_test_.go | 8 ++++++-- .../client/petstore/go/go-petstore/model_file.go | 8 ++++++-- .../go-petstore/model_file_schema_test_class.go | 8 ++++++-- .../client/petstore/go/go-petstore/model_foo.go | 8 ++++++-- .../go/go-petstore/model_format_test_.go | 8 ++++++-- .../go/go-petstore/model_has_only_read_only.go | 8 ++++++-- .../go/go-petstore/model_health_check_result.go | 8 ++++++-- .../client/petstore/go/go-petstore/model_list.go | 8 ++++++-- .../go/go-petstore/model_map_of_file_test_.go | 8 ++++++-- .../petstore/go/go-petstore/model_map_test_.go | 8 ++++++-- ...properties_and_additional_properties_class.go | 8 ++++++-- .../client/petstore/go/go-petstore/model_name.go | 8 ++++++-- .../go/go-petstore/model_nullable_all_of.go | 8 ++++++-- .../go-petstore/model_nullable_all_of_child.go | 8 ++++++-- .../go/go-petstore/model_nullable_class.go | 8 ++++++-- .../petstore/go/go-petstore/model_number_only.go | 8 ++++++-- .../model_one_of_primitive_type_child.go | 8 ++++++-- .../petstore/go/go-petstore/model_order.go | 8 ++++++-- .../go/go-petstore/model_outer_composite.go | 8 ++++++-- .../client/petstore/go/go-petstore/model_pet.go | 8 ++++++-- .../go-petstore/model_property_name_mapping.go | 8 ++++++-- .../go/go-petstore/model_read_only_first.go | 8 ++++++-- .../go-petstore/model_read_only_with_default.go | 8 ++++++-- .../petstore/go/go-petstore/model_return.go | 8 ++++++-- .../client/petstore/go/go-petstore/model_tag.go | 8 ++++++-- .../client/petstore/go/go-petstore/model_user.go | 8 ++++++-- .../petstore/go/go-petstore/model_whale.go | 8 ++++++-- .../petstore/go/go-petstore/model_zebra.go | 8 ++++++-- .../client/petstore/go/store_api_test.go | 2 +- 57 files changed, 343 insertions(+), 115 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/go/model_simple.mustache b/modules/openapi-generator/src/main/resources/go/model_simple.mustache index d634c704a34b..84c8b3a9e7ca 100644 --- a/modules/openapi-generator/src/main/resources/go/model_simple.mustache +++ b/modules/openapi-generator/src/main/resources/go/model_simple.mustache @@ -404,10 +404,14 @@ func (o *{{{classname}}}) UnmarshalJSON(bytes []byte) (err error) { {{#isMap}} var{{{classname}}} := _{{{classname}}}{} - if err = json.Unmarshal(bytes, &var{{{classname}}}); err == nil { - *o = {{{classname}}}(var{{{classname}}}) + err = json.Unmarshal(bytes, &var{{{classname}}}) + + if err != nil { + return err } + *o = {{{classname}}}(var{{{classname}}}) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { @@ -423,10 +427,14 @@ func (o *{{{classname}}}) UnmarshalJSON(bytes []byte) (err error) { {{^parent}} var{{{classname}}} := _{{{classname}}}{} - if err = json.Unmarshal(bytes, &var{{{classname}}}); err == nil { - *o = {{{classname}}}(var{{{classname}}}) + err = json.Unmarshal(bytes, &var{{{classname}}}) + + if err != nil { + return err } + *o = {{{classname}}}(var{{{classname}}}) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_any_type.go b/samples/client/petstore/go/go-petstore/model_additional_properties_any_type.go index eadf2a95994a..880f95e954ab 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_any_type.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_any_type.go @@ -98,10 +98,14 @@ func (o AdditionalPropertiesAnyType) ToMap() (map[string]interface{}, error) { func (o *AdditionalPropertiesAnyType) UnmarshalJSON(bytes []byte) (err error) { varAdditionalPropertiesAnyType := _AdditionalPropertiesAnyType{} - if err = json.Unmarshal(bytes, &varAdditionalPropertiesAnyType); err == nil { - *o = AdditionalPropertiesAnyType(varAdditionalPropertiesAnyType) + err = json.Unmarshal(bytes, &varAdditionalPropertiesAnyType) + + if err != nil { + return err } + *o = AdditionalPropertiesAnyType(varAdditionalPropertiesAnyType) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_array.go b/samples/client/petstore/go/go-petstore/model_additional_properties_array.go index f2527113454e..22c59ee9a613 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_array.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_array.go @@ -98,10 +98,14 @@ func (o AdditionalPropertiesArray) ToMap() (map[string]interface{}, error) { func (o *AdditionalPropertiesArray) UnmarshalJSON(bytes []byte) (err error) { varAdditionalPropertiesArray := _AdditionalPropertiesArray{} - if err = json.Unmarshal(bytes, &varAdditionalPropertiesArray); err == nil { - *o = AdditionalPropertiesArray(varAdditionalPropertiesArray) + err = json.Unmarshal(bytes, &varAdditionalPropertiesArray) + + if err != nil { + return err } + *o = AdditionalPropertiesArray(varAdditionalPropertiesArray) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_boolean.go b/samples/client/petstore/go/go-petstore/model_additional_properties_boolean.go index c1401d929123..e898485760ab 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_boolean.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_boolean.go @@ -98,10 +98,14 @@ func (o AdditionalPropertiesBoolean) ToMap() (map[string]interface{}, error) { func (o *AdditionalPropertiesBoolean) UnmarshalJSON(bytes []byte) (err error) { varAdditionalPropertiesBoolean := _AdditionalPropertiesBoolean{} - if err = json.Unmarshal(bytes, &varAdditionalPropertiesBoolean); err == nil { - *o = AdditionalPropertiesBoolean(varAdditionalPropertiesBoolean) + err = json.Unmarshal(bytes, &varAdditionalPropertiesBoolean) + + if err != nil { + return err } + *o = AdditionalPropertiesBoolean(varAdditionalPropertiesBoolean) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_integer.go b/samples/client/petstore/go/go-petstore/model_additional_properties_integer.go index 0147d6eaf856..af609f1474c0 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_integer.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_integer.go @@ -98,10 +98,14 @@ func (o AdditionalPropertiesInteger) ToMap() (map[string]interface{}, error) { func (o *AdditionalPropertiesInteger) UnmarshalJSON(bytes []byte) (err error) { varAdditionalPropertiesInteger := _AdditionalPropertiesInteger{} - if err = json.Unmarshal(bytes, &varAdditionalPropertiesInteger); err == nil { - *o = AdditionalPropertiesInteger(varAdditionalPropertiesInteger) + err = json.Unmarshal(bytes, &varAdditionalPropertiesInteger) + + if err != nil { + return err } + *o = AdditionalPropertiesInteger(varAdditionalPropertiesInteger) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_number.go b/samples/client/petstore/go/go-petstore/model_additional_properties_number.go index 85b3663bf4cf..f3eb23fc4560 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_number.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_number.go @@ -98,10 +98,14 @@ func (o AdditionalPropertiesNumber) ToMap() (map[string]interface{}, error) { func (o *AdditionalPropertiesNumber) UnmarshalJSON(bytes []byte) (err error) { varAdditionalPropertiesNumber := _AdditionalPropertiesNumber{} - if err = json.Unmarshal(bytes, &varAdditionalPropertiesNumber); err == nil { - *o = AdditionalPropertiesNumber(varAdditionalPropertiesNumber) + err = json.Unmarshal(bytes, &varAdditionalPropertiesNumber) + + if err != nil { + return err } + *o = AdditionalPropertiesNumber(varAdditionalPropertiesNumber) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_object.go b/samples/client/petstore/go/go-petstore/model_additional_properties_object.go index 7132cbe61bc4..d0730dc7f53d 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_object.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_object.go @@ -98,10 +98,14 @@ func (o AdditionalPropertiesObject) ToMap() (map[string]interface{}, error) { func (o *AdditionalPropertiesObject) UnmarshalJSON(bytes []byte) (err error) { varAdditionalPropertiesObject := _AdditionalPropertiesObject{} - if err = json.Unmarshal(bytes, &varAdditionalPropertiesObject); err == nil { - *o = AdditionalPropertiesObject(varAdditionalPropertiesObject) + err = json.Unmarshal(bytes, &varAdditionalPropertiesObject) + + if err != nil { + return err } + *o = AdditionalPropertiesObject(varAdditionalPropertiesObject) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/client/petstore/go/go-petstore/model_additional_properties_string.go b/samples/client/petstore/go/go-petstore/model_additional_properties_string.go index 70882312adfe..acfc3440092f 100644 --- a/samples/client/petstore/go/go-petstore/model_additional_properties_string.go +++ b/samples/client/petstore/go/go-petstore/model_additional_properties_string.go @@ -98,10 +98,14 @@ func (o AdditionalPropertiesString) ToMap() (map[string]interface{}, error) { func (o *AdditionalPropertiesString) UnmarshalJSON(bytes []byte) (err error) { varAdditionalPropertiesString := _AdditionalPropertiesString{} - if err = json.Unmarshal(bytes, &varAdditionalPropertiesString); err == nil { - *o = AdditionalPropertiesString(varAdditionalPropertiesString) + err = json.Unmarshal(bytes, &varAdditionalPropertiesString) + + if err != nil { + return err } + *o = AdditionalPropertiesString(varAdditionalPropertiesString) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_200_response.go b/samples/openapi3/client/petstore/go/go-petstore/model_200_response.go index 68a402cba163..2bf31c269bb4 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_200_response.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_200_response.go @@ -134,10 +134,14 @@ func (o Model200Response) ToMap() (map[string]interface{}, error) { func (o *Model200Response) UnmarshalJSON(bytes []byte) (err error) { varModel200Response := _Model200Response{} - if err = json.Unmarshal(bytes, &varModel200Response); err == nil { - *o = Model200Response(varModel200Response) + err = json.Unmarshal(bytes, &varModel200Response) + + if err != nil { + return err } + *o = Model200Response(varModel200Response) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model__foo_get_default_response.go b/samples/openapi3/client/petstore/go/go-petstore/model__foo_get_default_response.go index 131bc4726e50..3e64a6b310ca 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model__foo_get_default_response.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model__foo_get_default_response.go @@ -98,10 +98,14 @@ func (o FooGetDefaultResponse) ToMap() (map[string]interface{}, error) { func (o *FooGetDefaultResponse) UnmarshalJSON(bytes []byte) (err error) { varFooGetDefaultResponse := _FooGetDefaultResponse{} - if err = json.Unmarshal(bytes, &varFooGetDefaultResponse); err == nil { - *o = FooGetDefaultResponse(varFooGetDefaultResponse) + err = json.Unmarshal(bytes, &varFooGetDefaultResponse) + + if err != nil { + return err } + *o = FooGetDefaultResponse(varFooGetDefaultResponse) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model__special_model_name_.go b/samples/openapi3/client/petstore/go/go-petstore/model__special_model_name_.go index 55f423140575..0509ff5da5d8 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model__special_model_name_.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model__special_model_name_.go @@ -98,10 +98,14 @@ func (o SpecialModelName) ToMap() (map[string]interface{}, error) { func (o *SpecialModelName) UnmarshalJSON(bytes []byte) (err error) { varSpecialModelName := _SpecialModelName{} - if err = json.Unmarshal(bytes, &varSpecialModelName); err == nil { - *o = SpecialModelName(varSpecialModelName) + err = json.Unmarshal(bytes, &varSpecialModelName) + + if err != nil { + return err } + *o = SpecialModelName(varSpecialModelName) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_additional_properties_class.go b/samples/openapi3/client/petstore/go/go-petstore/model_additional_properties_class.go index bf906f2224ba..d9210014d80d 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_additional_properties_class.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_additional_properties_class.go @@ -134,10 +134,14 @@ func (o AdditionalPropertiesClass) ToMap() (map[string]interface{}, error) { func (o *AdditionalPropertiesClass) UnmarshalJSON(bytes []byte) (err error) { varAdditionalPropertiesClass := _AdditionalPropertiesClass{} - if err = json.Unmarshal(bytes, &varAdditionalPropertiesClass); err == nil { - *o = AdditionalPropertiesClass(varAdditionalPropertiesClass) + err = json.Unmarshal(bytes, &varAdditionalPropertiesClass) + + if err != nil { + return err } + *o = AdditionalPropertiesClass(varAdditionalPropertiesClass) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_all_of_primitive_types.go b/samples/openapi3/client/petstore/go/go-petstore/model_all_of_primitive_types.go index 825944aeadc2..8c6f26889502 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_all_of_primitive_types.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_all_of_primitive_types.go @@ -99,10 +99,14 @@ func (o AllOfPrimitiveTypes) ToMap() (map[string]interface{}, error) { func (o *AllOfPrimitiveTypes) UnmarshalJSON(bytes []byte) (err error) { varAllOfPrimitiveTypes := _AllOfPrimitiveTypes{} - if err = json.Unmarshal(bytes, &varAllOfPrimitiveTypes); err == nil { - *o = AllOfPrimitiveTypes(varAllOfPrimitiveTypes) + err = json.Unmarshal(bytes, &varAllOfPrimitiveTypes) + + if err != nil { + return err } + *o = AllOfPrimitiveTypes(varAllOfPrimitiveTypes) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_animal.go b/samples/openapi3/client/petstore/go/go-petstore/model_animal.go index 5b8b9b9f0420..c01aa9aeadc2 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_animal.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_animal.go @@ -129,10 +129,14 @@ func (o Animal) ToMap() (map[string]interface{}, error) { func (o *Animal) UnmarshalJSON(bytes []byte) (err error) { varAnimal := _Animal{} - if err = json.Unmarshal(bytes, &varAnimal); err == nil { - *o = Animal(varAnimal) + err = json.Unmarshal(bytes, &varAnimal) + + if err != nil { + return err } + *o = Animal(varAnimal) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_api_response.go b/samples/openapi3/client/petstore/go/go-petstore/model_api_response.go index 699ca7d52f63..c8d0d91baabe 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_api_response.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_api_response.go @@ -170,10 +170,14 @@ func (o ApiResponse) ToMap() (map[string]interface{}, error) { func (o *ApiResponse) UnmarshalJSON(bytes []byte) (err error) { varApiResponse := _ApiResponse{} - if err = json.Unmarshal(bytes, &varApiResponse); err == nil { - *o = ApiResponse(varApiResponse) + err = json.Unmarshal(bytes, &varApiResponse) + + if err != nil { + return err } + *o = ApiResponse(varApiResponse) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_apple.go b/samples/openapi3/client/petstore/go/go-petstore/model_apple.go index 43082aa35b6f..19df0b7b57b1 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_apple.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_apple.go @@ -98,10 +98,14 @@ func (o Apple) ToMap() (map[string]interface{}, error) { func (o *Apple) UnmarshalJSON(bytes []byte) (err error) { varApple := _Apple{} - if err = json.Unmarshal(bytes, &varApple); err == nil { - *o = Apple(varApple) + err = json.Unmarshal(bytes, &varApple) + + if err != nil { + return err } + *o = Apple(varApple) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_apple_req.go b/samples/openapi3/client/petstore/go/go-petstore/model_apple_req.go index 6e58309aa40b..23fa5ed2867b 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_apple_req.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_apple_req.go @@ -125,10 +125,14 @@ func (o AppleReq) ToMap() (map[string]interface{}, error) { func (o *AppleReq) UnmarshalJSON(bytes []byte) (err error) { varAppleReq := _AppleReq{} - if err = json.Unmarshal(bytes, &varAppleReq); err == nil { - *o = AppleReq(varAppleReq) + err = json.Unmarshal(bytes, &varAppleReq) + + if err != nil { + return err } + *o = AppleReq(varAppleReq) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_array_of_array_of_number_only.go b/samples/openapi3/client/petstore/go/go-petstore/model_array_of_array_of_number_only.go index 9f84133a4ae1..6d4c67f246e2 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_array_of_array_of_number_only.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_array_of_array_of_number_only.go @@ -98,10 +98,14 @@ func (o ArrayOfArrayOfNumberOnly) ToMap() (map[string]interface{}, error) { func (o *ArrayOfArrayOfNumberOnly) UnmarshalJSON(bytes []byte) (err error) { varArrayOfArrayOfNumberOnly := _ArrayOfArrayOfNumberOnly{} - if err = json.Unmarshal(bytes, &varArrayOfArrayOfNumberOnly); err == nil { - *o = ArrayOfArrayOfNumberOnly(varArrayOfArrayOfNumberOnly) + err = json.Unmarshal(bytes, &varArrayOfArrayOfNumberOnly) + + if err != nil { + return err } + *o = ArrayOfArrayOfNumberOnly(varArrayOfArrayOfNumberOnly) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_array_of_number_only.go b/samples/openapi3/client/petstore/go/go-petstore/model_array_of_number_only.go index e3ff1e6c56b8..d45cec963658 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_array_of_number_only.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_array_of_number_only.go @@ -98,10 +98,14 @@ func (o ArrayOfNumberOnly) ToMap() (map[string]interface{}, error) { func (o *ArrayOfNumberOnly) UnmarshalJSON(bytes []byte) (err error) { varArrayOfNumberOnly := _ArrayOfNumberOnly{} - if err = json.Unmarshal(bytes, &varArrayOfNumberOnly); err == nil { - *o = ArrayOfNumberOnly(varArrayOfNumberOnly) + err = json.Unmarshal(bytes, &varArrayOfNumberOnly) + + if err != nil { + return err } + *o = ArrayOfNumberOnly(varArrayOfNumberOnly) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_array_test_.go b/samples/openapi3/client/petstore/go/go-petstore/model_array_test_.go index 5d97f8623397..2851c2f46843 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_array_test_.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_array_test_.go @@ -170,10 +170,14 @@ func (o ArrayTest) ToMap() (map[string]interface{}, error) { func (o *ArrayTest) UnmarshalJSON(bytes []byte) (err error) { varArrayTest := _ArrayTest{} - if err = json.Unmarshal(bytes, &varArrayTest); err == nil { - *o = ArrayTest(varArrayTest) + err = json.Unmarshal(bytes, &varArrayTest) + + if err != nil { + return err } + *o = ArrayTest(varArrayTest) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_banana.go b/samples/openapi3/client/petstore/go/go-petstore/model_banana.go index 2a6f5d4d2624..4d757fbf9925 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_banana.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_banana.go @@ -98,10 +98,14 @@ func (o Banana) ToMap() (map[string]interface{}, error) { func (o *Banana) UnmarshalJSON(bytes []byte) (err error) { varBanana := _Banana{} - if err = json.Unmarshal(bytes, &varBanana); err == nil { - *o = Banana(varBanana) + err = json.Unmarshal(bytes, &varBanana) + + if err != nil { + return err } + *o = Banana(varBanana) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_banana_req.go b/samples/openapi3/client/petstore/go/go-petstore/model_banana_req.go index cb1045513e7b..5d5923fc5a7c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_banana_req.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_banana_req.go @@ -125,10 +125,14 @@ func (o BananaReq) ToMap() (map[string]interface{}, error) { func (o *BananaReq) UnmarshalJSON(bytes []byte) (err error) { varBananaReq := _BananaReq{} - if err = json.Unmarshal(bytes, &varBananaReq); err == nil { - *o = BananaReq(varBananaReq) + err = json.Unmarshal(bytes, &varBananaReq) + + if err != nil { + return err } + *o = BananaReq(varBananaReq) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_capitalization.go b/samples/openapi3/client/petstore/go/go-petstore/model_capitalization.go index 06a8833a2fbf..8b09f0d813e4 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_capitalization.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_capitalization.go @@ -279,10 +279,14 @@ func (o Capitalization) ToMap() (map[string]interface{}, error) { func (o *Capitalization) UnmarshalJSON(bytes []byte) (err error) { varCapitalization := _Capitalization{} - if err = json.Unmarshal(bytes, &varCapitalization); err == nil { - *o = Capitalization(varCapitalization) + err = json.Unmarshal(bytes, &varCapitalization) + + if err != nil { + return err } + *o = Capitalization(varCapitalization) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_category.go b/samples/openapi3/client/petstore/go/go-petstore/model_category.go index 6275a2967e93..bd4d6815e72e 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_category.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_category.go @@ -127,10 +127,14 @@ func (o Category) ToMap() (map[string]interface{}, error) { func (o *Category) UnmarshalJSON(bytes []byte) (err error) { varCategory := _Category{} - if err = json.Unmarshal(bytes, &varCategory); err == nil { - *o = Category(varCategory) + err = json.Unmarshal(bytes, &varCategory) + + if err != nil { + return err } + *o = Category(varCategory) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_class_model.go b/samples/openapi3/client/petstore/go/go-petstore/model_class_model.go index 0f01c8201721..72fe2596231c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_class_model.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_class_model.go @@ -98,10 +98,14 @@ func (o ClassModel) ToMap() (map[string]interface{}, error) { func (o *ClassModel) UnmarshalJSON(bytes []byte) (err error) { varClassModel := _ClassModel{} - if err = json.Unmarshal(bytes, &varClassModel); err == nil { - *o = ClassModel(varClassModel) + err = json.Unmarshal(bytes, &varClassModel) + + if err != nil { + return err } + *o = ClassModel(varClassModel) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_client.go b/samples/openapi3/client/petstore/go/go-petstore/model_client.go index f034a9f91f22..e635b0546e07 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_client.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_client.go @@ -98,10 +98,14 @@ func (o Client) ToMap() (map[string]interface{}, error) { func (o *Client) UnmarshalJSON(bytes []byte) (err error) { varClient := _Client{} - if err = json.Unmarshal(bytes, &varClient); err == nil { - *o = Client(varClient) + err = json.Unmarshal(bytes, &varClient) + + if err != nil { + return err } + *o = Client(varClient) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_parent.go b/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_parent.go index 1c8ed0909f66..bb2e2132e122 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_parent.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_parent.go @@ -90,10 +90,14 @@ func (o DuplicatedPropParent) ToMap() (map[string]interface{}, error) { func (o *DuplicatedPropParent) UnmarshalJSON(bytes []byte) (err error) { varDuplicatedPropParent := _DuplicatedPropParent{} - if err = json.Unmarshal(bytes, &varDuplicatedPropParent); err == nil { - *o = DuplicatedPropParent(varDuplicatedPropParent) + err = json.Unmarshal(bytes, &varDuplicatedPropParent) + + if err != nil { + return err } + *o = DuplicatedPropParent(varDuplicatedPropParent) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_enum_arrays.go b/samples/openapi3/client/petstore/go/go-petstore/model_enum_arrays.go index 9a16611ca047..cbb59df3be01 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_enum_arrays.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_enum_arrays.go @@ -134,10 +134,14 @@ func (o EnumArrays) ToMap() (map[string]interface{}, error) { func (o *EnumArrays) UnmarshalJSON(bytes []byte) (err error) { varEnumArrays := _EnumArrays{} - if err = json.Unmarshal(bytes, &varEnumArrays); err == nil { - *o = EnumArrays(varEnumArrays) + err = json.Unmarshal(bytes, &varEnumArrays) + + if err != nil { + return err } + *o = EnumArrays(varEnumArrays) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_enum_test_.go b/samples/openapi3/client/petstore/go/go-petstore/model_enum_test_.go index 14202318657c..eb00c70e14f6 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_enum_test_.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_enum_test_.go @@ -359,10 +359,14 @@ func (o EnumTest) ToMap() (map[string]interface{}, error) { func (o *EnumTest) UnmarshalJSON(bytes []byte) (err error) { varEnumTest := _EnumTest{} - if err = json.Unmarshal(bytes, &varEnumTest); err == nil { - *o = EnumTest(varEnumTest) + err = json.Unmarshal(bytes, &varEnumTest) + + if err != nil { + return err } + *o = EnumTest(varEnumTest) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_file.go b/samples/openapi3/client/petstore/go/go-petstore/model_file.go index 631cd8ee96b2..bf26cb96bf35 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_file.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_file.go @@ -99,10 +99,14 @@ func (o File) ToMap() (map[string]interface{}, error) { func (o *File) UnmarshalJSON(bytes []byte) (err error) { varFile := _File{} - if err = json.Unmarshal(bytes, &varFile); err == nil { - *o = File(varFile) + err = json.Unmarshal(bytes, &varFile) + + if err != nil { + return err } + *o = File(varFile) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_file_schema_test_class.go b/samples/openapi3/client/petstore/go/go-petstore/model_file_schema_test_class.go index d35771316bbf..ab98b53cba46 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_file_schema_test_class.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_file_schema_test_class.go @@ -134,10 +134,14 @@ func (o FileSchemaTestClass) ToMap() (map[string]interface{}, error) { func (o *FileSchemaTestClass) UnmarshalJSON(bytes []byte) (err error) { varFileSchemaTestClass := _FileSchemaTestClass{} - if err = json.Unmarshal(bytes, &varFileSchemaTestClass); err == nil { - *o = FileSchemaTestClass(varFileSchemaTestClass) + err = json.Unmarshal(bytes, &varFileSchemaTestClass) + + if err != nil { + return err } + *o = FileSchemaTestClass(varFileSchemaTestClass) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_foo.go b/samples/openapi3/client/petstore/go/go-petstore/model_foo.go index 930080a69eb4..76e88bfaa2e2 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_foo.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_foo.go @@ -102,10 +102,14 @@ func (o Foo) ToMap() (map[string]interface{}, error) { func (o *Foo) UnmarshalJSON(bytes []byte) (err error) { varFoo := _Foo{} - if err = json.Unmarshal(bytes, &varFoo); err == nil { - *o = Foo(varFoo) + err = json.Unmarshal(bytes, &varFoo) + + if err != nil { + return err } + *o = Foo(varFoo) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go b/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go index b887e12ec737..499ceba4acb0 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go @@ -570,10 +570,14 @@ func (o FormatTest) ToMap() (map[string]interface{}, error) { func (o *FormatTest) UnmarshalJSON(bytes []byte) (err error) { varFormatTest := _FormatTest{} - if err = json.Unmarshal(bytes, &varFormatTest); err == nil { - *o = FormatTest(varFormatTest) + err = json.Unmarshal(bytes, &varFormatTest) + + if err != nil { + return err } + *o = FormatTest(varFormatTest) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_has_only_read_only.go b/samples/openapi3/client/petstore/go/go-petstore/model_has_only_read_only.go index 7f37585fa2e0..c7f8236ee236 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_has_only_read_only.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_has_only_read_only.go @@ -134,10 +134,14 @@ func (o HasOnlyReadOnly) ToMap() (map[string]interface{}, error) { func (o *HasOnlyReadOnly) UnmarshalJSON(bytes []byte) (err error) { varHasOnlyReadOnly := _HasOnlyReadOnly{} - if err = json.Unmarshal(bytes, &varHasOnlyReadOnly); err == nil { - *o = HasOnlyReadOnly(varHasOnlyReadOnly) + err = json.Unmarshal(bytes, &varHasOnlyReadOnly) + + if err != nil { + return err } + *o = HasOnlyReadOnly(varHasOnlyReadOnly) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_health_check_result.go b/samples/openapi3/client/petstore/go/go-petstore/model_health_check_result.go index c3498f9e9f8a..3617d9b3f8b7 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_health_check_result.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_health_check_result.go @@ -108,10 +108,14 @@ func (o HealthCheckResult) ToMap() (map[string]interface{}, error) { func (o *HealthCheckResult) UnmarshalJSON(bytes []byte) (err error) { varHealthCheckResult := _HealthCheckResult{} - if err = json.Unmarshal(bytes, &varHealthCheckResult); err == nil { - *o = HealthCheckResult(varHealthCheckResult) + err = json.Unmarshal(bytes, &varHealthCheckResult) + + if err != nil { + return err } + *o = HealthCheckResult(varHealthCheckResult) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_list.go b/samples/openapi3/client/petstore/go/go-petstore/model_list.go index 77017d73bc0c..8af38e91ef3b 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_list.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_list.go @@ -98,10 +98,14 @@ func (o List) ToMap() (map[string]interface{}, error) { func (o *List) UnmarshalJSON(bytes []byte) (err error) { varList := _List{} - if err = json.Unmarshal(bytes, &varList); err == nil { - *o = List(varList) + err = json.Unmarshal(bytes, &varList) + + if err != nil { + return err } + *o = List(varList) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_map_of_file_test_.go b/samples/openapi3/client/petstore/go/go-petstore/model_map_of_file_test_.go index e14eaaafe243..c86070564546 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_map_of_file_test_.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_map_of_file_test_.go @@ -100,10 +100,14 @@ func (o MapOfFileTest) ToMap() (map[string]interface{}, error) { func (o *MapOfFileTest) UnmarshalJSON(bytes []byte) (err error) { varMapOfFileTest := _MapOfFileTest{} - if err = json.Unmarshal(bytes, &varMapOfFileTest); err == nil { - *o = MapOfFileTest(varMapOfFileTest) + err = json.Unmarshal(bytes, &varMapOfFileTest) + + if err != nil { + return err } + *o = MapOfFileTest(varMapOfFileTest) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_map_test_.go b/samples/openapi3/client/petstore/go/go-petstore/model_map_test_.go index bd512760a45f..f7fefb0c1036 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_map_test_.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_map_test_.go @@ -206,10 +206,14 @@ func (o MapTest) ToMap() (map[string]interface{}, error) { func (o *MapTest) UnmarshalJSON(bytes []byte) (err error) { varMapTest := _MapTest{} - if err = json.Unmarshal(bytes, &varMapTest); err == nil { - *o = MapTest(varMapTest) + err = json.Unmarshal(bytes, &varMapTest) + + if err != nil { + return err } + *o = MapTest(varMapTest) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go b/samples/openapi3/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go index 4a65bb995733..8470ccb66320 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go @@ -171,10 +171,14 @@ func (o MixedPropertiesAndAdditionalPropertiesClass) ToMap() (map[string]interfa func (o *MixedPropertiesAndAdditionalPropertiesClass) UnmarshalJSON(bytes []byte) (err error) { varMixedPropertiesAndAdditionalPropertiesClass := _MixedPropertiesAndAdditionalPropertiesClass{} - if err = json.Unmarshal(bytes, &varMixedPropertiesAndAdditionalPropertiesClass); err == nil { - *o = MixedPropertiesAndAdditionalPropertiesClass(varMixedPropertiesAndAdditionalPropertiesClass) + err = json.Unmarshal(bytes, &varMixedPropertiesAndAdditionalPropertiesClass) + + if err != nil { + return err } + *o = MixedPropertiesAndAdditionalPropertiesClass(varMixedPropertiesAndAdditionalPropertiesClass) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_name.go b/samples/openapi3/client/petstore/go/go-petstore/model_name.go index 74b7b5deda0b..84a92878766a 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_name.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_name.go @@ -197,10 +197,14 @@ func (o Name) ToMap() (map[string]interface{}, error) { func (o *Name) UnmarshalJSON(bytes []byte) (err error) { varName := _Name{} - if err = json.Unmarshal(bytes, &varName); err == nil { - *o = Name(varName) + err = json.Unmarshal(bytes, &varName) + + if err != nil { + return err } + *o = Name(varName) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of.go b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of.go index f9f10c7e5ff4..3f7029b787da 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of.go @@ -108,10 +108,14 @@ func (o NullableAllOf) ToMap() (map[string]interface{}, error) { func (o *NullableAllOf) UnmarshalJSON(bytes []byte) (err error) { varNullableAllOf := _NullableAllOf{} - if err = json.Unmarshal(bytes, &varNullableAllOf); err == nil { - *o = NullableAllOf(varNullableAllOf) + err = json.Unmarshal(bytes, &varNullableAllOf) + + if err != nil { + return err } + *o = NullableAllOf(varNullableAllOf) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of_child.go b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of_child.go index 7b28b820f332..0aec0ac62550 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of_child.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of_child.go @@ -98,10 +98,14 @@ func (o NullableAllOfChild) ToMap() (map[string]interface{}, error) { func (o *NullableAllOfChild) UnmarshalJSON(bytes []byte) (err error) { varNullableAllOfChild := _NullableAllOfChild{} - if err = json.Unmarshal(bytes, &varNullableAllOfChild); err == nil { - *o = NullableAllOfChild(varNullableAllOfChild) + err = json.Unmarshal(bytes, &varNullableAllOfChild) + + if err != nil { + return err } + *o = NullableAllOfChild(varNullableAllOfChild) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_nullable_class.go b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_class.go index 580936cff216..a323a2e59524 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_nullable_class.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_class.go @@ -563,10 +563,14 @@ func (o NullableClass) ToMap() (map[string]interface{}, error) { func (o *NullableClass) UnmarshalJSON(bytes []byte) (err error) { varNullableClass := _NullableClass{} - if err = json.Unmarshal(bytes, &varNullableClass); err == nil { - *o = NullableClass(varNullableClass) + err = json.Unmarshal(bytes, &varNullableClass) + + if err != nil { + return err } + *o = NullableClass(varNullableClass) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_number_only.go b/samples/openapi3/client/petstore/go/go-petstore/model_number_only.go index 36bd0c4b7a2b..95b416db196f 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_number_only.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_number_only.go @@ -98,10 +98,14 @@ func (o NumberOnly) ToMap() (map[string]interface{}, error) { func (o *NumberOnly) UnmarshalJSON(bytes []byte) (err error) { varNumberOnly := _NumberOnly{} - if err = json.Unmarshal(bytes, &varNumberOnly); err == nil { - *o = NumberOnly(varNumberOnly) + err = json.Unmarshal(bytes, &varNumberOnly) + + if err != nil { + return err } + *o = NumberOnly(varNumberOnly) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_one_of_primitive_type_child.go b/samples/openapi3/client/petstore/go/go-petstore/model_one_of_primitive_type_child.go index 1c719015646d..1fa6693b43b3 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_one_of_primitive_type_child.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_one_of_primitive_type_child.go @@ -98,10 +98,14 @@ func (o OneOfPrimitiveTypeChild) ToMap() (map[string]interface{}, error) { func (o *OneOfPrimitiveTypeChild) UnmarshalJSON(bytes []byte) (err error) { varOneOfPrimitiveTypeChild := _OneOfPrimitiveTypeChild{} - if err = json.Unmarshal(bytes, &varOneOfPrimitiveTypeChild); err == nil { - *o = OneOfPrimitiveTypeChild(varOneOfPrimitiveTypeChild) + err = json.Unmarshal(bytes, &varOneOfPrimitiveTypeChild) + + if err != nil { + return err } + *o = OneOfPrimitiveTypeChild(varOneOfPrimitiveTypeChild) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_order.go b/samples/openapi3/client/petstore/go/go-petstore/model_order.go index a4be8a04ee2a..15f139933399 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_order.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_order.go @@ -284,10 +284,14 @@ func (o Order) ToMap() (map[string]interface{}, error) { func (o *Order) UnmarshalJSON(bytes []byte) (err error) { varOrder := _Order{} - if err = json.Unmarshal(bytes, &varOrder); err == nil { - *o = Order(varOrder) + err = json.Unmarshal(bytes, &varOrder) + + if err != nil { + return err } + *o = Order(varOrder) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_outer_composite.go b/samples/openapi3/client/petstore/go/go-petstore/model_outer_composite.go index 74c5518557bb..279f46eeac46 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_outer_composite.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_outer_composite.go @@ -170,10 +170,14 @@ func (o OuterComposite) ToMap() (map[string]interface{}, error) { func (o *OuterComposite) UnmarshalJSON(bytes []byte) (err error) { varOuterComposite := _OuterComposite{} - if err = json.Unmarshal(bytes, &varOuterComposite); err == nil { - *o = OuterComposite(varOuterComposite) + err = json.Unmarshal(bytes, &varOuterComposite) + + if err != nil { + return err } + *o = OuterComposite(varOuterComposite) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_pet.go b/samples/openapi3/client/petstore/go/go-petstore/model_pet.go index 156f6be2f76b..0f1ffe373e5b 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_pet.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_pet.go @@ -265,10 +265,14 @@ func (o Pet) ToMap() (map[string]interface{}, error) { func (o *Pet) UnmarshalJSON(bytes []byte) (err error) { varPet := _Pet{} - if err = json.Unmarshal(bytes, &varPet); err == nil { - *o = Pet(varPet) + err = json.Unmarshal(bytes, &varPet) + + if err != nil { + return err } + *o = Pet(varPet) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_property_name_mapping.go b/samples/openapi3/client/petstore/go/go-petstore/model_property_name_mapping.go index 058a55bd0b26..c621f708467d 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_property_name_mapping.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_property_name_mapping.go @@ -206,10 +206,14 @@ func (o PropertyNameMapping) ToMap() (map[string]interface{}, error) { func (o *PropertyNameMapping) UnmarshalJSON(bytes []byte) (err error) { varPropertyNameMapping := _PropertyNameMapping{} - if err = json.Unmarshal(bytes, &varPropertyNameMapping); err == nil { - *o = PropertyNameMapping(varPropertyNameMapping) + err = json.Unmarshal(bytes, &varPropertyNameMapping) + + if err != nil { + return err } + *o = PropertyNameMapping(varPropertyNameMapping) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_read_only_first.go b/samples/openapi3/client/petstore/go/go-petstore/model_read_only_first.go index 6aa66a79f202..3b240abf82b7 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_read_only_first.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_read_only_first.go @@ -134,10 +134,14 @@ func (o ReadOnlyFirst) ToMap() (map[string]interface{}, error) { func (o *ReadOnlyFirst) UnmarshalJSON(bytes []byte) (err error) { varReadOnlyFirst := _ReadOnlyFirst{} - if err = json.Unmarshal(bytes, &varReadOnlyFirst); err == nil { - *o = ReadOnlyFirst(varReadOnlyFirst) + err = json.Unmarshal(bytes, &varReadOnlyFirst) + + if err != nil { + return err } + *o = ReadOnlyFirst(varReadOnlyFirst) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_read_only_with_default.go b/samples/openapi3/client/petstore/go/go-petstore/model_read_only_with_default.go index 146b94ebc147..5bf6817a9c9b 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_read_only_with_default.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_read_only_with_default.go @@ -326,10 +326,14 @@ func (o ReadOnlyWithDefault) ToMap() (map[string]interface{}, error) { func (o *ReadOnlyWithDefault) UnmarshalJSON(bytes []byte) (err error) { varReadOnlyWithDefault := _ReadOnlyWithDefault{} - if err = json.Unmarshal(bytes, &varReadOnlyWithDefault); err == nil { - *o = ReadOnlyWithDefault(varReadOnlyWithDefault) + err = json.Unmarshal(bytes, &varReadOnlyWithDefault) + + if err != nil { + return err } + *o = ReadOnlyWithDefault(varReadOnlyWithDefault) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_return.go b/samples/openapi3/client/petstore/go/go-petstore/model_return.go index e77f7e007925..991ccc4bd796 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_return.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_return.go @@ -98,10 +98,14 @@ func (o Return) ToMap() (map[string]interface{}, error) { func (o *Return) UnmarshalJSON(bytes []byte) (err error) { varReturn := _Return{} - if err = json.Unmarshal(bytes, &varReturn); err == nil { - *o = Return(varReturn) + err = json.Unmarshal(bytes, &varReturn) + + if err != nil { + return err } + *o = Return(varReturn) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_tag.go b/samples/openapi3/client/petstore/go/go-petstore/model_tag.go index f77bf7206b0c..822a5a12c015 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_tag.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_tag.go @@ -134,10 +134,14 @@ func (o Tag) ToMap() (map[string]interface{}, error) { func (o *Tag) UnmarshalJSON(bytes []byte) (err error) { varTag := _Tag{} - if err = json.Unmarshal(bytes, &varTag); err == nil { - *o = Tag(varTag) + err = json.Unmarshal(bytes, &varTag) + + if err != nil { + return err } + *o = Tag(varTag) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_user.go b/samples/openapi3/client/petstore/go/go-petstore/model_user.go index b884647d1be0..08a1961af341 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_user.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_user.go @@ -502,10 +502,14 @@ func (o User) ToMap() (map[string]interface{}, error) { func (o *User) UnmarshalJSON(bytes []byte) (err error) { varUser := _User{} - if err = json.Unmarshal(bytes, &varUser); err == nil { - *o = User(varUser) + err = json.Unmarshal(bytes, &varUser) + + if err != nil { + return err } + *o = User(varUser) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_whale.go b/samples/openapi3/client/petstore/go/go-petstore/model_whale.go index 8ee96e3aea32..7e450a046cd9 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_whale.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_whale.go @@ -161,10 +161,14 @@ func (o Whale) ToMap() (map[string]interface{}, error) { func (o *Whale) UnmarshalJSON(bytes []byte) (err error) { varWhale := _Whale{} - if err = json.Unmarshal(bytes, &varWhale); err == nil { - *o = Whale(varWhale) + err = json.Unmarshal(bytes, &varWhale) + + if err != nil { + return err } + *o = Whale(varWhale) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_zebra.go b/samples/openapi3/client/petstore/go/go-petstore/model_zebra.go index 3349c9470cfc..01a0ae804d41 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_zebra.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_zebra.go @@ -125,10 +125,14 @@ func (o Zebra) ToMap() (map[string]interface{}, error) { func (o *Zebra) UnmarshalJSON(bytes []byte) (err error) { varZebra := _Zebra{} - if err = json.Unmarshal(bytes, &varZebra); err == nil { - *o = Zebra(varZebra) + err = json.Unmarshal(bytes, &varZebra) + + if err != nil { + return err } + *o = Zebra(varZebra) + additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(bytes, &additionalProperties); err == nil { diff --git a/samples/openapi3/client/petstore/go/store_api_test.go b/samples/openapi3/client/petstore/go/store_api_test.go index d8d5834452bf..564117a2bf84 100644 --- a/samples/openapi3/client/petstore/go/store_api_test.go +++ b/samples/openapi3/client/petstore/go/store_api_test.go @@ -24,7 +24,7 @@ func TestPlaceOrder(t *testing.T) { // Skip parsing time error due to error in Petstore Test Server // https://github.com/OpenAPITools/openapi-generator/issues/1292 if regexp. - MustCompile(`^parsing time.+cannot parse "\+0000"" as "Z07:00"$`). + MustCompile(`as "Z07:00"$`). MatchString(err.Error()) { t.Log("Skipping error for parsing time with `+0000` UTC offset as Petstore Test Server does not return valid RFC 3339 datetime") } else { From 781ccae7220f92a2e9adb07ceaefa5e4b7080eeb Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 13 Sep 2023 10:49:05 +0800 Subject: [PATCH 13/59] add go echo api tests (#16570) --- bin/configs/go-echo-api.yaml | 6 + samples/client/echo_api/go/.gitignore | 24 + .../echo_api/go/.openapi-generator-ignore | 23 + .../echo_api/go/.openapi-generator/FILES | 45 + .../echo_api/go/.openapi-generator/VERSION | 1 + samples/client/echo_api/go/.travis.yml | 8 + samples/client/echo_api/go/README.md | 155 +++ samples/client/echo_api/go/api/openapi.yaml | 724 ++++++++++++++ samples/client/echo_api/go/api_auth.go | 123 +++ samples/client/echo_api/go/api_body.go | 788 +++++++++++++++ samples/client/echo_api/go/api_form.go | 303 ++++++ samples/client/echo_api/go/api_header.go | 150 +++ samples/client/echo_api/go/api_path.go | 132 +++ samples/client/echo_api/go/api_query.go | 925 ++++++++++++++++++ samples/client/echo_api/go/client.go | 683 +++++++++++++ samples/client/echo_api/go/configuration.go | 219 +++++ samples/client/echo_api/go/docs/AuthAPI.md | 70 ++ samples/client/echo_api/go/docs/Bird.md | 82 ++ samples/client/echo_api/go/docs/BodyAPI.md | 472 +++++++++ samples/client/echo_api/go/docs/Category.md | 82 ++ samples/client/echo_api/go/docs/DataQuery.md | 108 ++ .../client/echo_api/go/docs/DefaultValue.md | 268 +++++ samples/client/echo_api/go/docs/FormAPI.md | 156 +++ samples/client/echo_api/go/docs/HeaderAPI.md | 79 ++ .../echo_api/go/docs/NumberPropertiesOnly.md | 108 ++ samples/client/echo_api/go/docs/PathAPI.md | 82 ++ samples/client/echo_api/go/docs/Pet.md | 176 ++++ samples/client/echo_api/go/docs/Query.md | 82 ++ samples/client/echo_api/go/docs/QueryAPI.md | 553 +++++++++++ .../client/echo_api/go/docs/StringEnumRef.md | 15 + samples/client/echo_api/go/docs/Tag.md | 82 ++ ...lodeTrueObjectAllOfQueryObjectParameter.md | 134 +++ ...lodeTrueArrayStringQueryObjectParameter.md | 56 ++ samples/client/echo_api/go/git_push.sh | 57 ++ samples/client/echo_api/go/go.mod | 6 + samples/client/echo_api/go/go.sum | 11 + samples/client/echo_api/go/model_bird.go | 163 +++ samples/client/echo_api/go/model_category.go | 163 +++ .../client/echo_api/go/model_data_query.go | 212 ++++ .../client/echo_api/go/model_default_value.go | 391 ++++++++ .../go/model_number_properties_only.go | 199 ++++ samples/client/echo_api/go/model_pet.go | 290 ++++++ samples/client/echo_api/go/model_query.go | 164 ++++ .../echo_api/go/model_string_enum_ref.go | 114 +++ samples/client/echo_api/go/model_tag.go | 163 +++ ...ue_object_all_of_query_object_parameter.go | 235 +++++ ...rue_array_string_query_object_parameter.go | 127 +++ samples/client/echo_api/go/response.go | 48 + .../client/echo_api/go/test/api_auth_test.go | 37 + .../client/echo_api/go/test/api_body_test.go | 109 +++ .../client/echo_api/go/test/api_form_test.go | 49 + .../echo_api/go/test/api_header_test.go | 37 + .../client/echo_api/go/test/api_path_test.go | 40 + .../client/echo_api/go/test/api_query_test.go | 121 +++ samples/client/echo_api/go/utils.go | 348 +++++++ 55 files changed, 9998 insertions(+) create mode 100644 bin/configs/go-echo-api.yaml create mode 100644 samples/client/echo_api/go/.gitignore create mode 100644 samples/client/echo_api/go/.openapi-generator-ignore create mode 100644 samples/client/echo_api/go/.openapi-generator/FILES create mode 100644 samples/client/echo_api/go/.openapi-generator/VERSION create mode 100644 samples/client/echo_api/go/.travis.yml create mode 100644 samples/client/echo_api/go/README.md create mode 100644 samples/client/echo_api/go/api/openapi.yaml create mode 100644 samples/client/echo_api/go/api_auth.go create mode 100644 samples/client/echo_api/go/api_body.go create mode 100644 samples/client/echo_api/go/api_form.go create mode 100644 samples/client/echo_api/go/api_header.go create mode 100644 samples/client/echo_api/go/api_path.go create mode 100644 samples/client/echo_api/go/api_query.go create mode 100644 samples/client/echo_api/go/client.go create mode 100644 samples/client/echo_api/go/configuration.go create mode 100644 samples/client/echo_api/go/docs/AuthAPI.md create mode 100644 samples/client/echo_api/go/docs/Bird.md create mode 100644 samples/client/echo_api/go/docs/BodyAPI.md create mode 100644 samples/client/echo_api/go/docs/Category.md create mode 100644 samples/client/echo_api/go/docs/DataQuery.md create mode 100644 samples/client/echo_api/go/docs/DefaultValue.md create mode 100644 samples/client/echo_api/go/docs/FormAPI.md create mode 100644 samples/client/echo_api/go/docs/HeaderAPI.md create mode 100644 samples/client/echo_api/go/docs/NumberPropertiesOnly.md create mode 100644 samples/client/echo_api/go/docs/PathAPI.md create mode 100644 samples/client/echo_api/go/docs/Pet.md create mode 100644 samples/client/echo_api/go/docs/Query.md create mode 100644 samples/client/echo_api/go/docs/QueryAPI.md create mode 100644 samples/client/echo_api/go/docs/StringEnumRef.md create mode 100644 samples/client/echo_api/go/docs/Tag.md create mode 100644 samples/client/echo_api/go/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md create mode 100644 samples/client/echo_api/go/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md create mode 100644 samples/client/echo_api/go/git_push.sh create mode 100644 samples/client/echo_api/go/go.mod create mode 100644 samples/client/echo_api/go/go.sum create mode 100644 samples/client/echo_api/go/model_bird.go create mode 100644 samples/client/echo_api/go/model_category.go create mode 100644 samples/client/echo_api/go/model_data_query.go create mode 100644 samples/client/echo_api/go/model_default_value.go create mode 100644 samples/client/echo_api/go/model_number_properties_only.go create mode 100644 samples/client/echo_api/go/model_pet.go create mode 100644 samples/client/echo_api/go/model_query.go create mode 100644 samples/client/echo_api/go/model_string_enum_ref.go create mode 100644 samples/client/echo_api/go/model_tag.go create mode 100644 samples/client/echo_api/go/model_test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.go create mode 100644 samples/client/echo_api/go/model_test_query_style_form_explode_true_array_string_query_object_parameter.go create mode 100644 samples/client/echo_api/go/response.go create mode 100644 samples/client/echo_api/go/test/api_auth_test.go create mode 100644 samples/client/echo_api/go/test/api_body_test.go create mode 100644 samples/client/echo_api/go/test/api_form_test.go create mode 100644 samples/client/echo_api/go/test/api_header_test.go create mode 100644 samples/client/echo_api/go/test/api_path_test.go create mode 100644 samples/client/echo_api/go/test/api_query_test.go create mode 100644 samples/client/echo_api/go/utils.go diff --git a/bin/configs/go-echo-api.yaml b/bin/configs/go-echo-api.yaml new file mode 100644 index 000000000000..1d6b3be9b5ca --- /dev/null +++ b/bin/configs/go-echo-api.yaml @@ -0,0 +1,6 @@ +generatorName: go +outputDir: samples/client/echo_api/go +inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml +templateDir: modules/openapi-generator/src/main/resources/go +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/samples/client/echo_api/go/.gitignore b/samples/client/echo_api/go/.gitignore new file mode 100644 index 000000000000..daf913b1b347 --- /dev/null +++ b/samples/client/echo_api/go/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/samples/client/echo_api/go/.openapi-generator-ignore b/samples/client/echo_api/go/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/echo_api/go/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/echo_api/go/.openapi-generator/FILES b/samples/client/echo_api/go/.openapi-generator/FILES new file mode 100644 index 000000000000..f1b5917aafdb --- /dev/null +++ b/samples/client/echo_api/go/.openapi-generator/FILES @@ -0,0 +1,45 @@ +.gitignore +.travis.yml +README.md +api/openapi.yaml +api_auth.go +api_body.go +api_form.go +api_header.go +api_path.go +api_query.go +client.go +configuration.go +docs/AuthAPI.md +docs/Bird.md +docs/BodyAPI.md +docs/Category.md +docs/DataQuery.md +docs/DefaultValue.md +docs/FormAPI.md +docs/HeaderAPI.md +docs/NumberPropertiesOnly.md +docs/PathAPI.md +docs/Pet.md +docs/Query.md +docs/QueryAPI.md +docs/StringEnumRef.md +docs/Tag.md +docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md +docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md +git_push.sh +go.mod +go.sum +model_bird.go +model_category.go +model_data_query.go +model_default_value.go +model_number_properties_only.go +model_pet.go +model_query.go +model_string_enum_ref.go +model_tag.go +model_test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.go +model_test_query_style_form_explode_true_array_string_query_object_parameter.go +response.go +utils.go diff --git a/samples/client/echo_api/go/.openapi-generator/VERSION b/samples/client/echo_api/go/.openapi-generator/VERSION new file mode 100644 index 000000000000..44bad91b171c --- /dev/null +++ b/samples/client/echo_api/go/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/echo_api/go/.travis.yml b/samples/client/echo_api/go/.travis.yml new file mode 100644 index 000000000000..f5cb2ce9a5aa --- /dev/null +++ b/samples/client/echo_api/go/.travis.yml @@ -0,0 +1,8 @@ +language: go + +install: + - go get -d -v . + +script: + - go build -v ./ + diff --git a/samples/client/echo_api/go/README.md b/samples/client/echo_api/go/README.md new file mode 100644 index 000000000000..3f8b982ab635 --- /dev/null +++ b/samples/client/echo_api/go/README.md @@ -0,0 +1,155 @@ +# Go API client for openapi + +Echo Server API + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 0.1.0 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.GoClientCodegen + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import openapi "github.com/GIT_USER_ID/GIT_REPO_ID" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```golang +os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") +``` + +## Configuration of Server URL + +Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. + +### Select Server Configuration + +For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. + +```golang +ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1) +``` + +### Templated Server URL + +Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. + +```golang +ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{ + "basePath": "v2", +}) +``` + +Note, enum values are always validated and all unused variables are silently ignored. + +### URLs Configuration per Operation + +Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. +An operation is uniquely identified by `"{classname}Service.{nickname}"` string. +Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. + +```golang +ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost:3000* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AuthAPI* | [**TestAuthHttpBasic**](docs/AuthAPI.md#testauthhttpbasic) | **Post** /auth/http/basic | To test HTTP basic authentication +*BodyAPI* | [**TestBinaryGif**](docs/BodyAPI.md#testbinarygif) | **Post** /binary/gif | Test binary (gif) response body +*BodyAPI* | [**TestBodyApplicationOctetstreamBinary**](docs/BodyAPI.md#testbodyapplicationoctetstreambinary) | **Post** /body/application/octetstream/binary | Test body parameter(s) +*BodyAPI* | [**TestBodyMultipartFormdataArrayOfBinary**](docs/BodyAPI.md#testbodymultipartformdataarrayofbinary) | **Post** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*BodyAPI* | [**TestEchoBodyFreeFormObjectResponseString**](docs/BodyAPI.md#testechobodyfreeformobjectresponsestring) | **Post** /echo/body/FreeFormObject/response_string | Test free form object +*BodyAPI* | [**TestEchoBodyPet**](docs/BodyAPI.md#testechobodypet) | **Post** /echo/body/Pet | Test body parameter(s) +*BodyAPI* | [**TestEchoBodyPetResponseString**](docs/BodyAPI.md#testechobodypetresponsestring) | **Post** /echo/body/Pet/response_string | Test empty response body +*BodyAPI* | [**TestEchoBodyTagResponseString**](docs/BodyAPI.md#testechobodytagresponsestring) | **Post** /echo/body/Tag/response_string | Test empty json (request body) +*FormAPI* | [**TestFormIntegerBooleanString**](docs/FormAPI.md#testformintegerbooleanstring) | **Post** /form/integer/boolean/string | Test form parameter(s) +*FormAPI* | [**TestFormOneof**](docs/FormAPI.md#testformoneof) | **Post** /form/oneof | Test form parameter(s) for oneOf schema +*HeaderAPI* | [**TestHeaderIntegerBooleanString**](docs/HeaderAPI.md#testheaderintegerbooleanstring) | **Get** /header/integer/boolean/string | Test header parameter(s) +*PathAPI* | [**TestsPathStringPathStringIntegerPathInteger**](docs/PathAPI.md#testspathstringpathstringintegerpathinteger) | **Get** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s) +*QueryAPI* | [**TestEnumRefString**](docs/QueryAPI.md#testenumrefstring) | **Get** /query/enum_ref_string | Test query parameter(s) +*QueryAPI* | [**TestQueryDatetimeDateString**](docs/QueryAPI.md#testquerydatetimedatestring) | **Get** /query/datetime/date/string | Test query parameter(s) +*QueryAPI* | [**TestQueryIntegerBooleanString**](docs/QueryAPI.md#testqueryintegerbooleanstring) | **Get** /query/integer/boolean/string | Test query parameter(s) +*QueryAPI* | [**TestQueryStyleDeepObjectExplodeTrueObject**](docs/QueryAPI.md#testquerystyledeepobjectexplodetrueobject) | **Get** /query/style_deepObject/explode_true/object | Test query parameter(s) +*QueryAPI* | [**TestQueryStyleDeepObjectExplodeTrueObjectAllOf**](docs/QueryAPI.md#testquerystyledeepobjectexplodetrueobjectallof) | **Get** /query/style_deepObject/explode_true/object/allOf | Test query parameter(s) +*QueryAPI* | [**TestQueryStyleFormExplodeTrueArrayString**](docs/QueryAPI.md#testquerystyleformexplodetruearraystring) | **Get** /query/style_form/explode_true/array_string | Test query parameter(s) +*QueryAPI* | [**TestQueryStyleFormExplodeTrueObject**](docs/QueryAPI.md#testquerystyleformexplodetrueobject) | **Get** /query/style_form/explode_true/object | Test query parameter(s) +*QueryAPI* | [**TestQueryStyleFormExplodeTrueObjectAllOf**](docs/QueryAPI.md#testquerystyleformexplodetrueobjectallof) | **Get** /query/style_form/explode_true/object/allOf | Test query parameter(s) + + +## Documentation For Models + + - [Bird](docs/Bird.md) + - [Category](docs/Category.md) + - [DataQuery](docs/DataQuery.md) + - [DefaultValue](docs/DefaultValue.md) + - [NumberPropertiesOnly](docs/NumberPropertiesOnly.md) + - [Pet](docs/Pet.md) + - [Query](docs/Query.md) + - [StringEnumRef](docs/StringEnumRef.md) + - [Tag](docs/Tag.md) + - [TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter](docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md) + - [TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter](docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md) + + +## Documentation For Authorization + + +Authentication schemes defined for the API: +### http_auth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Documentation for Utility Methods + +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: + +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` + +## Author + +team@openapitools.org + diff --git a/samples/client/echo_api/go/api/openapi.yaml b/samples/client/echo_api/go/api/openapi.yaml new file mode 100644 index 000000000000..8be6a498b486 --- /dev/null +++ b/samples/client/echo_api/go/api/openapi.yaml @@ -0,0 +1,724 @@ +openapi: 3.0.3 +info: + contact: + email: team@openapitools.org + description: Echo Server API + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + title: Echo Server API + version: 0.1.0 +servers: +- url: http://localhost:3000/ +paths: + /path/string/{path_string}/integer/{path_integer}: + get: + description: Test path parameter(s) + operationId: "tests/path/string/{path_string}/integer/{path_integer}" + parameters: + - explode: false + in: path + name: path_string + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: path_integer + required: true + schema: + type: integer + style: simple + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test path parameter(s) + tags: + - path + /form/integer/boolean/string: + post: + description: Test form parameter(s) + operationId: test/form/integer/boolean/string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/test_form_integer_boolean_string_request' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test form parameter(s) + tags: + - form + /form/oneof: + post: + description: Test form parameter(s) for oneOf schema + operationId: test/form/oneof + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/test_form_oneof_request' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test form parameter(s) for oneOf schema + tags: + - form + /header/integer/boolean/string: + get: + description: Test header parameter(s) + operationId: test/header/integer/boolean/string + parameters: + - explode: true + in: header + name: integer_header + required: false + schema: + type: integer + style: form + - explode: true + in: header + name: boolean_header + required: false + schema: + type: boolean + style: form + - explode: true + in: header + name: string_header + required: false + schema: + type: string + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test header parameter(s) + tags: + - header + /query/enum_ref_string: + get: + description: Test query parameter(s) + operationId: test/enum_ref_string + parameters: + - explode: true + in: query + name: enum_ref_string_query + required: false + schema: + $ref: '#/components/schemas/StringEnumRef' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + /query/datetime/date/string: + get: + description: Test query parameter(s) + operationId: test/query/datetime/date/string + parameters: + - explode: true + in: query + name: datetime_query + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: date_query + required: false + schema: + format: date + type: string + style: form + - explode: true + in: query + name: string_query + required: false + schema: + type: string + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + /query/integer/boolean/string: + get: + description: Test query parameter(s) + operationId: test/query/integer/boolean/string + parameters: + - explode: true + in: query + name: integer_query + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: boolean_query + required: false + schema: + type: boolean + style: form + - explode: true + in: query + name: string_query + required: false + schema: + type: string + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + /query/style_form/explode_true/array_string: + get: + description: Test query parameter(s) + operationId: test/query/style_form/explode_true/array_string + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/test_query_style_form_explode_true_array_string_query_object_parameter' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + /query/style_form/explode_true/object: + get: + description: Test query parameter(s) + operationId: test/query/style_form/explode_true/object + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/Pet' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + /query/style_form/explode_true/object/allOf: + get: + description: Test query parameter(s) + operationId: test/query/style_form/explode_true/object/allOf + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/DataQuery' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + /query/style_deepObject/explode_true/object: + get: + description: Test query parameter(s) + operationId: test/query/style_deepObject/explode_true/object + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/Pet' + style: deepObject + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + /query/style_deepObject/explode_true/object/allOf: + get: + description: Test query parameter(s) + operationId: test/query/style_deepObject/explode_true/object/allOf + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/test_query_style_deepObject_explode_true_object_allOf_query_object_parameter' + style: deepObject + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + /body/application/octetstream/binary: + post: + description: Test body parameter(s) + operationId: test/body/application/octetstream/binary + requestBody: + content: + application/octet-stream: + schema: + format: binary + type: string + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test body parameter(s) + tags: + - body + /echo/body/Pet: + post: + description: Test body parameter(s) + operationId: test/echo/body/Pet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: Successful operation + summary: Test body parameter(s) + tags: + - body + /echo/body/Pet/response_string: + post: + description: Test empty response body + operationId: test/echo/body/Pet/response_string + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test empty response body + tags: + - body + /echo/body/Tag/response_string: + post: + description: Test empty json (request body) + operationId: test/echo/body/Tag/response_string + requestBody: + $ref: '#/components/requestBodies/Tag' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test empty json (request body) + tags: + - body + /echo/body/FreeFormObject/response_string: + post: + description: Test free form object + operationId: test/echo/body/FreeFormObject/response_string + requestBody: + content: + application/json: + schema: + type: object + description: Free form object + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test free form object + tags: + - body + /binary/gif: + post: + description: Test binary (gif) response body + operationId: test/binary/gif + responses: + "200": + content: + image/gif: + schema: + format: binary + type: string + description: Successful operation + summary: Test binary (gif) response body + tags: + - body + /body/application/octetstream/array_of_binary: + post: + description: Test array of binary in multipart mime + operationId: test/body/multipart/formdata/array_of_binary + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/test_body_multipart_formdata_array_of_binary_request' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test array of binary in multipart mime + tags: + - body + /auth/http/basic: + post: + description: To test HTTP basic authentication + operationId: test/auth/http/basic + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + security: + - http_auth: [] + summary: To test HTTP basic authentication + tags: + - auth +components: + requestBodies: + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + Tag: + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + description: Tag object + schemas: + Category: + example: + name: Dogs + id: 1 + properties: + id: + example: 1 + format: int64 + type: integer + name: + example: Dogs + type: string + type: object + xml: + name: category + Tag: + example: + name: name + id: 0 + properties: + id: + format: int64 + type: integer + name: + type: string + type: object + xml: + name: tag + Pet: + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 10 + category: + name: Dogs + id: 1 + tags: + - name: name + id: 0 + - name: name + id: 0 + status: available + properties: + id: + example: 10 + format: int64 + type: integer + name: + example: doggie + type: string + category: + $ref: '#/components/schemas/Category' + photoUrls: + items: + type: string + xml: + name: photoUrl + type: array + xml: + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + wrapped: true + status: + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + type: object + xml: + name: pet + StringEnumRef: + enum: + - success + - failure + - unclassified + type: string + DefaultValue: + description: to test the default value of properties + properties: + array_string_enum_ref_default: + default: + - success + - failure + items: + $ref: '#/components/schemas/StringEnumRef' + type: array + array_string_enum_default: + default: + - success + - failure + items: + enum: + - success + - failure + - unclassified + type: string + type: array + array_string_default: + default: + - failure + - skipped + items: + type: string + type: array + array_integer_default: + default: + - 1 + - 3 + items: + type: integer + type: array + array_string: + items: + type: string + type: array + array_string_nullable: + items: + type: string + nullable: true + type: array + array_string_extension_nullable: + items: + type: string + type: array + x-nullable: true + string_nullable: + nullable: true + type: string + type: object + Bird: + properties: + size: + type: string + color: + type: string + type: object + Query: + properties: + id: + description: Query + format: int64 + type: integer + outcomes: + default: + - SUCCESS + - FAILURE + items: + enum: + - SUCCESS + - FAILURE + - SKIPPED + type: string + type: array + type: object + x-parent: true + 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: + number: + type: number + float: + format: float + type: number + double: + format: double + maximum: 50.2 + minimum: 0.8 + type: number + type: object + test_form_integer_boolean_string_request: + properties: + integer_form: + type: integer + boolean_form: + type: boolean + string_form: + type: string + type: object + test_form_oneof_request_oneOf: + properties: + form1: + type: string + form2: + type: integer + type: object + test_form_oneof_request_oneOf_1: + properties: + form3: + type: string + form4: + type: boolean + type: object + test_form_oneof_request: + oneOf: + - $ref: '#/components/schemas/test_form_oneof_request_oneOf' + - $ref: '#/components/schemas/test_form_oneof_request_oneOf_1' + - $ref: '#/components/schemas/Tag' + type: object + test_query_style_form_explode_true_array_string_query_object_parameter: + properties: + values: + items: + type: string + type: array + type: object + test_query_style_deepObject_explode_true_object_allOf_query_object_parameter: + allOf: + - $ref: '#/components/schemas/Bird' + - $ref: '#/components/schemas/Category' + test_body_multipart_formdata_array_of_binary_request: + properties: + files: + items: + format: binary + type: string + type: array + required: + - files + type: object + securitySchemes: + http_auth: + scheme: basic + type: http diff --git a/samples/client/echo_api/go/api_auth.go b/samples/client/echo_api/go/api_auth.go new file mode 100644 index 000000000000..0af21ce06031 --- /dev/null +++ b/samples/client/echo_api/go/api_auth.go @@ -0,0 +1,123 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// AuthAPIService AuthAPI service +type AuthAPIService service + +type ApiTestAuthHttpBasicRequest struct { + ctx context.Context + ApiService *AuthAPIService +} + +func (r ApiTestAuthHttpBasicRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestAuthHttpBasicExecute(r) +} + +/* +TestAuthHttpBasic To test HTTP basic authentication + +To test HTTP basic authentication + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestAuthHttpBasicRequest +*/ +func (a *AuthAPIService) TestAuthHttpBasic(ctx context.Context) ApiTestAuthHttpBasicRequest { + return ApiTestAuthHttpBasicRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *AuthAPIService) TestAuthHttpBasicExecute(r ApiTestAuthHttpBasicRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthAPIService.TestAuthHttpBasic") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/http/basic" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/samples/client/echo_api/go/api_body.go b/samples/client/echo_api/go/api_body.go new file mode 100644 index 000000000000..f06ffc274b65 --- /dev/null +++ b/samples/client/echo_api/go/api_body.go @@ -0,0 +1,788 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "os" +) + + +// BodyAPIService BodyAPI service +type BodyAPIService service + +type ApiTestBinaryGifRequest struct { + ctx context.Context + ApiService *BodyAPIService +} + +func (r ApiTestBinaryGifRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.TestBinaryGifExecute(r) +} + +/* +TestBinaryGif Test binary (gif) response body + +Test binary (gif) response body + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestBinaryGifRequest +*/ +func (a *BodyAPIService) TestBinaryGif(ctx context.Context) ApiTestBinaryGifRequest { + return ApiTestBinaryGifRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return *os.File +func (a *BodyAPIService) TestBinaryGifExecute(r ApiTestBinaryGifRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BodyAPIService.TestBinaryGif") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/binary/gif" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"image/gif"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTestBodyApplicationOctetstreamBinaryRequest struct { + ctx context.Context + ApiService *BodyAPIService + body *os.File +} + +func (r ApiTestBodyApplicationOctetstreamBinaryRequest) Body(body *os.File) ApiTestBodyApplicationOctetstreamBinaryRequest { + r.body = body + return r +} + +func (r ApiTestBodyApplicationOctetstreamBinaryRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestBodyApplicationOctetstreamBinaryExecute(r) +} + +/* +TestBodyApplicationOctetstreamBinary Test body parameter(s) + +Test body parameter(s) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestBodyApplicationOctetstreamBinaryRequest +*/ +func (a *BodyAPIService) TestBodyApplicationOctetstreamBinary(ctx context.Context) ApiTestBodyApplicationOctetstreamBinaryRequest { + return ApiTestBodyApplicationOctetstreamBinaryRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *BodyAPIService) TestBodyApplicationOctetstreamBinaryExecute(r ApiTestBodyApplicationOctetstreamBinaryRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BodyAPIService.TestBodyApplicationOctetstreamBinary") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/body/application/octetstream/binary" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/octet-stream"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTestBodyMultipartFormdataArrayOfBinaryRequest struct { + ctx context.Context + ApiService *BodyAPIService + files []*os.File +} + +func (r ApiTestBodyMultipartFormdataArrayOfBinaryRequest) Files(files []*os.File) ApiTestBodyMultipartFormdataArrayOfBinaryRequest { + r.files = files + return r +} + +func (r ApiTestBodyMultipartFormdataArrayOfBinaryRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestBodyMultipartFormdataArrayOfBinaryExecute(r) +} + +/* +TestBodyMultipartFormdataArrayOfBinary Test array of binary in multipart mime + +Test array of binary in multipart mime + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestBodyMultipartFormdataArrayOfBinaryRequest +*/ +func (a *BodyAPIService) TestBodyMultipartFormdataArrayOfBinary(ctx context.Context) ApiTestBodyMultipartFormdataArrayOfBinaryRequest { + return ApiTestBodyMultipartFormdataArrayOfBinaryRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *BodyAPIService) TestBodyMultipartFormdataArrayOfBinaryExecute(r ApiTestBodyMultipartFormdataArrayOfBinaryRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BodyAPIService.TestBodyMultipartFormdataArrayOfBinary") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/body/application/octetstream/array_of_binary" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.files == nil { + return localVarReturnValue, nil, reportError("files is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + var filesLocalVarFormFileName string + var filesLocalVarFileName string + var filesLocalVarFileBytes []byte + + filesLocalVarFormFileName = "files" + + + filesLocalVarFile := r.files + + if filesLocalVarFile != nil { + fbs, _ := io.ReadAll(filesLocalVarFile) + + filesLocalVarFileBytes = fbs + filesLocalVarFileName = filesLocalVarFile.Name() + filesLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: filesLocalVarFileBytes, fileName: filesLocalVarFileName, formFileName: filesLocalVarFormFileName}) + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTestEchoBodyFreeFormObjectResponseStringRequest struct { + ctx context.Context + ApiService *BodyAPIService + body *map[string]interface{} +} + +// Free form object +func (r ApiTestEchoBodyFreeFormObjectResponseStringRequest) Body(body map[string]interface{}) ApiTestEchoBodyFreeFormObjectResponseStringRequest { + r.body = &body + return r +} + +func (r ApiTestEchoBodyFreeFormObjectResponseStringRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestEchoBodyFreeFormObjectResponseStringExecute(r) +} + +/* +TestEchoBodyFreeFormObjectResponseString Test free form object + +Test free form object + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestEchoBodyFreeFormObjectResponseStringRequest +*/ +func (a *BodyAPIService) TestEchoBodyFreeFormObjectResponseString(ctx context.Context) ApiTestEchoBodyFreeFormObjectResponseStringRequest { + return ApiTestEchoBodyFreeFormObjectResponseStringRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *BodyAPIService) TestEchoBodyFreeFormObjectResponseStringExecute(r ApiTestEchoBodyFreeFormObjectResponseStringRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BodyAPIService.TestEchoBodyFreeFormObjectResponseString") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/echo/body/FreeFormObject/response_string" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTestEchoBodyPetRequest struct { + ctx context.Context + ApiService *BodyAPIService + pet *Pet +} + +// Pet object that needs to be added to the store +func (r ApiTestEchoBodyPetRequest) Pet(pet Pet) ApiTestEchoBodyPetRequest { + r.pet = &pet + return r +} + +func (r ApiTestEchoBodyPetRequest) Execute() (*Pet, *http.Response, error) { + return r.ApiService.TestEchoBodyPetExecute(r) +} + +/* +TestEchoBodyPet Test body parameter(s) + +Test body parameter(s) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestEchoBodyPetRequest +*/ +func (a *BodyAPIService) TestEchoBodyPet(ctx context.Context) ApiTestEchoBodyPetRequest { + return ApiTestEchoBodyPetRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Pet +func (a *BodyAPIService) TestEchoBodyPetExecute(r ApiTestEchoBodyPetRequest) (*Pet, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Pet + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BodyAPIService.TestEchoBodyPet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/echo/body/Pet" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.pet + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTestEchoBodyPetResponseStringRequest struct { + ctx context.Context + ApiService *BodyAPIService + pet *Pet +} + +// Pet object that needs to be added to the store +func (r ApiTestEchoBodyPetResponseStringRequest) Pet(pet Pet) ApiTestEchoBodyPetResponseStringRequest { + r.pet = &pet + return r +} + +func (r ApiTestEchoBodyPetResponseStringRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestEchoBodyPetResponseStringExecute(r) +} + +/* +TestEchoBodyPetResponseString Test empty response body + +Test empty response body + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestEchoBodyPetResponseStringRequest +*/ +func (a *BodyAPIService) TestEchoBodyPetResponseString(ctx context.Context) ApiTestEchoBodyPetResponseStringRequest { + return ApiTestEchoBodyPetResponseStringRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *BodyAPIService) TestEchoBodyPetResponseStringExecute(r ApiTestEchoBodyPetResponseStringRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BodyAPIService.TestEchoBodyPetResponseString") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/echo/body/Pet/response_string" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.pet + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTestEchoBodyTagResponseStringRequest struct { + ctx context.Context + ApiService *BodyAPIService + tag *Tag +} + +// Tag object +func (r ApiTestEchoBodyTagResponseStringRequest) Tag(tag Tag) ApiTestEchoBodyTagResponseStringRequest { + r.tag = &tag + return r +} + +func (r ApiTestEchoBodyTagResponseStringRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestEchoBodyTagResponseStringExecute(r) +} + +/* +TestEchoBodyTagResponseString Test empty json (request body) + +Test empty json (request body) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestEchoBodyTagResponseStringRequest +*/ +func (a *BodyAPIService) TestEchoBodyTagResponseString(ctx context.Context) ApiTestEchoBodyTagResponseStringRequest { + return ApiTestEchoBodyTagResponseStringRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *BodyAPIService) TestEchoBodyTagResponseStringExecute(r ApiTestEchoBodyTagResponseStringRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BodyAPIService.TestEchoBodyTagResponseString") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/echo/body/Tag/response_string" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.tag + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/samples/client/echo_api/go/api_form.go b/samples/client/echo_api/go/api_form.go new file mode 100644 index 000000000000..4aa3386dc974 --- /dev/null +++ b/samples/client/echo_api/go/api_form.go @@ -0,0 +1,303 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// FormAPIService FormAPI service +type FormAPIService service + +type ApiTestFormIntegerBooleanStringRequest struct { + ctx context.Context + ApiService *FormAPIService + integerForm *int32 + booleanForm *bool + stringForm *string +} + +func (r ApiTestFormIntegerBooleanStringRequest) IntegerForm(integerForm int32) ApiTestFormIntegerBooleanStringRequest { + r.integerForm = &integerForm + return r +} + +func (r ApiTestFormIntegerBooleanStringRequest) BooleanForm(booleanForm bool) ApiTestFormIntegerBooleanStringRequest { + r.booleanForm = &booleanForm + return r +} + +func (r ApiTestFormIntegerBooleanStringRequest) StringForm(stringForm string) ApiTestFormIntegerBooleanStringRequest { + r.stringForm = &stringForm + return r +} + +func (r ApiTestFormIntegerBooleanStringRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestFormIntegerBooleanStringExecute(r) +} + +/* +TestFormIntegerBooleanString Test form parameter(s) + +Test form parameter(s) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestFormIntegerBooleanStringRequest +*/ +func (a *FormAPIService) TestFormIntegerBooleanString(ctx context.Context) ApiTestFormIntegerBooleanStringRequest { + return ApiTestFormIntegerBooleanStringRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *FormAPIService) TestFormIntegerBooleanStringExecute(r ApiTestFormIntegerBooleanStringRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FormAPIService.TestFormIntegerBooleanString") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/form/integer/boolean/string" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.integerForm != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "integer_form", r.integerForm, "") + } + if r.booleanForm != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "boolean_form", r.booleanForm, "") + } + if r.stringForm != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "string_form", r.stringForm, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTestFormOneofRequest struct { + ctx context.Context + ApiService *FormAPIService + form1 *string + form2 *int32 + form3 *string + form4 *bool + id *int64 + name *string +} + +func (r ApiTestFormOneofRequest) Form1(form1 string) ApiTestFormOneofRequest { + r.form1 = &form1 + return r +} + +func (r ApiTestFormOneofRequest) Form2(form2 int32) ApiTestFormOneofRequest { + r.form2 = &form2 + return r +} + +func (r ApiTestFormOneofRequest) Form3(form3 string) ApiTestFormOneofRequest { + r.form3 = &form3 + return r +} + +func (r ApiTestFormOneofRequest) Form4(form4 bool) ApiTestFormOneofRequest { + r.form4 = &form4 + return r +} + +func (r ApiTestFormOneofRequest) Id(id int64) ApiTestFormOneofRequest { + r.id = &id + return r +} + +func (r ApiTestFormOneofRequest) Name(name string) ApiTestFormOneofRequest { + r.name = &name + return r +} + +func (r ApiTestFormOneofRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestFormOneofExecute(r) +} + +/* +TestFormOneof Test form parameter(s) for oneOf schema + +Test form parameter(s) for oneOf schema + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestFormOneofRequest +*/ +func (a *FormAPIService) TestFormOneof(ctx context.Context) ApiTestFormOneofRequest { + return ApiTestFormOneofRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *FormAPIService) TestFormOneofExecute(r ApiTestFormOneofRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FormAPIService.TestFormOneof") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/form/oneof" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.form1 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "form1", r.form1, "") + } + if r.form2 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "form2", r.form2, "") + } + if r.form3 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "form3", r.form3, "") + } + if r.form4 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "form4", r.form4, "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "id", r.id, "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "name", r.name, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/samples/client/echo_api/go/api_header.go b/samples/client/echo_api/go/api_header.go new file mode 100644 index 000000000000..f66175f27d37 --- /dev/null +++ b/samples/client/echo_api/go/api_header.go @@ -0,0 +1,150 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// HeaderAPIService HeaderAPI service +type HeaderAPIService service + +type ApiTestHeaderIntegerBooleanStringRequest struct { + ctx context.Context + ApiService *HeaderAPIService + integerHeader *int32 + booleanHeader *bool + stringHeader *string +} + +func (r ApiTestHeaderIntegerBooleanStringRequest) IntegerHeader(integerHeader int32) ApiTestHeaderIntegerBooleanStringRequest { + r.integerHeader = &integerHeader + return r +} + +func (r ApiTestHeaderIntegerBooleanStringRequest) BooleanHeader(booleanHeader bool) ApiTestHeaderIntegerBooleanStringRequest { + r.booleanHeader = &booleanHeader + return r +} + +func (r ApiTestHeaderIntegerBooleanStringRequest) StringHeader(stringHeader string) ApiTestHeaderIntegerBooleanStringRequest { + r.stringHeader = &stringHeader + return r +} + +func (r ApiTestHeaderIntegerBooleanStringRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestHeaderIntegerBooleanStringExecute(r) +} + +/* +TestHeaderIntegerBooleanString Test header parameter(s) + +Test header parameter(s) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestHeaderIntegerBooleanStringRequest +*/ +func (a *HeaderAPIService) TestHeaderIntegerBooleanString(ctx context.Context) ApiTestHeaderIntegerBooleanStringRequest { + return ApiTestHeaderIntegerBooleanStringRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *HeaderAPIService) TestHeaderIntegerBooleanStringExecute(r ApiTestHeaderIntegerBooleanStringRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "HeaderAPIService.TestHeaderIntegerBooleanString") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/header/integer/boolean/string" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.integerHeader != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "integer_header", r.integerHeader, "") + } + if r.booleanHeader != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "boolean_header", r.booleanHeader, "") + } + if r.stringHeader != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "string_header", r.stringHeader, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/samples/client/echo_api/go/api_path.go b/samples/client/echo_api/go/api_path.go new file mode 100644 index 000000000000..281c9a0c5136 --- /dev/null +++ b/samples/client/echo_api/go/api_path.go @@ -0,0 +1,132 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// PathAPIService PathAPI service +type PathAPIService service + +type ApiTestsPathStringPathStringIntegerPathIntegerRequest struct { + ctx context.Context + ApiService *PathAPIService + pathString string + pathInteger int32 +} + +func (r ApiTestsPathStringPathStringIntegerPathIntegerRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestsPathStringPathStringIntegerPathIntegerExecute(r) +} + +/* +TestsPathStringPathStringIntegerPathInteger Test path parameter(s) + +Test path parameter(s) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param pathString + @param pathInteger + @return ApiTestsPathStringPathStringIntegerPathIntegerRequest +*/ +func (a *PathAPIService) TestsPathStringPathStringIntegerPathInteger(ctx context.Context, pathString string, pathInteger int32) ApiTestsPathStringPathStringIntegerPathIntegerRequest { + return ApiTestsPathStringPathStringIntegerPathIntegerRequest{ + ApiService: a, + ctx: ctx, + pathString: pathString, + pathInteger: pathInteger, + } +} + +// Execute executes the request +// @return string +func (a *PathAPIService) TestsPathStringPathStringIntegerPathIntegerExecute(r ApiTestsPathStringPathStringIntegerPathIntegerRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PathAPIService.TestsPathStringPathStringIntegerPathInteger") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/path/string/{path_string}/integer/{path_integer}" + localVarPath = strings.Replace(localVarPath, "{"+"path_string"+"}", url.PathEscape(parameterValueToString(r.pathString, "pathString")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"path_integer"+"}", url.PathEscape(parameterValueToString(r.pathInteger, "pathInteger")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/samples/client/echo_api/go/api_query.go b/samples/client/echo_api/go/api_query.go new file mode 100644 index 000000000000..6a21c9d0763b --- /dev/null +++ b/samples/client/echo_api/go/api_query.go @@ -0,0 +1,925 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "time" +) + + +// QueryAPIService QueryAPI service +type QueryAPIService service + +type ApiTestEnumRefStringRequest struct { + ctx context.Context + ApiService *QueryAPIService + enumRefStringQuery *StringEnumRef +} + +func (r ApiTestEnumRefStringRequest) EnumRefStringQuery(enumRefStringQuery StringEnumRef) ApiTestEnumRefStringRequest { + r.enumRefStringQuery = &enumRefStringQuery + return r +} + +func (r ApiTestEnumRefStringRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestEnumRefStringExecute(r) +} + +/* +TestEnumRefString Test query parameter(s) + +Test query parameter(s) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestEnumRefStringRequest +*/ +func (a *QueryAPIService) TestEnumRefString(ctx context.Context) ApiTestEnumRefStringRequest { + return ApiTestEnumRefStringRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *QueryAPIService) TestEnumRefStringExecute(r ApiTestEnumRefStringRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QueryAPIService.TestEnumRefString") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/query/enum_ref_string" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.enumRefStringQuery != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "enum_ref_string_query", r.enumRefStringQuery, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTestQueryDatetimeDateStringRequest struct { + ctx context.Context + ApiService *QueryAPIService + datetimeQuery *time.Time + dateQuery *string + stringQuery *string +} + +func (r ApiTestQueryDatetimeDateStringRequest) DatetimeQuery(datetimeQuery time.Time) ApiTestQueryDatetimeDateStringRequest { + r.datetimeQuery = &datetimeQuery + return r +} + +func (r ApiTestQueryDatetimeDateStringRequest) DateQuery(dateQuery string) ApiTestQueryDatetimeDateStringRequest { + r.dateQuery = &dateQuery + return r +} + +func (r ApiTestQueryDatetimeDateStringRequest) StringQuery(stringQuery string) ApiTestQueryDatetimeDateStringRequest { + r.stringQuery = &stringQuery + return r +} + +func (r ApiTestQueryDatetimeDateStringRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestQueryDatetimeDateStringExecute(r) +} + +/* +TestQueryDatetimeDateString Test query parameter(s) + +Test query parameter(s) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestQueryDatetimeDateStringRequest +*/ +func (a *QueryAPIService) TestQueryDatetimeDateString(ctx context.Context) ApiTestQueryDatetimeDateStringRequest { + return ApiTestQueryDatetimeDateStringRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *QueryAPIService) TestQueryDatetimeDateStringExecute(r ApiTestQueryDatetimeDateStringRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QueryAPIService.TestQueryDatetimeDateString") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/query/datetime/date/string" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.datetimeQuery != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "datetime_query", r.datetimeQuery, "") + } + if r.dateQuery != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "date_query", r.dateQuery, "") + } + if r.stringQuery != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "string_query", r.stringQuery, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTestQueryIntegerBooleanStringRequest struct { + ctx context.Context + ApiService *QueryAPIService + integerQuery *int32 + booleanQuery *bool + stringQuery *string +} + +func (r ApiTestQueryIntegerBooleanStringRequest) IntegerQuery(integerQuery int32) ApiTestQueryIntegerBooleanStringRequest { + r.integerQuery = &integerQuery + return r +} + +func (r ApiTestQueryIntegerBooleanStringRequest) BooleanQuery(booleanQuery bool) ApiTestQueryIntegerBooleanStringRequest { + r.booleanQuery = &booleanQuery + return r +} + +func (r ApiTestQueryIntegerBooleanStringRequest) StringQuery(stringQuery string) ApiTestQueryIntegerBooleanStringRequest { + r.stringQuery = &stringQuery + return r +} + +func (r ApiTestQueryIntegerBooleanStringRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestQueryIntegerBooleanStringExecute(r) +} + +/* +TestQueryIntegerBooleanString Test query parameter(s) + +Test query parameter(s) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestQueryIntegerBooleanStringRequest +*/ +func (a *QueryAPIService) TestQueryIntegerBooleanString(ctx context.Context) ApiTestQueryIntegerBooleanStringRequest { + return ApiTestQueryIntegerBooleanStringRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *QueryAPIService) TestQueryIntegerBooleanStringExecute(r ApiTestQueryIntegerBooleanStringRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QueryAPIService.TestQueryIntegerBooleanString") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/query/integer/boolean/string" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.integerQuery != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "integer_query", r.integerQuery, "") + } + if r.booleanQuery != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "boolean_query", r.booleanQuery, "") + } + if r.stringQuery != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "string_query", r.stringQuery, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTestQueryStyleDeepObjectExplodeTrueObjectRequest struct { + ctx context.Context + ApiService *QueryAPIService + queryObject *Pet +} + +func (r ApiTestQueryStyleDeepObjectExplodeTrueObjectRequest) QueryObject(queryObject Pet) ApiTestQueryStyleDeepObjectExplodeTrueObjectRequest { + r.queryObject = &queryObject + return r +} + +func (r ApiTestQueryStyleDeepObjectExplodeTrueObjectRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestQueryStyleDeepObjectExplodeTrueObjectExecute(r) +} + +/* +TestQueryStyleDeepObjectExplodeTrueObject Test query parameter(s) + +Test query parameter(s) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestQueryStyleDeepObjectExplodeTrueObjectRequest +*/ +func (a *QueryAPIService) TestQueryStyleDeepObjectExplodeTrueObject(ctx context.Context) ApiTestQueryStyleDeepObjectExplodeTrueObjectRequest { + return ApiTestQueryStyleDeepObjectExplodeTrueObjectRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *QueryAPIService) TestQueryStyleDeepObjectExplodeTrueObjectExecute(r ApiTestQueryStyleDeepObjectExplodeTrueObjectRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QueryAPIService.TestQueryStyleDeepObjectExplodeTrueObject") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/query/style_deepObject/explode_true/object" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.queryObject != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "query_object", r.queryObject, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTestQueryStyleDeepObjectExplodeTrueObjectAllOfRequest struct { + ctx context.Context + ApiService *QueryAPIService + queryObject *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter +} + +func (r ApiTestQueryStyleDeepObjectExplodeTrueObjectAllOfRequest) QueryObject(queryObject TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) ApiTestQueryStyleDeepObjectExplodeTrueObjectAllOfRequest { + r.queryObject = &queryObject + return r +} + +func (r ApiTestQueryStyleDeepObjectExplodeTrueObjectAllOfRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestQueryStyleDeepObjectExplodeTrueObjectAllOfExecute(r) +} + +/* +TestQueryStyleDeepObjectExplodeTrueObjectAllOf Test query parameter(s) + +Test query parameter(s) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestQueryStyleDeepObjectExplodeTrueObjectAllOfRequest +*/ +func (a *QueryAPIService) TestQueryStyleDeepObjectExplodeTrueObjectAllOf(ctx context.Context) ApiTestQueryStyleDeepObjectExplodeTrueObjectAllOfRequest { + return ApiTestQueryStyleDeepObjectExplodeTrueObjectAllOfRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *QueryAPIService) TestQueryStyleDeepObjectExplodeTrueObjectAllOfExecute(r ApiTestQueryStyleDeepObjectExplodeTrueObjectAllOfRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QueryAPIService.TestQueryStyleDeepObjectExplodeTrueObjectAllOf") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/query/style_deepObject/explode_true/object/allOf" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.queryObject != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "query_object", r.queryObject, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTestQueryStyleFormExplodeTrueArrayStringRequest struct { + ctx context.Context + ApiService *QueryAPIService + queryObject *TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter +} + +func (r ApiTestQueryStyleFormExplodeTrueArrayStringRequest) QueryObject(queryObject TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) ApiTestQueryStyleFormExplodeTrueArrayStringRequest { + r.queryObject = &queryObject + return r +} + +func (r ApiTestQueryStyleFormExplodeTrueArrayStringRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestQueryStyleFormExplodeTrueArrayStringExecute(r) +} + +/* +TestQueryStyleFormExplodeTrueArrayString Test query parameter(s) + +Test query parameter(s) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestQueryStyleFormExplodeTrueArrayStringRequest +*/ +func (a *QueryAPIService) TestQueryStyleFormExplodeTrueArrayString(ctx context.Context) ApiTestQueryStyleFormExplodeTrueArrayStringRequest { + return ApiTestQueryStyleFormExplodeTrueArrayStringRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *QueryAPIService) TestQueryStyleFormExplodeTrueArrayStringExecute(r ApiTestQueryStyleFormExplodeTrueArrayStringRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QueryAPIService.TestQueryStyleFormExplodeTrueArrayString") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/query/style_form/explode_true/array_string" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.queryObject != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "query_object", r.queryObject, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTestQueryStyleFormExplodeTrueObjectRequest struct { + ctx context.Context + ApiService *QueryAPIService + queryObject *Pet +} + +func (r ApiTestQueryStyleFormExplodeTrueObjectRequest) QueryObject(queryObject Pet) ApiTestQueryStyleFormExplodeTrueObjectRequest { + r.queryObject = &queryObject + return r +} + +func (r ApiTestQueryStyleFormExplodeTrueObjectRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestQueryStyleFormExplodeTrueObjectExecute(r) +} + +/* +TestQueryStyleFormExplodeTrueObject Test query parameter(s) + +Test query parameter(s) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestQueryStyleFormExplodeTrueObjectRequest +*/ +func (a *QueryAPIService) TestQueryStyleFormExplodeTrueObject(ctx context.Context) ApiTestQueryStyleFormExplodeTrueObjectRequest { + return ApiTestQueryStyleFormExplodeTrueObjectRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *QueryAPIService) TestQueryStyleFormExplodeTrueObjectExecute(r ApiTestQueryStyleFormExplodeTrueObjectRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QueryAPIService.TestQueryStyleFormExplodeTrueObject") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/query/style_form/explode_true/object" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.queryObject != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "query_object", r.queryObject, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTestQueryStyleFormExplodeTrueObjectAllOfRequest struct { + ctx context.Context + ApiService *QueryAPIService + queryObject *DataQuery +} + +func (r ApiTestQueryStyleFormExplodeTrueObjectAllOfRequest) QueryObject(queryObject DataQuery) ApiTestQueryStyleFormExplodeTrueObjectAllOfRequest { + r.queryObject = &queryObject + return r +} + +func (r ApiTestQueryStyleFormExplodeTrueObjectAllOfRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestQueryStyleFormExplodeTrueObjectAllOfExecute(r) +} + +/* +TestQueryStyleFormExplodeTrueObjectAllOf Test query parameter(s) + +Test query parameter(s) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestQueryStyleFormExplodeTrueObjectAllOfRequest +*/ +func (a *QueryAPIService) TestQueryStyleFormExplodeTrueObjectAllOf(ctx context.Context) ApiTestQueryStyleFormExplodeTrueObjectAllOfRequest { + return ApiTestQueryStyleFormExplodeTrueObjectAllOfRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *QueryAPIService) TestQueryStyleFormExplodeTrueObjectAllOfExecute(r ApiTestQueryStyleFormExplodeTrueObjectAllOfRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "QueryAPIService.TestQueryStyleFormExplodeTrueObjectAllOf") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/query/style_form/explode_true/object/allOf" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.queryObject != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "query_object", r.queryObject, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/samples/client/echo_api/go/client.go b/samples/client/echo_api/go/client.go new file mode 100644 index 000000000000..2c88423e340a --- /dev/null +++ b/samples/client/echo_api/go/client.go @@ -0,0 +1,683 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + +) + +var ( + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) +) + +// APIClient manages communication with the Echo Server API API v0.1.0 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + AuthAPI *AuthAPIService + + BodyAPI *BodyAPIService + + FormAPI *FormAPIService + + HeaderAPI *HeaderAPIService + + PathAPI *PathAPIService + + QueryAPI *QueryAPIService +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.AuthAPI = (*AuthAPIService)(&c.common) + c.BodyAPI = (*BodyAPIService)(&c.common) + c.FormAPI = (*FormAPIService)(&c.common) + c.HeaderAPI = (*HeaderAPIService)(&c.common) + c.PathAPI = (*PathAPIService)(&c.common) + c.QueryAPI = (*QueryAPIService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func parameterValueToString( obj interface{}, key string ) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param,ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap,err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t,ok := obj.(MappedNullable); ok { + dataMap,err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i:=0;i 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + // Basic HTTP Authentication + if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { + localVarRequest.SetBasicAuth(auth.UserName, auth.Password) + } + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + err = os.Remove(f.Name()) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + err = os.Remove((*f).Name()) + return + } + if xmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if jsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + err = file.Close() + if err != nil { + return err + } + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/samples/client/echo_api/go/configuration.go b/samples/client/echo_api/go/configuration.go new file mode 100644 index 000000000000..43d6759c24f8 --- /dev/null +++ b/samples/client/echo_api/go/configuration.go @@ -0,0 +1,219 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "context" + "fmt" + "net/http" + "strings" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextBasicAuth takes BasicAuth as authentication for the request. + ContextBasicAuth = contextKey("basic") + + // ContextServerIndex uses a server configuration from the index. + ContextServerIndex = contextKey("serverIndex") + + // ContextOperationServerIndices uses a server configuration from the index mapping. + ContextOperationServerIndices = contextKey("serverOperationIndices") + + // ContextServerVariables overrides a server configuration variables. + ContextServerVariables = contextKey("serverVariables") + + // ContextOperationServerVariables overrides a server configuration variables using operation specific values. + ContextOperationServerVariables = contextKey("serverOperationVariables") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +// ServerVariable stores the information about a server variable +type ServerVariable struct { + Description string + DefaultValue string + EnumValues []string +} + +// ServerConfiguration stores the information about a server +type ServerConfiguration struct { + URL string + Description string + Variables map[string]ServerVariable +} + +// ServerConfigurations stores multiple ServerConfiguration items +type ServerConfigurations []ServerConfiguration + +// Configuration stores the configuration of the API client +type Configuration struct { + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + Debug bool `json:"debug,omitempty"` + Servers ServerConfigurations + OperationServers map[string]ServerConfigurations + HTTPClient *http.Client +} + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { + cfg := &Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Servers: ServerConfigurations{ + { + URL: "http://localhost:3000", + Description: "No description provided", + }, + }, + OperationServers: map[string]ServerConfigurations{ + }, + } + return cfg +} + +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} + +// URL formats template on a index using given variables +func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { + if index < 0 || len(sc) <= index { + return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) + } + server := sc[index] + url := server.URL + + // go through variables and replace placeholders + for name, variable := range server.Variables { + if value, ok := variables[name]; ok { + found := bool(len(variable.EnumValues) == 0) + for _, enumValue := range variable.EnumValues { + if value == enumValue { + found = true + } + } + if !found { + return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + } + url = strings.Replace(url, "{"+name+"}", value, -1) + } else { + url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) + } + } + return url, nil +} + +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { + return c.Servers.URL(index, variables) +} + +func getServerIndex(ctx context.Context) (int, error) { + si := ctx.Value(ContextServerIndex) + if si != nil { + if index, ok := si.(int); ok { + return index, nil + } + return 0, reportError("Invalid type %T should be int", si) + } + return 0, nil +} + +func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { + osi := ctx.Value(ContextOperationServerIndices) + if osi != nil { + if operationIndices, ok := osi.(map[string]int); !ok { + return 0, reportError("Invalid type %T should be map[string]int", osi) + } else { + index, ok := operationIndices[endpoint] + if ok { + return index, nil + } + } + } + return getServerIndex(ctx) +} + +func getServerVariables(ctx context.Context) (map[string]string, error) { + sv := ctx.Value(ContextServerVariables) + if sv != nil { + if variables, ok := sv.(map[string]string); ok { + return variables, nil + } + return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) + } + return nil, nil +} + +func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { + osv := ctx.Value(ContextOperationServerVariables) + if osv != nil { + if operationVariables, ok := osv.(map[string]map[string]string); !ok { + return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) + } else { + variables, ok := operationVariables[endpoint] + if ok { + return variables, nil + } + } + } + return getServerVariables(ctx) +} + +// ServerURLWithContext returns a new server URL given an endpoint +func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { + sc, ok := c.OperationServers[endpoint] + if !ok { + sc = c.Servers + } + + if ctx == nil { + return sc.URL(0, nil) + } + + index, err := getServerOperationIndex(ctx, endpoint) + if err != nil { + return "", err + } + + variables, err := getServerOperationVariables(ctx, endpoint) + if err != nil { + return "", err + } + + return sc.URL(index, variables) +} diff --git a/samples/client/echo_api/go/docs/AuthAPI.md b/samples/client/echo_api/go/docs/AuthAPI.md new file mode 100644 index 000000000000..e7bbfc23abd5 --- /dev/null +++ b/samples/client/echo_api/go/docs/AuthAPI.md @@ -0,0 +1,70 @@ +# \AuthAPI + +All URIs are relative to *http://localhost:3000* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**TestAuthHttpBasic**](AuthAPI.md#TestAuthHttpBasic) | **Post** /auth/http/basic | To test HTTP basic authentication + + + +## TestAuthHttpBasic + +> string TestAuthHttpBasic(ctx).Execute() + +To test HTTP basic authentication + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthAPI.TestAuthHttpBasic(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthAPI.TestAuthHttpBasic``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestAuthHttpBasic`: string + fmt.Fprintf(os.Stdout, "Response from `AuthAPI.TestAuthHttpBasic`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestAuthHttpBasicRequest struct via the builder pattern + + +### Return type + +**string** + +### Authorization + +[http_auth](../README.md#http_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/client/echo_api/go/docs/Bird.md b/samples/client/echo_api/go/docs/Bird.md new file mode 100644 index 000000000000..c98b8240e1e4 --- /dev/null +++ b/samples/client/echo_api/go/docs/Bird.md @@ -0,0 +1,82 @@ +# Bird + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Size** | Pointer to **string** | | [optional] +**Color** | Pointer to **string** | | [optional] + +## Methods + +### NewBird + +`func NewBird() *Bird` + +NewBird instantiates a new Bird 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 + +### NewBirdWithDefaults + +`func NewBirdWithDefaults() *Bird` + +NewBirdWithDefaults instantiates a new Bird 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 + +### GetSize + +`func (o *Bird) GetSize() string` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *Bird) GetSizeOk() (*string, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *Bird) SetSize(v string)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *Bird) HasSize() bool` + +HasSize returns a boolean if a field has been set. + +### GetColor + +`func (o *Bird) GetColor() string` + +GetColor returns the Color field if non-nil, zero value otherwise. + +### GetColorOk + +`func (o *Bird) GetColorOk() (*string, bool)` + +GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetColor + +`func (o *Bird) SetColor(v string)` + +SetColor sets Color field to given value. + +### HasColor + +`func (o *Bird) HasColor() bool` + +HasColor 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/echo_api/go/docs/BodyAPI.md b/samples/client/echo_api/go/docs/BodyAPI.md new file mode 100644 index 000000000000..73b021cdcdea --- /dev/null +++ b/samples/client/echo_api/go/docs/BodyAPI.md @@ -0,0 +1,472 @@ +# \BodyAPI + +All URIs are relative to *http://localhost:3000* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**TestBinaryGif**](BodyAPI.md#TestBinaryGif) | **Post** /binary/gif | Test binary (gif) response body +[**TestBodyApplicationOctetstreamBinary**](BodyAPI.md#TestBodyApplicationOctetstreamBinary) | **Post** /body/application/octetstream/binary | Test body parameter(s) +[**TestBodyMultipartFormdataArrayOfBinary**](BodyAPI.md#TestBodyMultipartFormdataArrayOfBinary) | **Post** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +[**TestEchoBodyFreeFormObjectResponseString**](BodyAPI.md#TestEchoBodyFreeFormObjectResponseString) | **Post** /echo/body/FreeFormObject/response_string | Test free form object +[**TestEchoBodyPet**](BodyAPI.md#TestEchoBodyPet) | **Post** /echo/body/Pet | Test body parameter(s) +[**TestEchoBodyPetResponseString**](BodyAPI.md#TestEchoBodyPetResponseString) | **Post** /echo/body/Pet/response_string | Test empty response body +[**TestEchoBodyTagResponseString**](BodyAPI.md#TestEchoBodyTagResponseString) | **Post** /echo/body/Tag/response_string | Test empty json (request body) + + + +## TestBinaryGif + +> *os.File TestBinaryGif(ctx).Execute() + +Test binary (gif) response body + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BodyAPI.TestBinaryGif(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BodyAPI.TestBinaryGif``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestBinaryGif`: *os.File + fmt.Fprintf(os.Stdout, "Response from `BodyAPI.TestBinaryGif`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestBinaryGifRequest struct via the builder pattern + + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: image/gif + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestBodyApplicationOctetstreamBinary + +> string TestBodyApplicationOctetstreamBinary(ctx).Body(body).Execute() + +Test body parameter(s) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + body := os.NewFile(1234, "some_file") // *os.File | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BodyAPI.TestBodyApplicationOctetstreamBinary(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BodyAPI.TestBodyApplicationOctetstreamBinary``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestBodyApplicationOctetstreamBinary`: string + fmt.Fprintf(os.Stdout, "Response from `BodyAPI.TestBodyApplicationOctetstreamBinary`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestBodyApplicationOctetstreamBinaryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | ***os.File** | | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/octet-stream +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestBodyMultipartFormdataArrayOfBinary + +> string TestBodyMultipartFormdataArrayOfBinary(ctx).Files(files).Execute() + +Test array of binary in multipart mime + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + files := []*os.File{"TODO"} // []*os.File | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BodyAPI.TestBodyMultipartFormdataArrayOfBinary(context.Background()).Files(files).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BodyAPI.TestBodyMultipartFormdataArrayOfBinary``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestBodyMultipartFormdataArrayOfBinary`: string + fmt.Fprintf(os.Stdout, "Response from `BodyAPI.TestBodyMultipartFormdataArrayOfBinary`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestBodyMultipartFormdataArrayOfBinaryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **files** | **[]*os.File** | | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestEchoBodyFreeFormObjectResponseString + +> string TestEchoBodyFreeFormObjectResponseString(ctx).Body(body).Execute() + +Test free form object + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + body := map[string]interface{}{ ... } // map[string]interface{} | Free form object (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BodyAPI.TestEchoBodyFreeFormObjectResponseString(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BodyAPI.TestEchoBodyFreeFormObjectResponseString``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestEchoBodyFreeFormObjectResponseString`: string + fmt.Fprintf(os.Stdout, "Response from `BodyAPI.TestEchoBodyFreeFormObjectResponseString`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestEchoBodyFreeFormObjectResponseStringRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **map[string]interface{}** | Free form object | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestEchoBodyPet + +> Pet TestEchoBodyPet(ctx).Pet(pet).Execute() + +Test body parameter(s) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + pet := *openapiclient.NewPet("doggie", []string{"PhotoUrls_example"}) // Pet | Pet object that needs to be added to the store (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BodyAPI.TestEchoBodyPet(context.Background()).Pet(pet).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BodyAPI.TestEchoBodyPet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestEchoBodyPet`: Pet + fmt.Fprintf(os.Stdout, "Response from `BodyAPI.TestEchoBodyPet`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestEchoBodyPetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestEchoBodyPetResponseString + +> string TestEchoBodyPetResponseString(ctx).Pet(pet).Execute() + +Test empty response body + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + pet := *openapiclient.NewPet("doggie", []string{"PhotoUrls_example"}) // Pet | Pet object that needs to be added to the store (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BodyAPI.TestEchoBodyPetResponseString(context.Background()).Pet(pet).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BodyAPI.TestEchoBodyPetResponseString``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestEchoBodyPetResponseString`: string + fmt.Fprintf(os.Stdout, "Response from `BodyAPI.TestEchoBodyPetResponseString`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestEchoBodyPetResponseStringRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestEchoBodyTagResponseString + +> string TestEchoBodyTagResponseString(ctx).Tag(tag).Execute() + +Test empty json (request body) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + tag := *openapiclient.NewTag() // Tag | Tag object (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BodyAPI.TestEchoBodyTagResponseString(context.Background()).Tag(tag).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BodyAPI.TestEchoBodyTagResponseString``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestEchoBodyTagResponseString`: string + fmt.Fprintf(os.Stdout, "Response from `BodyAPI.TestEchoBodyTagResponseString`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestEchoBodyTagResponseStringRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tag** | [**Tag**](Tag.md) | Tag object | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/client/echo_api/go/docs/Category.md b/samples/client/echo_api/go/docs/Category.md new file mode 100644 index 000000000000..9bedc96c5340 --- /dev/null +++ b/samples/client/echo_api/go/docs/Category.md @@ -0,0 +1,82 @@ +# Category + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int64** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewCategory + +`func NewCategory() *Category` + +NewCategory instantiates a new Category 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 + +### NewCategoryWithDefaults + +`func NewCategoryWithDefaults() *Category` + +NewCategoryWithDefaults instantiates a new Category 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 + +### GetId + +`func (o *Category) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Category) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Category) SetId(v int64)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Category) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *Category) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Category) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Category) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Category) HasName() bool` + +HasName 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/echo_api/go/docs/DataQuery.md b/samples/client/echo_api/go/docs/DataQuery.md new file mode 100644 index 000000000000..d33748bc1267 --- /dev/null +++ b/samples/client/echo_api/go/docs/DataQuery.md @@ -0,0 +1,108 @@ +# DataQuery + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Suffix** | Pointer to **string** | test suffix | [optional] +**Text** | Pointer to **string** | Some text containing white spaces | [optional] +**Date** | Pointer to **time.Time** | A date | [optional] + +## Methods + +### NewDataQuery + +`func NewDataQuery() *DataQuery` + +NewDataQuery instantiates a new DataQuery 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 + +### NewDataQueryWithDefaults + +`func NewDataQueryWithDefaults() *DataQuery` + +NewDataQueryWithDefaults instantiates a new DataQuery 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 + +### GetSuffix + +`func (o *DataQuery) GetSuffix() string` + +GetSuffix returns the Suffix field if non-nil, zero value otherwise. + +### GetSuffixOk + +`func (o *DataQuery) GetSuffixOk() (*string, bool)` + +GetSuffixOk returns a tuple with the Suffix field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSuffix + +`func (o *DataQuery) SetSuffix(v string)` + +SetSuffix sets Suffix field to given value. + +### HasSuffix + +`func (o *DataQuery) HasSuffix() bool` + +HasSuffix returns a boolean if a field has been set. + +### GetText + +`func (o *DataQuery) GetText() string` + +GetText returns the Text field if non-nil, zero value otherwise. + +### GetTextOk + +`func (o *DataQuery) GetTextOk() (*string, bool)` + +GetTextOk returns a tuple with the Text field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetText + +`func (o *DataQuery) SetText(v string)` + +SetText sets Text field to given value. + +### HasText + +`func (o *DataQuery) HasText() bool` + +HasText returns a boolean if a field has been set. + +### GetDate + +`func (o *DataQuery) GetDate() time.Time` + +GetDate returns the Date field if non-nil, zero value otherwise. + +### GetDateOk + +`func (o *DataQuery) GetDateOk() (*time.Time, bool)` + +GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDate + +`func (o *DataQuery) SetDate(v time.Time)` + +SetDate sets Date field to given value. + +### HasDate + +`func (o *DataQuery) HasDate() bool` + +HasDate 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/echo_api/go/docs/DefaultValue.md b/samples/client/echo_api/go/docs/DefaultValue.md new file mode 100644 index 000000000000..c6469d1db9a9 --- /dev/null +++ b/samples/client/echo_api/go/docs/DefaultValue.md @@ -0,0 +1,268 @@ +# DefaultValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArrayStringEnumRefDefault** | Pointer to [**[]StringEnumRef**](StringEnumRef.md) | | [optional] [default to ["success","failure"]] +**ArrayStringEnumDefault** | Pointer to **[]string** | | [optional] [default to ["success","failure"]] +**ArrayStringDefault** | Pointer to **[]string** | | [optional] [default to ["failure","skipped"]] +**ArrayIntegerDefault** | Pointer to **[]int32** | | [optional] [default to [1,3]] +**ArrayString** | Pointer to **[]string** | | [optional] +**ArrayStringNullable** | Pointer to **[]string** | | [optional] +**ArrayStringExtensionNullable** | Pointer to **[]string** | | [optional] +**StringNullable** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewDefaultValue + +`func NewDefaultValue() *DefaultValue` + +NewDefaultValue instantiates a new DefaultValue 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 + +### NewDefaultValueWithDefaults + +`func NewDefaultValueWithDefaults() *DefaultValue` + +NewDefaultValueWithDefaults instantiates a new DefaultValue 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 + +### GetArrayStringEnumRefDefault + +`func (o *DefaultValue) GetArrayStringEnumRefDefault() []StringEnumRef` + +GetArrayStringEnumRefDefault returns the ArrayStringEnumRefDefault field if non-nil, zero value otherwise. + +### GetArrayStringEnumRefDefaultOk + +`func (o *DefaultValue) GetArrayStringEnumRefDefaultOk() (*[]StringEnumRef, bool)` + +GetArrayStringEnumRefDefaultOk returns a tuple with the ArrayStringEnumRefDefault field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArrayStringEnumRefDefault + +`func (o *DefaultValue) SetArrayStringEnumRefDefault(v []StringEnumRef)` + +SetArrayStringEnumRefDefault sets ArrayStringEnumRefDefault field to given value. + +### HasArrayStringEnumRefDefault + +`func (o *DefaultValue) HasArrayStringEnumRefDefault() bool` + +HasArrayStringEnumRefDefault returns a boolean if a field has been set. + +### GetArrayStringEnumDefault + +`func (o *DefaultValue) GetArrayStringEnumDefault() []string` + +GetArrayStringEnumDefault returns the ArrayStringEnumDefault field if non-nil, zero value otherwise. + +### GetArrayStringEnumDefaultOk + +`func (o *DefaultValue) GetArrayStringEnumDefaultOk() (*[]string, bool)` + +GetArrayStringEnumDefaultOk returns a tuple with the ArrayStringEnumDefault field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArrayStringEnumDefault + +`func (o *DefaultValue) SetArrayStringEnumDefault(v []string)` + +SetArrayStringEnumDefault sets ArrayStringEnumDefault field to given value. + +### HasArrayStringEnumDefault + +`func (o *DefaultValue) HasArrayStringEnumDefault() bool` + +HasArrayStringEnumDefault returns a boolean if a field has been set. + +### GetArrayStringDefault + +`func (o *DefaultValue) GetArrayStringDefault() []string` + +GetArrayStringDefault returns the ArrayStringDefault field if non-nil, zero value otherwise. + +### GetArrayStringDefaultOk + +`func (o *DefaultValue) GetArrayStringDefaultOk() (*[]string, bool)` + +GetArrayStringDefaultOk returns a tuple with the ArrayStringDefault field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArrayStringDefault + +`func (o *DefaultValue) SetArrayStringDefault(v []string)` + +SetArrayStringDefault sets ArrayStringDefault field to given value. + +### HasArrayStringDefault + +`func (o *DefaultValue) HasArrayStringDefault() bool` + +HasArrayStringDefault returns a boolean if a field has been set. + +### GetArrayIntegerDefault + +`func (o *DefaultValue) GetArrayIntegerDefault() []int32` + +GetArrayIntegerDefault returns the ArrayIntegerDefault field if non-nil, zero value otherwise. + +### GetArrayIntegerDefaultOk + +`func (o *DefaultValue) GetArrayIntegerDefaultOk() (*[]int32, bool)` + +GetArrayIntegerDefaultOk returns a tuple with the ArrayIntegerDefault field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArrayIntegerDefault + +`func (o *DefaultValue) SetArrayIntegerDefault(v []int32)` + +SetArrayIntegerDefault sets ArrayIntegerDefault field to given value. + +### HasArrayIntegerDefault + +`func (o *DefaultValue) HasArrayIntegerDefault() bool` + +HasArrayIntegerDefault returns a boolean if a field has been set. + +### GetArrayString + +`func (o *DefaultValue) GetArrayString() []string` + +GetArrayString returns the ArrayString field if non-nil, zero value otherwise. + +### GetArrayStringOk + +`func (o *DefaultValue) GetArrayStringOk() (*[]string, bool)` + +GetArrayStringOk returns a tuple with the ArrayString field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArrayString + +`func (o *DefaultValue) SetArrayString(v []string)` + +SetArrayString sets ArrayString field to given value. + +### HasArrayString + +`func (o *DefaultValue) HasArrayString() bool` + +HasArrayString returns a boolean if a field has been set. + +### GetArrayStringNullable + +`func (o *DefaultValue) GetArrayStringNullable() []string` + +GetArrayStringNullable returns the ArrayStringNullable field if non-nil, zero value otherwise. + +### GetArrayStringNullableOk + +`func (o *DefaultValue) GetArrayStringNullableOk() (*[]string, bool)` + +GetArrayStringNullableOk returns a tuple with the ArrayStringNullable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArrayStringNullable + +`func (o *DefaultValue) SetArrayStringNullable(v []string)` + +SetArrayStringNullable sets ArrayStringNullable field to given value. + +### HasArrayStringNullable + +`func (o *DefaultValue) HasArrayStringNullable() bool` + +HasArrayStringNullable returns a boolean if a field has been set. + +### SetArrayStringNullableNil + +`func (o *DefaultValue) SetArrayStringNullableNil(b bool)` + + SetArrayStringNullableNil sets the value for ArrayStringNullable to be an explicit nil + +### UnsetArrayStringNullable +`func (o *DefaultValue) UnsetArrayStringNullable()` + +UnsetArrayStringNullable ensures that no value is present for ArrayStringNullable, not even an explicit nil +### GetArrayStringExtensionNullable + +`func (o *DefaultValue) GetArrayStringExtensionNullable() []string` + +GetArrayStringExtensionNullable returns the ArrayStringExtensionNullable field if non-nil, zero value otherwise. + +### GetArrayStringExtensionNullableOk + +`func (o *DefaultValue) GetArrayStringExtensionNullableOk() (*[]string, bool)` + +GetArrayStringExtensionNullableOk returns a tuple with the ArrayStringExtensionNullable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArrayStringExtensionNullable + +`func (o *DefaultValue) SetArrayStringExtensionNullable(v []string)` + +SetArrayStringExtensionNullable sets ArrayStringExtensionNullable field to given value. + +### HasArrayStringExtensionNullable + +`func (o *DefaultValue) HasArrayStringExtensionNullable() bool` + +HasArrayStringExtensionNullable returns a boolean if a field has been set. + +### SetArrayStringExtensionNullableNil + +`func (o *DefaultValue) SetArrayStringExtensionNullableNil(b bool)` + + SetArrayStringExtensionNullableNil sets the value for ArrayStringExtensionNullable to be an explicit nil + +### UnsetArrayStringExtensionNullable +`func (o *DefaultValue) UnsetArrayStringExtensionNullable()` + +UnsetArrayStringExtensionNullable ensures that no value is present for ArrayStringExtensionNullable, not even an explicit nil +### GetStringNullable + +`func (o *DefaultValue) GetStringNullable() string` + +GetStringNullable returns the StringNullable field if non-nil, zero value otherwise. + +### GetStringNullableOk + +`func (o *DefaultValue) GetStringNullableOk() (*string, bool)` + +GetStringNullableOk returns a tuple with the StringNullable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStringNullable + +`func (o *DefaultValue) SetStringNullable(v string)` + +SetStringNullable sets StringNullable field to given value. + +### HasStringNullable + +`func (o *DefaultValue) HasStringNullable() bool` + +HasStringNullable returns a boolean if a field has been set. + +### SetStringNullableNil + +`func (o *DefaultValue) SetStringNullableNil(b bool)` + + SetStringNullableNil sets the value for StringNullable to be an explicit nil + +### UnsetStringNullable +`func (o *DefaultValue) UnsetStringNullable()` + +UnsetStringNullable ensures that no value is present for StringNullable, not even an explicit nil + +[[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/go/docs/FormAPI.md b/samples/client/echo_api/go/docs/FormAPI.md new file mode 100644 index 000000000000..7f3e725dc4a8 --- /dev/null +++ b/samples/client/echo_api/go/docs/FormAPI.md @@ -0,0 +1,156 @@ +# \FormAPI + +All URIs are relative to *http://localhost:3000* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**TestFormIntegerBooleanString**](FormAPI.md#TestFormIntegerBooleanString) | **Post** /form/integer/boolean/string | Test form parameter(s) +[**TestFormOneof**](FormAPI.md#TestFormOneof) | **Post** /form/oneof | Test form parameter(s) for oneOf schema + + + +## TestFormIntegerBooleanString + +> string TestFormIntegerBooleanString(ctx).IntegerForm(integerForm).BooleanForm(booleanForm).StringForm(stringForm).Execute() + +Test form parameter(s) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + integerForm := int32(56) // int32 | (optional) + booleanForm := true // bool | (optional) + stringForm := "stringForm_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FormAPI.TestFormIntegerBooleanString(context.Background()).IntegerForm(integerForm).BooleanForm(booleanForm).StringForm(stringForm).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FormAPI.TestFormIntegerBooleanString``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestFormIntegerBooleanString`: string + fmt.Fprintf(os.Stdout, "Response from `FormAPI.TestFormIntegerBooleanString`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestFormIntegerBooleanStringRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **integerForm** | **int32** | | + **booleanForm** | **bool** | | + **stringForm** | **string** | | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestFormOneof + +> string TestFormOneof(ctx).Form1(form1).Form2(form2).Form3(form3).Form4(form4).Id(id).Name(name).Execute() + +Test form parameter(s) for oneOf schema + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + form1 := "form1_example" // string | (optional) + form2 := int32(56) // int32 | (optional) + form3 := "form3_example" // string | (optional) + form4 := true // bool | (optional) + id := int64(789) // int64 | (optional) + name := "name_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FormAPI.TestFormOneof(context.Background()).Form1(form1).Form2(form2).Form3(form3).Form4(form4).Id(id).Name(name).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FormAPI.TestFormOneof``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestFormOneof`: string + fmt.Fprintf(os.Stdout, "Response from `FormAPI.TestFormOneof`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestFormOneofRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **form1** | **string** | | + **form2** | **int32** | | + **form3** | **string** | | + **form4** | **bool** | | + **id** | **int64** | | + **name** | **string** | | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/client/echo_api/go/docs/HeaderAPI.md b/samples/client/echo_api/go/docs/HeaderAPI.md new file mode 100644 index 000000000000..205c321b7dd5 --- /dev/null +++ b/samples/client/echo_api/go/docs/HeaderAPI.md @@ -0,0 +1,79 @@ +# \HeaderAPI + +All URIs are relative to *http://localhost:3000* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**TestHeaderIntegerBooleanString**](HeaderAPI.md#TestHeaderIntegerBooleanString) | **Get** /header/integer/boolean/string | Test header parameter(s) + + + +## TestHeaderIntegerBooleanString + +> string TestHeaderIntegerBooleanString(ctx).IntegerHeader(integerHeader).BooleanHeader(booleanHeader).StringHeader(stringHeader).Execute() + +Test header parameter(s) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + integerHeader := int32(56) // int32 | (optional) + booleanHeader := true // bool | (optional) + stringHeader := "stringHeader_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.HeaderAPI.TestHeaderIntegerBooleanString(context.Background()).IntegerHeader(integerHeader).BooleanHeader(booleanHeader).StringHeader(stringHeader).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `HeaderAPI.TestHeaderIntegerBooleanString``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestHeaderIntegerBooleanString`: string + fmt.Fprintf(os.Stdout, "Response from `HeaderAPI.TestHeaderIntegerBooleanString`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestHeaderIntegerBooleanStringRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **integerHeader** | **int32** | | + **booleanHeader** | **bool** | | + **stringHeader** | **string** | | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/client/echo_api/go/docs/NumberPropertiesOnly.md b/samples/client/echo_api/go/docs/NumberPropertiesOnly.md new file mode 100644 index 000000000000..0a37cc725c5e --- /dev/null +++ b/samples/client/echo_api/go/docs/NumberPropertiesOnly.md @@ -0,0 +1,108 @@ +# NumberPropertiesOnly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Number** | Pointer to **float32** | | [optional] +**Float** | Pointer to **float32** | | [optional] +**Double** | Pointer to **float64** | | [optional] + +## Methods + +### NewNumberPropertiesOnly + +`func NewNumberPropertiesOnly() *NumberPropertiesOnly` + +NewNumberPropertiesOnly instantiates a new NumberPropertiesOnly 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 + +### NewNumberPropertiesOnlyWithDefaults + +`func NewNumberPropertiesOnlyWithDefaults() *NumberPropertiesOnly` + +NewNumberPropertiesOnlyWithDefaults instantiates a new NumberPropertiesOnly 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 + +### GetNumber + +`func (o *NumberPropertiesOnly) GetNumber() float32` + +GetNumber returns the Number field if non-nil, zero value otherwise. + +### GetNumberOk + +`func (o *NumberPropertiesOnly) GetNumberOk() (*float32, bool)` + +GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNumber + +`func (o *NumberPropertiesOnly) SetNumber(v float32)` + +SetNumber sets Number field to given value. + +### HasNumber + +`func (o *NumberPropertiesOnly) HasNumber() bool` + +HasNumber returns a boolean if a field has been set. + +### GetFloat + +`func (o *NumberPropertiesOnly) GetFloat() float32` + +GetFloat returns the Float field if non-nil, zero value otherwise. + +### GetFloatOk + +`func (o *NumberPropertiesOnly) GetFloatOk() (*float32, bool)` + +GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFloat + +`func (o *NumberPropertiesOnly) SetFloat(v float32)` + +SetFloat sets Float field to given value. + +### HasFloat + +`func (o *NumberPropertiesOnly) HasFloat() bool` + +HasFloat returns a boolean if a field has been set. + +### GetDouble + +`func (o *NumberPropertiesOnly) GetDouble() float64` + +GetDouble returns the Double field if non-nil, zero value otherwise. + +### GetDoubleOk + +`func (o *NumberPropertiesOnly) GetDoubleOk() (*float64, bool)` + +GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDouble + +`func (o *NumberPropertiesOnly) SetDouble(v float64)` + +SetDouble sets Double field to given value. + +### HasDouble + +`func (o *NumberPropertiesOnly) HasDouble() bool` + +HasDouble 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/echo_api/go/docs/PathAPI.md b/samples/client/echo_api/go/docs/PathAPI.md new file mode 100644 index 000000000000..6145764412a5 --- /dev/null +++ b/samples/client/echo_api/go/docs/PathAPI.md @@ -0,0 +1,82 @@ +# \PathAPI + +All URIs are relative to *http://localhost:3000* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**TestsPathStringPathStringIntegerPathInteger**](PathAPI.md#TestsPathStringPathStringIntegerPathInteger) | **Get** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s) + + + +## TestsPathStringPathStringIntegerPathInteger + +> string TestsPathStringPathStringIntegerPathInteger(ctx, pathString, pathInteger).Execute() + +Test path parameter(s) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + pathString := "pathString_example" // string | + pathInteger := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PathAPI.TestsPathStringPathStringIntegerPathInteger(context.Background(), pathString, pathInteger).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PathAPI.TestsPathStringPathStringIntegerPathInteger``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestsPathStringPathStringIntegerPathInteger`: string + fmt.Fprintf(os.Stdout, "Response from `PathAPI.TestsPathStringPathStringIntegerPathInteger`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**pathString** | **string** | | +**pathInteger** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestsPathStringPathStringIntegerPathIntegerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/client/echo_api/go/docs/Pet.md b/samples/client/echo_api/go/docs/Pet.md new file mode 100644 index 000000000000..4887d2c69dde --- /dev/null +++ b/samples/client/echo_api/go/docs/Pet.md @@ -0,0 +1,176 @@ +# Pet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int64** | | [optional] +**Name** | **string** | | +**Category** | Pointer to [**Category**](Category.md) | | [optional] +**PhotoUrls** | **[]string** | | +**Tags** | Pointer to [**[]Tag**](Tag.md) | | [optional] +**Status** | Pointer to **string** | pet status in the store | [optional] + +## Methods + +### NewPet + +`func NewPet(name string, photoUrls []string, ) *Pet` + +NewPet instantiates a new Pet 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 + +### NewPetWithDefaults + +`func NewPetWithDefaults() *Pet` + +NewPetWithDefaults instantiates a new Pet 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 + +### GetId + +`func (o *Pet) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Pet) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Pet) SetId(v int64)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Pet) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *Pet) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Pet) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Pet) SetName(v string)` + +SetName sets Name field to given value. + + +### GetCategory + +`func (o *Pet) GetCategory() Category` + +GetCategory returns the Category field if non-nil, zero value otherwise. + +### GetCategoryOk + +`func (o *Pet) GetCategoryOk() (*Category, bool)` + +GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCategory + +`func (o *Pet) SetCategory(v Category)` + +SetCategory sets Category field to given value. + +### HasCategory + +`func (o *Pet) HasCategory() bool` + +HasCategory returns a boolean if a field has been set. + +### GetPhotoUrls + +`func (o *Pet) GetPhotoUrls() []string` + +GetPhotoUrls returns the PhotoUrls field if non-nil, zero value otherwise. + +### GetPhotoUrlsOk + +`func (o *Pet) GetPhotoUrlsOk() (*[]string, bool)` + +GetPhotoUrlsOk returns a tuple with the PhotoUrls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPhotoUrls + +`func (o *Pet) SetPhotoUrls(v []string)` + +SetPhotoUrls sets PhotoUrls field to given value. + + +### GetTags + +`func (o *Pet) GetTags() []Tag` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *Pet) GetTagsOk() (*[]Tag, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *Pet) SetTags(v []Tag)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *Pet) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetStatus + +`func (o *Pet) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Pet) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *Pet) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *Pet) HasStatus() bool` + +HasStatus 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/echo_api/go/docs/Query.md b/samples/client/echo_api/go/docs/Query.md new file mode 100644 index 000000000000..2216bdeabdae --- /dev/null +++ b/samples/client/echo_api/go/docs/Query.md @@ -0,0 +1,82 @@ +# Query + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int64** | Query | [optional] +**Outcomes** | Pointer to **[]string** | | [optional] [default to ["SUCCESS","FAILURE"]] + +## Methods + +### NewQuery + +`func NewQuery() *Query` + +NewQuery instantiates a new Query 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 + +### NewQueryWithDefaults + +`func NewQueryWithDefaults() *Query` + +NewQueryWithDefaults instantiates a new Query 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 + +### GetId + +`func (o *Query) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Query) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Query) SetId(v int64)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Query) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetOutcomes + +`func (o *Query) GetOutcomes() []string` + +GetOutcomes returns the Outcomes field if non-nil, zero value otherwise. + +### GetOutcomesOk + +`func (o *Query) GetOutcomesOk() (*[]string, bool)` + +GetOutcomesOk returns a tuple with the Outcomes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOutcomes + +`func (o *Query) SetOutcomes(v []string)` + +SetOutcomes sets Outcomes field to given value. + +### HasOutcomes + +`func (o *Query) HasOutcomes() bool` + +HasOutcomes 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/echo_api/go/docs/QueryAPI.md b/samples/client/echo_api/go/docs/QueryAPI.md new file mode 100644 index 000000000000..e18b937d8bbe --- /dev/null +++ b/samples/client/echo_api/go/docs/QueryAPI.md @@ -0,0 +1,553 @@ +# \QueryAPI + +All URIs are relative to *http://localhost:3000* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**TestEnumRefString**](QueryAPI.md#TestEnumRefString) | **Get** /query/enum_ref_string | Test query parameter(s) +[**TestQueryDatetimeDateString**](QueryAPI.md#TestQueryDatetimeDateString) | **Get** /query/datetime/date/string | Test query parameter(s) +[**TestQueryIntegerBooleanString**](QueryAPI.md#TestQueryIntegerBooleanString) | **Get** /query/integer/boolean/string | Test query parameter(s) +[**TestQueryStyleDeepObjectExplodeTrueObject**](QueryAPI.md#TestQueryStyleDeepObjectExplodeTrueObject) | **Get** /query/style_deepObject/explode_true/object | Test query parameter(s) +[**TestQueryStyleDeepObjectExplodeTrueObjectAllOf**](QueryAPI.md#TestQueryStyleDeepObjectExplodeTrueObjectAllOf) | **Get** /query/style_deepObject/explode_true/object/allOf | Test query parameter(s) +[**TestQueryStyleFormExplodeTrueArrayString**](QueryAPI.md#TestQueryStyleFormExplodeTrueArrayString) | **Get** /query/style_form/explode_true/array_string | Test query parameter(s) +[**TestQueryStyleFormExplodeTrueObject**](QueryAPI.md#TestQueryStyleFormExplodeTrueObject) | **Get** /query/style_form/explode_true/object | Test query parameter(s) +[**TestQueryStyleFormExplodeTrueObjectAllOf**](QueryAPI.md#TestQueryStyleFormExplodeTrueObjectAllOf) | **Get** /query/style_form/explode_true/object/allOf | Test query parameter(s) + + + +## TestEnumRefString + +> string TestEnumRefString(ctx).EnumRefStringQuery(enumRefStringQuery).Execute() + +Test query parameter(s) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + enumRefStringQuery := openapiclient.StringEnumRef("success") // StringEnumRef | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.QueryAPI.TestEnumRefString(context.Background()).EnumRefStringQuery(enumRefStringQuery).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QueryAPI.TestEnumRefString``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestEnumRefString`: string + fmt.Fprintf(os.Stdout, "Response from `QueryAPI.TestEnumRefString`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestEnumRefStringRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumRefStringQuery** | [**StringEnumRef**](StringEnumRef.md) | | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestQueryDatetimeDateString + +> string TestQueryDatetimeDateString(ctx).DatetimeQuery(datetimeQuery).DateQuery(dateQuery).StringQuery(stringQuery).Execute() + +Test query parameter(s) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + datetimeQuery := time.Now() // time.Time | (optional) + dateQuery := time.Now() // string | (optional) + stringQuery := "stringQuery_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.QueryAPI.TestQueryDatetimeDateString(context.Background()).DatetimeQuery(datetimeQuery).DateQuery(dateQuery).StringQuery(stringQuery).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QueryAPI.TestQueryDatetimeDateString``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestQueryDatetimeDateString`: string + fmt.Fprintf(os.Stdout, "Response from `QueryAPI.TestQueryDatetimeDateString`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestQueryDatetimeDateStringRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **datetimeQuery** | **time.Time** | | + **dateQuery** | **string** | | + **stringQuery** | **string** | | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestQueryIntegerBooleanString + +> string TestQueryIntegerBooleanString(ctx).IntegerQuery(integerQuery).BooleanQuery(booleanQuery).StringQuery(stringQuery).Execute() + +Test query parameter(s) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + integerQuery := int32(56) // int32 | (optional) + booleanQuery := true // bool | (optional) + stringQuery := "stringQuery_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.QueryAPI.TestQueryIntegerBooleanString(context.Background()).IntegerQuery(integerQuery).BooleanQuery(booleanQuery).StringQuery(stringQuery).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QueryAPI.TestQueryIntegerBooleanString``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestQueryIntegerBooleanString`: string + fmt.Fprintf(os.Stdout, "Response from `QueryAPI.TestQueryIntegerBooleanString`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestQueryIntegerBooleanStringRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **integerQuery** | **int32** | | + **booleanQuery** | **bool** | | + **stringQuery** | **string** | | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestQueryStyleDeepObjectExplodeTrueObject + +> string TestQueryStyleDeepObjectExplodeTrueObject(ctx).QueryObject(queryObject).Execute() + +Test query parameter(s) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + queryObject := *openapiclient.NewPet("doggie", []string{"PhotoUrls_example"}) // Pet | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.QueryAPI.TestQueryStyleDeepObjectExplodeTrueObject(context.Background()).QueryObject(queryObject).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QueryAPI.TestQueryStyleDeepObjectExplodeTrueObject``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestQueryStyleDeepObjectExplodeTrueObject`: string + fmt.Fprintf(os.Stdout, "Response from `QueryAPI.TestQueryStyleDeepObjectExplodeTrueObject`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestQueryStyleDeepObjectExplodeTrueObjectRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **queryObject** | [**Pet**](Pet.md) | | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestQueryStyleDeepObjectExplodeTrueObjectAllOf + +> string TestQueryStyleDeepObjectExplodeTrueObjectAllOf(ctx).QueryObject(queryObject).Execute() + +Test query parameter(s) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + queryObject := *openapiclient.NewTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() // TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.QueryAPI.TestQueryStyleDeepObjectExplodeTrueObjectAllOf(context.Background()).QueryObject(queryObject).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QueryAPI.TestQueryStyleDeepObjectExplodeTrueObjectAllOf``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestQueryStyleDeepObjectExplodeTrueObjectAllOf`: string + fmt.Fprintf(os.Stdout, "Response from `QueryAPI.TestQueryStyleDeepObjectExplodeTrueObjectAllOf`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestQueryStyleDeepObjectExplodeTrueObjectAllOfRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **queryObject** | [**TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter**](TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md) | | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestQueryStyleFormExplodeTrueArrayString + +> string TestQueryStyleFormExplodeTrueArrayString(ctx).QueryObject(queryObject).Execute() + +Test query parameter(s) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + queryObject := *openapiclient.NewTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() // TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.QueryAPI.TestQueryStyleFormExplodeTrueArrayString(context.Background()).QueryObject(queryObject).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QueryAPI.TestQueryStyleFormExplodeTrueArrayString``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestQueryStyleFormExplodeTrueArrayString`: string + fmt.Fprintf(os.Stdout, "Response from `QueryAPI.TestQueryStyleFormExplodeTrueArrayString`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestQueryStyleFormExplodeTrueArrayStringRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **queryObject** | [**TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter**](TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md) | | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestQueryStyleFormExplodeTrueObject + +> string TestQueryStyleFormExplodeTrueObject(ctx).QueryObject(queryObject).Execute() + +Test query parameter(s) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + queryObject := *openapiclient.NewPet("doggie", []string{"PhotoUrls_example"}) // Pet | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.QueryAPI.TestQueryStyleFormExplodeTrueObject(context.Background()).QueryObject(queryObject).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QueryAPI.TestQueryStyleFormExplodeTrueObject``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestQueryStyleFormExplodeTrueObject`: string + fmt.Fprintf(os.Stdout, "Response from `QueryAPI.TestQueryStyleFormExplodeTrueObject`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestQueryStyleFormExplodeTrueObjectRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **queryObject** | [**Pet**](Pet.md) | | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TestQueryStyleFormExplodeTrueObjectAllOf + +> string TestQueryStyleFormExplodeTrueObjectAllOf(ctx).QueryObject(queryObject).Execute() + +Test query parameter(s) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + queryObject := *openapiclient.NewDataQuery() // DataQuery | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.QueryAPI.TestQueryStyleFormExplodeTrueObjectAllOf(context.Background()).QueryObject(queryObject).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `QueryAPI.TestQueryStyleFormExplodeTrueObjectAllOf``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestQueryStyleFormExplodeTrueObjectAllOf`: string + fmt.Fprintf(os.Stdout, "Response from `QueryAPI.TestQueryStyleFormExplodeTrueObjectAllOf`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestQueryStyleFormExplodeTrueObjectAllOfRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **queryObject** | [**DataQuery**](DataQuery.md) | | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/samples/client/echo_api/go/docs/StringEnumRef.md b/samples/client/echo_api/go/docs/StringEnumRef.md new file mode 100644 index 000000000000..e4636302a7f7 --- /dev/null +++ b/samples/client/echo_api/go/docs/StringEnumRef.md @@ -0,0 +1,15 @@ +# StringEnumRef + +## Enum + + +* `SUCCESS` (value: `"success"`) + +* `FAILURE` (value: `"failure"`) + +* `UNCLASSIFIED` (value: `"unclassified"`) + + +[[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/go/docs/Tag.md b/samples/client/echo_api/go/docs/Tag.md new file mode 100644 index 000000000000..391be6b49009 --- /dev/null +++ b/samples/client/echo_api/go/docs/Tag.md @@ -0,0 +1,82 @@ +# Tag + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int64** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewTag + +`func NewTag() *Tag` + +NewTag instantiates a new Tag 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 + +### NewTagWithDefaults + +`func NewTagWithDefaults() *Tag` + +NewTagWithDefaults instantiates a new Tag 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 + +### GetId + +`func (o *Tag) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Tag) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Tag) SetId(v int64)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Tag) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *Tag) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Tag) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Tag) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Tag) HasName() bool` + +HasName 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/echo_api/go/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md b/samples/client/echo_api/go/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md new file mode 100644 index 000000000000..8efa3db73b98 --- /dev/null +++ b/samples/client/echo_api/go/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md @@ -0,0 +1,134 @@ +# TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Size** | Pointer to **string** | | [optional] +**Color** | Pointer to **string** | | [optional] +**Id** | Pointer to **int64** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter + +`func NewTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter` + +NewTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter instantiates a new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter 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 + +### NewTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterWithDefaults + +`func NewTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterWithDefaults() *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter` + +NewTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterWithDefaults instantiates a new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter 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 + +### GetSize + +`func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) GetSize() string` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) GetSizeOk() (*string, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) SetSize(v string)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) HasSize() bool` + +HasSize returns a boolean if a field has been set. + +### GetColor + +`func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) GetColor() string` + +GetColor returns the Color field if non-nil, zero value otherwise. + +### GetColorOk + +`func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) GetColorOk() (*string, bool)` + +GetColorOk returns a tuple with the Color field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetColor + +`func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) SetColor(v string)` + +SetColor sets Color field to given value. + +### HasColor + +`func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) HasColor() bool` + +HasColor returns a boolean if a field has been set. + +### GetId + +`func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) SetId(v int64)` + +SetId sets Id field to given value. + +### HasId + +`func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) HasName() bool` + +HasName 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/echo_api/go/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md b/samples/client/echo_api/go/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md new file mode 100644 index 000000000000..8de9ec2b2e81 --- /dev/null +++ b/samples/client/echo_api/go/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md @@ -0,0 +1,56 @@ +# TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Values** | Pointer to **[]string** | | [optional] + +## Methods + +### NewTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + +`func NewTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() *TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter` + +NewTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter instantiates a new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter 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 + +### NewTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterWithDefaults + +`func NewTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterWithDefaults() *TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter` + +NewTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterWithDefaults instantiates a new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter 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 + +### GetValues + +`func (o *TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) GetValues() []string` + +GetValues returns the Values field if non-nil, zero value otherwise. + +### GetValuesOk + +`func (o *TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) GetValuesOk() (*[]string, bool)` + +GetValuesOk returns a tuple with the Values field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValues + +`func (o *TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) SetValues(v []string)` + +SetValues sets Values field to given value. + +### HasValues + +`func (o *TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) HasValues() bool` + +HasValues 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/echo_api/go/git_push.sh b/samples/client/echo_api/go/git_push.sh new file mode 100644 index 000000000000..f53a75d4fabe --- /dev/null +++ b/samples/client/echo_api/go/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/echo_api/go/go.mod b/samples/client/echo_api/go/go.mod new file mode 100644 index 000000000000..7fca7eee925b --- /dev/null +++ b/samples/client/echo_api/go/go.mod @@ -0,0 +1,6 @@ +module github.com/GIT_USER_ID/GIT_REPO_ID + +go 1.18 + +require ( +) diff --git a/samples/client/echo_api/go/go.sum b/samples/client/echo_api/go/go.sum new file mode 100644 index 000000000000..c966c8ddfd0d --- /dev/null +++ b/samples/client/echo_api/go/go.sum @@ -0,0 +1,11 @@ +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/samples/client/echo_api/go/model_bird.go b/samples/client/echo_api/go/model_bird.go new file mode 100644 index 000000000000..5b15b73862eb --- /dev/null +++ b/samples/client/echo_api/go/model_bird.go @@ -0,0 +1,163 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the Bird type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Bird{} + +// Bird struct for Bird +type Bird struct { + Size *string `json:"size,omitempty"` + Color *string `json:"color,omitempty"` +} + +// NewBird instantiates a new Bird 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 NewBird() *Bird { + this := Bird{} + return &this +} + +// NewBirdWithDefaults instantiates a new Bird 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 NewBirdWithDefaults() *Bird { + this := Bird{} + return &this +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *Bird) GetSize() string { + if o == nil || IsNil(o.Size) { + var ret string + return ret + } + return *o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Bird) GetSizeOk() (*string, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *Bird) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given string and assigns it to the Size field. +func (o *Bird) SetSize(v string) { + o.Size = &v +} + +// GetColor returns the Color field value if set, zero value otherwise. +func (o *Bird) GetColor() string { + if o == nil || IsNil(o.Color) { + var ret string + return ret + } + return *o.Color +} + +// GetColorOk returns a tuple with the Color field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Bird) GetColorOk() (*string, bool) { + if o == nil || IsNil(o.Color) { + return nil, false + } + return o.Color, true +} + +// HasColor returns a boolean if a field has been set. +func (o *Bird) HasColor() bool { + if o != nil && !IsNil(o.Color) { + return true + } + + return false +} + +// SetColor gets a reference to the given string and assigns it to the Color field. +func (o *Bird) SetColor(v string) { + o.Color = &v +} + +func (o Bird) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Bird) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + if !IsNil(o.Color) { + toSerialize["color"] = o.Color + } + return toSerialize, nil +} + +type NullableBird struct { + value *Bird + isSet bool +} + +func (v NullableBird) Get() *Bird { + return v.value +} + +func (v *NullableBird) Set(val *Bird) { + v.value = val + v.isSet = true +} + +func (v NullableBird) IsSet() bool { + return v.isSet +} + +func (v *NullableBird) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBird(val *Bird) *NullableBird { + return &NullableBird{value: val, isSet: true} +} + +func (v NullableBird) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBird) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/samples/client/echo_api/go/model_category.go b/samples/client/echo_api/go/model_category.go new file mode 100644 index 000000000000..20937702195d --- /dev/null +++ b/samples/client/echo_api/go/model_category.go @@ -0,0 +1,163 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the Category type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Category{} + +// Category struct for Category +type Category struct { + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// NewCategory instantiates a new Category 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 NewCategory() *Category { + this := Category{} + return &this +} + +// NewCategoryWithDefaults instantiates a new Category 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 NewCategoryWithDefaults() *Category { + this := Category{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Category) GetId() int64 { + if o == nil || IsNil(o.Id) { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Category) GetIdOk() (*int64, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Category) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Category) SetId(v int64) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Category) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Category) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Category) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Category) SetName(v string) { + o.Name = &v +} + +func (o Category) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Category) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableCategory struct { + value *Category + isSet bool +} + +func (v NullableCategory) Get() *Category { + return v.value +} + +func (v *NullableCategory) Set(val *Category) { + v.value = val + v.isSet = true +} + +func (v NullableCategory) IsSet() bool { + return v.isSet +} + +func (v *NullableCategory) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCategory(val *Category) *NullableCategory { + return &NullableCategory{value: val, isSet: true} +} + +func (v NullableCategory) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCategory) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/samples/client/echo_api/go/model_data_query.go b/samples/client/echo_api/go/model_data_query.go new file mode 100644 index 000000000000..9a5fe8ce9068 --- /dev/null +++ b/samples/client/echo_api/go/model_data_query.go @@ -0,0 +1,212 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "time" +) + +// checks if the DataQuery type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DataQuery{} + +// DataQuery struct for DataQuery +type DataQuery struct { + Query + // test suffix + Suffix *string `json:"suffix,omitempty"` + // Some text containing white spaces + Text *string `json:"text,omitempty"` + // A date + Date *time.Time `json:"date,omitempty"` +} + +// NewDataQuery instantiates a new DataQuery 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 NewDataQuery() *DataQuery { + this := DataQuery{} + return &this +} + +// NewDataQueryWithDefaults instantiates a new DataQuery 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 NewDataQueryWithDefaults() *DataQuery { + this := DataQuery{} + return &this +} + +// GetSuffix returns the Suffix field value if set, zero value otherwise. +func (o *DataQuery) GetSuffix() string { + if o == nil || IsNil(o.Suffix) { + var ret string + return ret + } + return *o.Suffix +} + +// GetSuffixOk returns a tuple with the Suffix field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataQuery) GetSuffixOk() (*string, bool) { + if o == nil || IsNil(o.Suffix) { + return nil, false + } + return o.Suffix, true +} + +// HasSuffix returns a boolean if a field has been set. +func (o *DataQuery) HasSuffix() bool { + if o != nil && !IsNil(o.Suffix) { + return true + } + + return false +} + +// SetSuffix gets a reference to the given string and assigns it to the Suffix field. +func (o *DataQuery) SetSuffix(v string) { + o.Suffix = &v +} + +// GetText returns the Text field value if set, zero value otherwise. +func (o *DataQuery) GetText() string { + if o == nil || IsNil(o.Text) { + var ret string + return ret + } + return *o.Text +} + +// GetTextOk returns a tuple with the Text field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataQuery) GetTextOk() (*string, bool) { + if o == nil || IsNil(o.Text) { + return nil, false + } + return o.Text, true +} + +// HasText returns a boolean if a field has been set. +func (o *DataQuery) HasText() bool { + if o != nil && !IsNil(o.Text) { + return true + } + + return false +} + +// SetText gets a reference to the given string and assigns it to the Text field. +func (o *DataQuery) SetText(v string) { + o.Text = &v +} + +// GetDate returns the Date field value if set, zero value otherwise. +func (o *DataQuery) GetDate() time.Time { + if o == nil || IsNil(o.Date) { + var ret time.Time + return ret + } + return *o.Date +} + +// GetDateOk returns a tuple with the Date field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataQuery) GetDateOk() (*time.Time, bool) { + if o == nil || IsNil(o.Date) { + return nil, false + } + return o.Date, true +} + +// HasDate returns a boolean if a field has been set. +func (o *DataQuery) HasDate() bool { + if o != nil && !IsNil(o.Date) { + return true + } + + return false +} + +// SetDate gets a reference to the given time.Time and assigns it to the Date field. +func (o *DataQuery) SetDate(v time.Time) { + o.Date = &v +} + +func (o DataQuery) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DataQuery) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + serializedQuery, errQuery := json.Marshal(o.Query) + if errQuery != nil { + return map[string]interface{}{}, errQuery + } + errQuery = json.Unmarshal([]byte(serializedQuery), &toSerialize) + if errQuery != nil { + return map[string]interface{}{}, errQuery + } + if !IsNil(o.Suffix) { + toSerialize["suffix"] = o.Suffix + } + if !IsNil(o.Text) { + toSerialize["text"] = o.Text + } + if !IsNil(o.Date) { + toSerialize["date"] = o.Date + } + return toSerialize, nil +} + +type NullableDataQuery struct { + value *DataQuery + isSet bool +} + +func (v NullableDataQuery) Get() *DataQuery { + return v.value +} + +func (v *NullableDataQuery) Set(val *DataQuery) { + v.value = val + v.isSet = true +} + +func (v NullableDataQuery) IsSet() bool { + return v.isSet +} + +func (v *NullableDataQuery) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDataQuery(val *DataQuery) *NullableDataQuery { + return &NullableDataQuery{value: val, isSet: true} +} + +func (v NullableDataQuery) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDataQuery) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/samples/client/echo_api/go/model_default_value.go b/samples/client/echo_api/go/model_default_value.go new file mode 100644 index 000000000000..e40a4e5a1420 --- /dev/null +++ b/samples/client/echo_api/go/model_default_value.go @@ -0,0 +1,391 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the DefaultValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DefaultValue{} + +// DefaultValue to test the default value of properties +type DefaultValue struct { + ArrayStringEnumRefDefault []StringEnumRef `json:"array_string_enum_ref_default,omitempty"` + ArrayStringEnumDefault []string `json:"array_string_enum_default,omitempty"` + ArrayStringDefault []string `json:"array_string_default,omitempty"` + ArrayIntegerDefault []int32 `json:"array_integer_default,omitempty"` + ArrayString []string `json:"array_string,omitempty"` + ArrayStringNullable []string `json:"array_string_nullable,omitempty"` + ArrayStringExtensionNullable []string `json:"array_string_extension_nullable,omitempty"` + StringNullable NullableString `json:"string_nullable,omitempty"` +} + +// NewDefaultValue instantiates a new DefaultValue 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 NewDefaultValue() *DefaultValue { + this := DefaultValue{} + return &this +} + +// NewDefaultValueWithDefaults instantiates a new DefaultValue 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 NewDefaultValueWithDefaults() *DefaultValue { + this := DefaultValue{} + return &this +} + +// GetArrayStringEnumRefDefault returns the ArrayStringEnumRefDefault field value if set, zero value otherwise. +func (o *DefaultValue) GetArrayStringEnumRefDefault() []StringEnumRef { + if o == nil || IsNil(o.ArrayStringEnumRefDefault) { + var ret []StringEnumRef + return ret + } + return o.ArrayStringEnumRefDefault +} + +// GetArrayStringEnumRefDefaultOk returns a tuple with the ArrayStringEnumRefDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultValue) GetArrayStringEnumRefDefaultOk() ([]StringEnumRef, bool) { + if o == nil || IsNil(o.ArrayStringEnumRefDefault) { + return nil, false + } + return o.ArrayStringEnumRefDefault, true +} + +// HasArrayStringEnumRefDefault returns a boolean if a field has been set. +func (o *DefaultValue) HasArrayStringEnumRefDefault() bool { + if o != nil && !IsNil(o.ArrayStringEnumRefDefault) { + return true + } + + return false +} + +// SetArrayStringEnumRefDefault gets a reference to the given []StringEnumRef and assigns it to the ArrayStringEnumRefDefault field. +func (o *DefaultValue) SetArrayStringEnumRefDefault(v []StringEnumRef) { + o.ArrayStringEnumRefDefault = v +} + +// GetArrayStringEnumDefault returns the ArrayStringEnumDefault field value if set, zero value otherwise. +func (o *DefaultValue) GetArrayStringEnumDefault() []string { + if o == nil || IsNil(o.ArrayStringEnumDefault) { + var ret []string + return ret + } + return o.ArrayStringEnumDefault +} + +// GetArrayStringEnumDefaultOk returns a tuple with the ArrayStringEnumDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultValue) GetArrayStringEnumDefaultOk() ([]string, bool) { + if o == nil || IsNil(o.ArrayStringEnumDefault) { + return nil, false + } + return o.ArrayStringEnumDefault, true +} + +// HasArrayStringEnumDefault returns a boolean if a field has been set. +func (o *DefaultValue) HasArrayStringEnumDefault() bool { + if o != nil && !IsNil(o.ArrayStringEnumDefault) { + return true + } + + return false +} + +// SetArrayStringEnumDefault gets a reference to the given []string and assigns it to the ArrayStringEnumDefault field. +func (o *DefaultValue) SetArrayStringEnumDefault(v []string) { + o.ArrayStringEnumDefault = v +} + +// GetArrayStringDefault returns the ArrayStringDefault field value if set, zero value otherwise. +func (o *DefaultValue) GetArrayStringDefault() []string { + if o == nil || IsNil(o.ArrayStringDefault) { + var ret []string + return ret + } + return o.ArrayStringDefault +} + +// GetArrayStringDefaultOk returns a tuple with the ArrayStringDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultValue) GetArrayStringDefaultOk() ([]string, bool) { + if o == nil || IsNil(o.ArrayStringDefault) { + return nil, false + } + return o.ArrayStringDefault, true +} + +// HasArrayStringDefault returns a boolean if a field has been set. +func (o *DefaultValue) HasArrayStringDefault() bool { + if o != nil && !IsNil(o.ArrayStringDefault) { + return true + } + + return false +} + +// SetArrayStringDefault gets a reference to the given []string and assigns it to the ArrayStringDefault field. +func (o *DefaultValue) SetArrayStringDefault(v []string) { + o.ArrayStringDefault = v +} + +// GetArrayIntegerDefault returns the ArrayIntegerDefault field value if set, zero value otherwise. +func (o *DefaultValue) GetArrayIntegerDefault() []int32 { + if o == nil || IsNil(o.ArrayIntegerDefault) { + var ret []int32 + return ret + } + return o.ArrayIntegerDefault +} + +// GetArrayIntegerDefaultOk returns a tuple with the ArrayIntegerDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultValue) GetArrayIntegerDefaultOk() ([]int32, bool) { + if o == nil || IsNil(o.ArrayIntegerDefault) { + return nil, false + } + return o.ArrayIntegerDefault, true +} + +// HasArrayIntegerDefault returns a boolean if a field has been set. +func (o *DefaultValue) HasArrayIntegerDefault() bool { + if o != nil && !IsNil(o.ArrayIntegerDefault) { + return true + } + + return false +} + +// SetArrayIntegerDefault gets a reference to the given []int32 and assigns it to the ArrayIntegerDefault field. +func (o *DefaultValue) SetArrayIntegerDefault(v []int32) { + o.ArrayIntegerDefault = v +} + +// GetArrayString returns the ArrayString field value if set, zero value otherwise. +func (o *DefaultValue) GetArrayString() []string { + if o == nil || IsNil(o.ArrayString) { + var ret []string + return ret + } + return o.ArrayString +} + +// GetArrayStringOk returns a tuple with the ArrayString field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultValue) GetArrayStringOk() ([]string, bool) { + if o == nil || IsNil(o.ArrayString) { + return nil, false + } + return o.ArrayString, true +} + +// HasArrayString returns a boolean if a field has been set. +func (o *DefaultValue) HasArrayString() bool { + if o != nil && !IsNil(o.ArrayString) { + return true + } + + return false +} + +// SetArrayString gets a reference to the given []string and assigns it to the ArrayString field. +func (o *DefaultValue) SetArrayString(v []string) { + o.ArrayString = v +} + +// GetArrayStringNullable returns the ArrayStringNullable field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DefaultValue) GetArrayStringNullable() []string { + if o == nil { + var ret []string + return ret + } + return o.ArrayStringNullable +} + +// GetArrayStringNullableOk returns a tuple with the ArrayStringNullable field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DefaultValue) GetArrayStringNullableOk() ([]string, bool) { + if o == nil || IsNil(o.ArrayStringNullable) { + return nil, false + } + return o.ArrayStringNullable, true +} + +// HasArrayStringNullable returns a boolean if a field has been set. +func (o *DefaultValue) HasArrayStringNullable() bool { + if o != nil && IsNil(o.ArrayStringNullable) { + return true + } + + return false +} + +// SetArrayStringNullable gets a reference to the given []string and assigns it to the ArrayStringNullable field. +func (o *DefaultValue) SetArrayStringNullable(v []string) { + o.ArrayStringNullable = v +} + +// GetArrayStringExtensionNullable returns the ArrayStringExtensionNullable field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DefaultValue) GetArrayStringExtensionNullable() []string { + if o == nil { + var ret []string + return ret + } + return o.ArrayStringExtensionNullable +} + +// GetArrayStringExtensionNullableOk returns a tuple with the ArrayStringExtensionNullable field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DefaultValue) GetArrayStringExtensionNullableOk() ([]string, bool) { + if o == nil || IsNil(o.ArrayStringExtensionNullable) { + return nil, false + } + return o.ArrayStringExtensionNullable, true +} + +// HasArrayStringExtensionNullable returns a boolean if a field has been set. +func (o *DefaultValue) HasArrayStringExtensionNullable() bool { + if o != nil && IsNil(o.ArrayStringExtensionNullable) { + return true + } + + return false +} + +// SetArrayStringExtensionNullable gets a reference to the given []string and assigns it to the ArrayStringExtensionNullable field. +func (o *DefaultValue) SetArrayStringExtensionNullable(v []string) { + o.ArrayStringExtensionNullable = v +} + +// GetStringNullable returns the StringNullable field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DefaultValue) GetStringNullable() string { + if o == nil || IsNil(o.StringNullable.Get()) { + var ret string + return ret + } + return *o.StringNullable.Get() +} + +// GetStringNullableOk returns a tuple with the StringNullable field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DefaultValue) GetStringNullableOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.StringNullable.Get(), o.StringNullable.IsSet() +} + +// HasStringNullable returns a boolean if a field has been set. +func (o *DefaultValue) HasStringNullable() bool { + if o != nil && o.StringNullable.IsSet() { + return true + } + + return false +} + +// SetStringNullable gets a reference to the given NullableString and assigns it to the StringNullable field. +func (o *DefaultValue) SetStringNullable(v string) { + o.StringNullable.Set(&v) +} +// SetStringNullableNil sets the value for StringNullable to be an explicit nil +func (o *DefaultValue) SetStringNullableNil() { + o.StringNullable.Set(nil) +} + +// UnsetStringNullable ensures that no value is present for StringNullable, not even an explicit nil +func (o *DefaultValue) UnsetStringNullable() { + o.StringNullable.Unset() +} + +func (o DefaultValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DefaultValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ArrayStringEnumRefDefault) { + toSerialize["array_string_enum_ref_default"] = o.ArrayStringEnumRefDefault + } + if !IsNil(o.ArrayStringEnumDefault) { + toSerialize["array_string_enum_default"] = o.ArrayStringEnumDefault + } + if !IsNil(o.ArrayStringDefault) { + toSerialize["array_string_default"] = o.ArrayStringDefault + } + if !IsNil(o.ArrayIntegerDefault) { + toSerialize["array_integer_default"] = o.ArrayIntegerDefault + } + if !IsNil(o.ArrayString) { + toSerialize["array_string"] = o.ArrayString + } + if o.ArrayStringNullable != nil { + toSerialize["array_string_nullable"] = o.ArrayStringNullable + } + if o.ArrayStringExtensionNullable != nil { + toSerialize["array_string_extension_nullable"] = o.ArrayStringExtensionNullable + } + if o.StringNullable.IsSet() { + toSerialize["string_nullable"] = o.StringNullable.Get() + } + return toSerialize, nil +} + +type NullableDefaultValue struct { + value *DefaultValue + isSet bool +} + +func (v NullableDefaultValue) Get() *DefaultValue { + return v.value +} + +func (v *NullableDefaultValue) Set(val *DefaultValue) { + v.value = val + v.isSet = true +} + +func (v NullableDefaultValue) IsSet() bool { + return v.isSet +} + +func (v *NullableDefaultValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDefaultValue(val *DefaultValue) *NullableDefaultValue { + return &NullableDefaultValue{value: val, isSet: true} +} + +func (v NullableDefaultValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDefaultValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/samples/client/echo_api/go/model_number_properties_only.go b/samples/client/echo_api/go/model_number_properties_only.go new file mode 100644 index 000000000000..667c4aec6db3 --- /dev/null +++ b/samples/client/echo_api/go/model_number_properties_only.go @@ -0,0 +1,199 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the NumberPropertiesOnly type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NumberPropertiesOnly{} + +// NumberPropertiesOnly struct for NumberPropertiesOnly +type NumberPropertiesOnly struct { + Number *float32 `json:"number,omitempty"` + Float *float32 `json:"float,omitempty"` + Double *float64 `json:"double,omitempty"` +} + +// NewNumberPropertiesOnly instantiates a new NumberPropertiesOnly 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 NewNumberPropertiesOnly() *NumberPropertiesOnly { + this := NumberPropertiesOnly{} + return &this +} + +// NewNumberPropertiesOnlyWithDefaults instantiates a new NumberPropertiesOnly 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 NewNumberPropertiesOnlyWithDefaults() *NumberPropertiesOnly { + this := NumberPropertiesOnly{} + return &this +} + +// GetNumber returns the Number field value if set, zero value otherwise. +func (o *NumberPropertiesOnly) GetNumber() float32 { + if o == nil || IsNil(o.Number) { + var ret float32 + return ret + } + return *o.Number +} + +// GetNumberOk returns a tuple with the Number field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NumberPropertiesOnly) GetNumberOk() (*float32, bool) { + if o == nil || IsNil(o.Number) { + return nil, false + } + return o.Number, true +} + +// HasNumber returns a boolean if a field has been set. +func (o *NumberPropertiesOnly) HasNumber() bool { + if o != nil && !IsNil(o.Number) { + return true + } + + return false +} + +// SetNumber gets a reference to the given float32 and assigns it to the Number field. +func (o *NumberPropertiesOnly) SetNumber(v float32) { + o.Number = &v +} + +// GetFloat returns the Float field value if set, zero value otherwise. +func (o *NumberPropertiesOnly) GetFloat() float32 { + if o == nil || IsNil(o.Float) { + var ret float32 + return ret + } + return *o.Float +} + +// GetFloatOk returns a tuple with the Float field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NumberPropertiesOnly) GetFloatOk() (*float32, bool) { + if o == nil || IsNil(o.Float) { + return nil, false + } + return o.Float, true +} + +// HasFloat returns a boolean if a field has been set. +func (o *NumberPropertiesOnly) HasFloat() bool { + if o != nil && !IsNil(o.Float) { + return true + } + + return false +} + +// SetFloat gets a reference to the given float32 and assigns it to the Float field. +func (o *NumberPropertiesOnly) SetFloat(v float32) { + o.Float = &v +} + +// GetDouble returns the Double field value if set, zero value otherwise. +func (o *NumberPropertiesOnly) GetDouble() float64 { + if o == nil || IsNil(o.Double) { + var ret float64 + return ret + } + return *o.Double +} + +// GetDoubleOk returns a tuple with the Double field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NumberPropertiesOnly) GetDoubleOk() (*float64, bool) { + if o == nil || IsNil(o.Double) { + return nil, false + } + return o.Double, true +} + +// HasDouble returns a boolean if a field has been set. +func (o *NumberPropertiesOnly) HasDouble() bool { + if o != nil && !IsNil(o.Double) { + return true + } + + return false +} + +// SetDouble gets a reference to the given float64 and assigns it to the Double field. +func (o *NumberPropertiesOnly) SetDouble(v float64) { + o.Double = &v +} + +func (o NumberPropertiesOnly) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NumberPropertiesOnly) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Number) { + toSerialize["number"] = o.Number + } + if !IsNil(o.Float) { + toSerialize["float"] = o.Float + } + if !IsNil(o.Double) { + toSerialize["double"] = o.Double + } + return toSerialize, nil +} + +type NullableNumberPropertiesOnly struct { + value *NumberPropertiesOnly + isSet bool +} + +func (v NullableNumberPropertiesOnly) Get() *NumberPropertiesOnly { + return v.value +} + +func (v *NullableNumberPropertiesOnly) Set(val *NumberPropertiesOnly) { + v.value = val + v.isSet = true +} + +func (v NullableNumberPropertiesOnly) IsSet() bool { + return v.isSet +} + +func (v *NullableNumberPropertiesOnly) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNumberPropertiesOnly(val *NumberPropertiesOnly) *NullableNumberPropertiesOnly { + return &NullableNumberPropertiesOnly{value: val, isSet: true} +} + +func (v NullableNumberPropertiesOnly) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNumberPropertiesOnly) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/samples/client/echo_api/go/model_pet.go b/samples/client/echo_api/go/model_pet.go new file mode 100644 index 000000000000..62ed88418efe --- /dev/null +++ b/samples/client/echo_api/go/model_pet.go @@ -0,0 +1,290 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the Pet type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Pet{} + +// Pet struct for Pet +type Pet struct { + Id *int64 `json:"id,omitempty"` + Name string `json:"name"` + Category *Category `json:"category,omitempty"` + PhotoUrls []string `json:"photoUrls"` + Tags []Tag `json:"tags,omitempty"` + // pet status in the store + Status *string `json:"status,omitempty"` +} + +// NewPet instantiates a new Pet 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 NewPet(name string, photoUrls []string) *Pet { + this := Pet{} + this.Name = name + this.PhotoUrls = photoUrls + return &this +} + +// NewPetWithDefaults instantiates a new Pet 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 NewPetWithDefaults() *Pet { + this := Pet{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Pet) GetId() int64 { + if o == nil || IsNil(o.Id) { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetIdOk() (*int64, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Pet) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Pet) SetId(v int64) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *Pet) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Pet) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Pet) SetName(v string) { + o.Name = v +} + +// GetCategory returns the Category field value if set, zero value otherwise. +func (o *Pet) GetCategory() Category { + if o == nil || IsNil(o.Category) { + var ret Category + return ret + } + return *o.Category +} + +// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetCategoryOk() (*Category, bool) { + if o == nil || IsNil(o.Category) { + return nil, false + } + return o.Category, true +} + +// HasCategory returns a boolean if a field has been set. +func (o *Pet) HasCategory() bool { + if o != nil && !IsNil(o.Category) { + return true + } + + return false +} + +// SetCategory gets a reference to the given Category and assigns it to the Category field. +func (o *Pet) SetCategory(v Category) { + o.Category = &v +} + +// GetPhotoUrls returns the PhotoUrls field value +func (o *Pet) GetPhotoUrls() []string { + if o == nil { + var ret []string + return ret + } + + return o.PhotoUrls +} + +// GetPhotoUrlsOk returns a tuple with the PhotoUrls field value +// and a boolean to check if the value has been set. +func (o *Pet) GetPhotoUrlsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.PhotoUrls, true +} + +// SetPhotoUrls sets field value +func (o *Pet) SetPhotoUrls(v []string) { + o.PhotoUrls = v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *Pet) GetTags() []Tag { + if o == nil || IsNil(o.Tags) { + var ret []Tag + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetTagsOk() ([]Tag, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *Pet) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []Tag and assigns it to the Tags field. +func (o *Pet) SetTags(v []Tag) { + o.Tags = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Pet) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Pet) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Pet) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Pet) SetStatus(v string) { + o.Status = &v +} + +func (o Pet) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Pet) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["name"] = o.Name + if !IsNil(o.Category) { + toSerialize["category"] = o.Category + } + toSerialize["photoUrls"] = o.PhotoUrls + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullablePet struct { + value *Pet + isSet bool +} + +func (v NullablePet) Get() *Pet { + return v.value +} + +func (v *NullablePet) Set(val *Pet) { + v.value = val + v.isSet = true +} + +func (v NullablePet) IsSet() bool { + return v.isSet +} + +func (v *NullablePet) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePet(val *Pet) *NullablePet { + return &NullablePet{value: val, isSet: true} +} + +func (v NullablePet) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePet) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/samples/client/echo_api/go/model_query.go b/samples/client/echo_api/go/model_query.go new file mode 100644 index 000000000000..653e18c8300b --- /dev/null +++ b/samples/client/echo_api/go/model_query.go @@ -0,0 +1,164 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the Query type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Query{} + +// Query struct for Query +type Query struct { + // Query + Id *int64 `json:"id,omitempty"` + Outcomes []string `json:"outcomes,omitempty"` +} + +// NewQuery instantiates a new Query 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 NewQuery() *Query { + this := Query{} + return &this +} + +// NewQueryWithDefaults instantiates a new Query 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 NewQueryWithDefaults() *Query { + this := Query{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Query) GetId() int64 { + if o == nil || IsNil(o.Id) { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Query) GetIdOk() (*int64, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Query) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Query) SetId(v int64) { + o.Id = &v +} + +// GetOutcomes returns the Outcomes field value if set, zero value otherwise. +func (o *Query) GetOutcomes() []string { + if o == nil || IsNil(o.Outcomes) { + var ret []string + return ret + } + return o.Outcomes +} + +// GetOutcomesOk returns a tuple with the Outcomes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Query) GetOutcomesOk() ([]string, bool) { + if o == nil || IsNil(o.Outcomes) { + return nil, false + } + return o.Outcomes, true +} + +// HasOutcomes returns a boolean if a field has been set. +func (o *Query) HasOutcomes() bool { + if o != nil && !IsNil(o.Outcomes) { + return true + } + + return false +} + +// SetOutcomes gets a reference to the given []string and assigns it to the Outcomes field. +func (o *Query) SetOutcomes(v []string) { + o.Outcomes = v +} + +func (o Query) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Query) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Outcomes) { + toSerialize["outcomes"] = o.Outcomes + } + return toSerialize, nil +} + +type NullableQuery struct { + value *Query + isSet bool +} + +func (v NullableQuery) Get() *Query { + return v.value +} + +func (v *NullableQuery) Set(val *Query) { + v.value = val + v.isSet = true +} + +func (v NullableQuery) IsSet() bool { + return v.isSet +} + +func (v *NullableQuery) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQuery(val *Query) *NullableQuery { + return &NullableQuery{value: val, isSet: true} +} + +func (v NullableQuery) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQuery) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/samples/client/echo_api/go/model_string_enum_ref.go b/samples/client/echo_api/go/model_string_enum_ref.go new file mode 100644 index 000000000000..f1ae6625287e --- /dev/null +++ b/samples/client/echo_api/go/model_string_enum_ref.go @@ -0,0 +1,114 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// StringEnumRef the model 'StringEnumRef' +type StringEnumRef string + +// List of StringEnumRef +const ( + SUCCESS StringEnumRef = "success" + FAILURE StringEnumRef = "failure" + UNCLASSIFIED StringEnumRef = "unclassified" +) + +// All allowed values of StringEnumRef enum +var AllowedStringEnumRefEnumValues = []StringEnumRef{ + "success", + "failure", + "unclassified", +} + +func (v *StringEnumRef) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := StringEnumRef(value) + for _, existing := range AllowedStringEnumRefEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid StringEnumRef", value) +} + +// NewStringEnumRefFromValue returns a pointer to a valid StringEnumRef +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewStringEnumRefFromValue(v string) (*StringEnumRef, error) { + ev := StringEnumRef(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for StringEnumRef: valid values are %v", v, AllowedStringEnumRefEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v StringEnumRef) IsValid() bool { + for _, existing := range AllowedStringEnumRefEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to StringEnumRef value +func (v StringEnumRef) Ptr() *StringEnumRef { + return &v +} + +type NullableStringEnumRef struct { + value *StringEnumRef + isSet bool +} + +func (v NullableStringEnumRef) Get() *StringEnumRef { + return v.value +} + +func (v *NullableStringEnumRef) Set(val *StringEnumRef) { + v.value = val + v.isSet = true +} + +func (v NullableStringEnumRef) IsSet() bool { + return v.isSet +} + +func (v *NullableStringEnumRef) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStringEnumRef(val *StringEnumRef) *NullableStringEnumRef { + return &NullableStringEnumRef{value: val, isSet: true} +} + +func (v NullableStringEnumRef) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStringEnumRef) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/samples/client/echo_api/go/model_tag.go b/samples/client/echo_api/go/model_tag.go new file mode 100644 index 000000000000..0b69e30a761e --- /dev/null +++ b/samples/client/echo_api/go/model_tag.go @@ -0,0 +1,163 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the Tag type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Tag{} + +// Tag struct for Tag +type Tag struct { + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// NewTag instantiates a new Tag 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 NewTag() *Tag { + this := Tag{} + return &this +} + +// NewTagWithDefaults instantiates a new Tag 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 NewTagWithDefaults() *Tag { + this := Tag{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Tag) GetId() int64 { + if o == nil || IsNil(o.Id) { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Tag) GetIdOk() (*int64, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Tag) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Tag) SetId(v int64) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Tag) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Tag) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Tag) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Tag) SetName(v string) { + o.Name = &v +} + +func (o Tag) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Tag) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableTag struct { + value *Tag + isSet bool +} + +func (v NullableTag) Get() *Tag { + return v.value +} + +func (v *NullableTag) Set(val *Tag) { + v.value = val + v.isSet = true +} + +func (v NullableTag) IsSet() bool { + return v.isSet +} + +func (v *NullableTag) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTag(val *Tag) *NullableTag { + return &NullableTag{value: val, isSet: true} +} + +func (v NullableTag) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTag) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/samples/client/echo_api/go/model_test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.go b/samples/client/echo_api/go/model_test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.go new file mode 100644 index 000000000000..b270889eaec8 --- /dev/null +++ b/samples/client/echo_api/go/model_test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.go @@ -0,0 +1,235 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter{} + +// TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter struct for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter +type TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter struct { + Size *string `json:"size,omitempty"` + Color *string `json:"color,omitempty"` + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// NewTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter instantiates a new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter 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 NewTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter { + this := TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter{} + return &this +} + +// NewTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterWithDefaults instantiates a new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter 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 NewTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterWithDefaults() *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter { + this := TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter{} + return &this +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) GetSize() string { + if o == nil || IsNil(o.Size) { + var ret string + return ret + } + return *o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) GetSizeOk() (*string, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given string and assigns it to the Size field. +func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) SetSize(v string) { + o.Size = &v +} + +// GetColor returns the Color field value if set, zero value otherwise. +func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) GetColor() string { + if o == nil || IsNil(o.Color) { + var ret string + return ret + } + return *o.Color +} + +// GetColorOk returns a tuple with the Color field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) GetColorOk() (*string, bool) { + if o == nil || IsNil(o.Color) { + return nil, false + } + return o.Color, true +} + +// HasColor returns a boolean if a field has been set. +func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) HasColor() bool { + if o != nil && !IsNil(o.Color) { + return true + } + + return false +} + +// SetColor gets a reference to the given string and assigns it to the Color field. +func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) SetColor(v string) { + o.Color = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) GetId() int64 { + if o == nil || IsNil(o.Id) { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) GetIdOk() (*int64, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) SetId(v int64) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) SetName(v string) { + o.Name = &v +} + +func (o TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + if !IsNil(o.Color) { + toSerialize["color"] = o.Color + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter struct { + value *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter + isSet bool +} + +func (v NullableTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) Get() *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter { + return v.value +} + +func (v *NullableTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) Set(val *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) { + v.value = val + v.isSet = true +} + +func (v NullableTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) IsSet() bool { + return v.isSet +} + +func (v *NullableTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(val *TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) *NullableTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter { + return &NullableTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter{value: val, isSet: true} +} + +func (v NullableTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/samples/client/echo_api/go/model_test_query_style_form_explode_true_array_string_query_object_parameter.go b/samples/client/echo_api/go/model_test_query_style_form_explode_true_array_string_query_object_parameter.go new file mode 100644 index 000000000000..d2e8f8775297 --- /dev/null +++ b/samples/client/echo_api/go/model_test_query_style_form_explode_true_array_string_query_object_parameter.go @@ -0,0 +1,127 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter{} + +// TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter struct for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter +type TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter struct { + Values []string `json:"values,omitempty"` +} + +// NewTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter instantiates a new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter 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 NewTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() *TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter { + this := TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter{} + return &this +} + +// NewTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterWithDefaults instantiates a new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter 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 NewTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterWithDefaults() *TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter { + this := TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter{} + return &this +} + +// GetValues returns the Values field value if set, zero value otherwise. +func (o *TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) GetValues() []string { + if o == nil || IsNil(o.Values) { + var ret []string + return ret + } + return o.Values +} + +// GetValuesOk returns a tuple with the Values field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) GetValuesOk() ([]string, bool) { + if o == nil || IsNil(o.Values) { + return nil, false + } + return o.Values, true +} + +// HasValues returns a boolean if a field has been set. +func (o *TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) HasValues() bool { + if o != nil && !IsNil(o.Values) { + return true + } + + return false +} + +// SetValues gets a reference to the given []string and assigns it to the Values field. +func (o *TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) SetValues(v []string) { + o.Values = v +} + +func (o TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Values) { + toSerialize["values"] = o.Values + } + return toSerialize, nil +} + +type NullableTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter struct { + value *TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + isSet bool +} + +func (v NullableTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) Get() *TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter { + return v.value +} + +func (v *NullableTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) Set(val *TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) { + v.value = val + v.isSet = true +} + +func (v NullableTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) IsSet() bool { + return v.isSet +} + +func (v *NullableTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(val *TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) *NullableTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter { + return &NullableTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter{value: val, isSet: true} +} + +func (v NullableTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/samples/client/echo_api/go/response.go b/samples/client/echo_api/go/response.go new file mode 100644 index 000000000000..1d21f5323dda --- /dev/null +++ b/samples/client/echo_api/go/response.go @@ -0,0 +1,48 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/samples/client/echo_api/go/test/api_auth_test.go b/samples/client/echo_api/go/test/api_auth_test.go new file mode 100644 index 000000000000..7fa48739eb1f --- /dev/null +++ b/samples/client/echo_api/go/test/api_auth_test.go @@ -0,0 +1,37 @@ +/* +Echo Server API + +Testing AuthAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package openapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_openapi_AuthAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AuthAPIService TestAuthHttpBasic", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AuthAPI.TestAuthHttpBasic(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/samples/client/echo_api/go/test/api_body_test.go b/samples/client/echo_api/go/test/api_body_test.go new file mode 100644 index 000000000000..fe706be23816 --- /dev/null +++ b/samples/client/echo_api/go/test/api_body_test.go @@ -0,0 +1,109 @@ +/* +Echo Server API + +Testing BodyAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package openapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_openapi_BodyAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test BodyAPIService TestBinaryGif", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.BodyAPI.TestBinaryGif(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BodyAPIService TestBodyApplicationOctetstreamBinary", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.BodyAPI.TestBodyApplicationOctetstreamBinary(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BodyAPIService TestBodyMultipartFormdataArrayOfBinary", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.BodyAPI.TestBodyMultipartFormdataArrayOfBinary(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BodyAPIService TestEchoBodyFreeFormObjectResponseString", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.BodyAPI.TestEchoBodyFreeFormObjectResponseString(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BodyAPIService TestEchoBodyPet", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.BodyAPI.TestEchoBodyPet(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BodyAPIService TestEchoBodyPetResponseString", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.BodyAPI.TestEchoBodyPetResponseString(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BodyAPIService TestEchoBodyTagResponseString", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.BodyAPI.TestEchoBodyTagResponseString(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/samples/client/echo_api/go/test/api_form_test.go b/samples/client/echo_api/go/test/api_form_test.go new file mode 100644 index 000000000000..fbb3916d44dc --- /dev/null +++ b/samples/client/echo_api/go/test/api_form_test.go @@ -0,0 +1,49 @@ +/* +Echo Server API + +Testing FormAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package openapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_openapi_FormAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test FormAPIService TestFormIntegerBooleanString", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.FormAPI.TestFormIntegerBooleanString(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FormAPIService TestFormOneof", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.FormAPI.TestFormOneof(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/samples/client/echo_api/go/test/api_header_test.go b/samples/client/echo_api/go/test/api_header_test.go new file mode 100644 index 000000000000..7bf05f3fc01c --- /dev/null +++ b/samples/client/echo_api/go/test/api_header_test.go @@ -0,0 +1,37 @@ +/* +Echo Server API + +Testing HeaderAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package openapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_openapi_HeaderAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test HeaderAPIService TestHeaderIntegerBooleanString", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.HeaderAPI.TestHeaderIntegerBooleanString(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/samples/client/echo_api/go/test/api_path_test.go b/samples/client/echo_api/go/test/api_path_test.go new file mode 100644 index 000000000000..43d6681938fa --- /dev/null +++ b/samples/client/echo_api/go/test/api_path_test.go @@ -0,0 +1,40 @@ +/* +Echo Server API + +Testing PathAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package openapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_openapi_PathAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test PathAPIService TestsPathStringPathStringIntegerPathInteger", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var pathString string + var pathInteger int32 + + resp, httpRes, err := apiClient.PathAPI.TestsPathStringPathStringIntegerPathInteger(context.Background(), pathString, pathInteger).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/samples/client/echo_api/go/test/api_query_test.go b/samples/client/echo_api/go/test/api_query_test.go new file mode 100644 index 000000000000..b22f42057be9 --- /dev/null +++ b/samples/client/echo_api/go/test/api_query_test.go @@ -0,0 +1,121 @@ +/* +Echo Server API + +Testing QueryAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package openapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_openapi_QueryAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test QueryAPIService TestEnumRefString", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.QueryAPI.TestEnumRefString(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test QueryAPIService TestQueryDatetimeDateString", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.QueryAPI.TestQueryDatetimeDateString(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test QueryAPIService TestQueryIntegerBooleanString", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.QueryAPI.TestQueryIntegerBooleanString(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test QueryAPIService TestQueryStyleDeepObjectExplodeTrueObject", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.QueryAPI.TestQueryStyleDeepObjectExplodeTrueObject(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test QueryAPIService TestQueryStyleDeepObjectExplodeTrueObjectAllOf", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.QueryAPI.TestQueryStyleDeepObjectExplodeTrueObjectAllOf(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test QueryAPIService TestQueryStyleFormExplodeTrueArrayString", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.QueryAPI.TestQueryStyleFormExplodeTrueArrayString(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test QueryAPIService TestQueryStyleFormExplodeTrueObject", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.QueryAPI.TestQueryStyleFormExplodeTrueObject(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test QueryAPIService TestQueryStyleFormExplodeTrueObjectAllOf", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.QueryAPI.TestQueryStyleFormExplodeTrueObjectAllOf(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/samples/client/echo_api/go/utils.go b/samples/client/echo_api/go/utils.go new file mode 100644 index 000000000000..fc16b8e366c8 --- /dev/null +++ b/samples/client/echo_api/go/utils.go @@ -0,0 +1,348 @@ +/* +Echo Server API + +Echo Server API + +API version: 0.1.0 +Contact: team@openapitools.org +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return v.value.MarshalJSON() +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} From 4260c7aaf03fe45458f47fb1b1e699fddaeb73d6 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 13 Sep 2023 10:50:29 +0800 Subject: [PATCH 14/59] Better tests for php-nextgen (#16569) * better tests for php nextgen * add new files --- bin/configs/php-nextgen-echo-api.yaml | 6 + bin/configs/php-nextgen.yaml | 2 +- ...ith-fake-endpoints-models-for-testing.yaml | 1999 ++++++++++++++ .../client/echo_api/php-nextgen/.gitignore | 19 + .../php-nextgen/.openapi-generator-ignore | 23 + .../php-nextgen/.openapi-generator/FILES | 47 + .../php-nextgen/.openapi-generator/VERSION | 1 + .../php-nextgen/.php-cs-fixer.dist.php | 29 + .../client/echo_api/php-nextgen/.phplint.yml | 11 + .../client/echo_api/php-nextgen/.travis.yml | 12 + samples/client/echo_api/php-nextgen/README.md | 138 + .../client/echo_api/php-nextgen/composer.json | 45 + .../echo_api/php-nextgen/docs/Api/AuthApi.md | 67 + .../echo_api/php-nextgen/docs/Api/BodyApi.md | 403 +++ .../echo_api/php-nextgen/docs/Api/FormApi.md | 135 + .../php-nextgen/docs/Api/HeaderApi.md | 68 + .../echo_api/php-nextgen/docs/Api/PathApi.md | 66 + .../echo_api/php-nextgen/docs/Api/QueryApi.md | 471 ++++ .../echo_api/php-nextgen/docs/Model/Bird.md | 10 + .../php-nextgen/docs/Model/Category.md | 10 + .../php-nextgen/docs/Model/DataQuery.md | 11 + .../php-nextgen/docs/Model/DefaultValue.md | 16 + .../docs/Model/NumberPropertiesOnly.md | 11 + .../echo_api/php-nextgen/docs/Model/Pet.md | 14 + .../echo_api/php-nextgen/docs/Model/Query.md | 10 + .../php-nextgen/docs/Model/StringEnumRef.md | 8 + .../echo_api/php-nextgen/docs/Model/Tag.md | 10 + ...lodeTrueObjectAllOfQueryObjectParameter.md | 12 + ...lodeTrueArrayStringQueryObjectParameter.md | 9 + .../client/echo_api/php-nextgen/git_push.sh | 57 + .../echo_api/php-nextgen/phpunit.xml.dist | 18 + .../echo_api/php-nextgen/src/Api/AuthApi.php | 411 +++ .../echo_api/php-nextgen/src/Api/BodyApi.php | 2092 ++++++++++++++ .../echo_api/php-nextgen/src/Api/FormApi.php | 763 +++++ .../php-nextgen/src/Api/HeaderApi.php | 437 +++ .../echo_api/php-nextgen/src/Api/PathApi.php | 447 +++ .../echo_api/php-nextgen/src/Api/QueryApi.php | 2449 +++++++++++++++++ .../echo_api/php-nextgen/src/ApiException.php | 120 + .../php-nextgen/src/Configuration.php | 531 ++++ .../php-nextgen/src/HeaderSelector.php | 246 ++ .../echo_api/php-nextgen/src/Model/Bird.php | 444 +++ .../php-nextgen/src/Model/Category.php | 444 +++ .../php-nextgen/src/Model/DataQuery.php | 472 ++++ .../php-nextgen/src/Model/DefaultValue.php | 696 +++++ .../php-nextgen/src/Model/ModelInterface.php | 112 + .../src/Model/NumberPropertiesOnly.php | 494 ++++ .../echo_api/php-nextgen/src/Model/Pet.php | 622 +++++ .../echo_api/php-nextgen/src/Model/Query.php | 470 ++++ .../php-nextgen/src/Model/StringEnumRef.php | 51 + .../echo_api/php-nextgen/src/Model/Tag.php | 444 +++ ...odeTrueObjectAllOfQueryObjectParameter.php | 512 ++++ ...odeTrueArrayStringQueryObjectParameter.php | 410 +++ .../php-nextgen/src/ObjectSerializer.php | 567 ++++ .../php-nextgen/tests/Api/AuthApiTest.php | 86 + .../php-nextgen/tests/Api/BodyApiTest.php | 158 ++ .../php-nextgen/tests/Api/FormApiTest.php | 98 + .../php-nextgen/tests/Api/HeaderApiTest.php | 86 + .../php-nextgen/tests/Api/PathApiTest.php | 86 + .../php-nextgen/tests/Api/QueryApiTest.php | 170 ++ .../php-nextgen/tests/Model/BirdTest.php | 100 + .../php-nextgen/tests/Model/CategoryTest.php | 100 + .../php-nextgen/tests/Model/DataQueryTest.php | 109 + .../tests/Model/DefaultValueTest.php | 154 ++ .../tests/Model/NumberPropertiesOnlyTest.php | 109 + .../php-nextgen/tests/Model/PetTest.php | 136 + .../php-nextgen/tests/Model/QueryTest.php | 100 + .../tests/Model/StringEnumRefTest.php | 82 + .../php-nextgen/tests/Model/TagTest.php | 100 + ...rueObjectAllOfQueryObjectParameterTest.php | 118 + ...rueArrayStringQueryObjectParameterTest.php | 91 + 70 files changed, 18854 insertions(+), 1 deletion(-) create mode 100644 bin/configs/php-nextgen-echo-api.yaml create mode 100644 modules/openapi-generator/src/test/resources/3_0/php-nextgen/petstore-with-fake-endpoints-models-for-testing.yaml create mode 100644 samples/client/echo_api/php-nextgen/.gitignore create mode 100644 samples/client/echo_api/php-nextgen/.openapi-generator-ignore create mode 100644 samples/client/echo_api/php-nextgen/.openapi-generator/FILES create mode 100644 samples/client/echo_api/php-nextgen/.openapi-generator/VERSION create mode 100644 samples/client/echo_api/php-nextgen/.php-cs-fixer.dist.php create mode 100644 samples/client/echo_api/php-nextgen/.phplint.yml create mode 100644 samples/client/echo_api/php-nextgen/.travis.yml create mode 100644 samples/client/echo_api/php-nextgen/README.md create mode 100644 samples/client/echo_api/php-nextgen/composer.json create mode 100644 samples/client/echo_api/php-nextgen/docs/Api/AuthApi.md create mode 100644 samples/client/echo_api/php-nextgen/docs/Api/BodyApi.md create mode 100644 samples/client/echo_api/php-nextgen/docs/Api/FormApi.md create mode 100644 samples/client/echo_api/php-nextgen/docs/Api/HeaderApi.md create mode 100644 samples/client/echo_api/php-nextgen/docs/Api/PathApi.md create mode 100644 samples/client/echo_api/php-nextgen/docs/Api/QueryApi.md create mode 100644 samples/client/echo_api/php-nextgen/docs/Model/Bird.md create mode 100644 samples/client/echo_api/php-nextgen/docs/Model/Category.md create mode 100644 samples/client/echo_api/php-nextgen/docs/Model/DataQuery.md create mode 100644 samples/client/echo_api/php-nextgen/docs/Model/DefaultValue.md create mode 100644 samples/client/echo_api/php-nextgen/docs/Model/NumberPropertiesOnly.md create mode 100644 samples/client/echo_api/php-nextgen/docs/Model/Pet.md create mode 100644 samples/client/echo_api/php-nextgen/docs/Model/Query.md create mode 100644 samples/client/echo_api/php-nextgen/docs/Model/StringEnumRef.md create mode 100644 samples/client/echo_api/php-nextgen/docs/Model/Tag.md create mode 100644 samples/client/echo_api/php-nextgen/docs/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md create mode 100644 samples/client/echo_api/php-nextgen/docs/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md create mode 100644 samples/client/echo_api/php-nextgen/git_push.sh create mode 100644 samples/client/echo_api/php-nextgen/phpunit.xml.dist create mode 100644 samples/client/echo_api/php-nextgen/src/Api/AuthApi.php create mode 100644 samples/client/echo_api/php-nextgen/src/Api/BodyApi.php create mode 100644 samples/client/echo_api/php-nextgen/src/Api/FormApi.php create mode 100644 samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php create mode 100644 samples/client/echo_api/php-nextgen/src/Api/PathApi.php create mode 100644 samples/client/echo_api/php-nextgen/src/Api/QueryApi.php create mode 100644 samples/client/echo_api/php-nextgen/src/ApiException.php create mode 100644 samples/client/echo_api/php-nextgen/src/Configuration.php create mode 100644 samples/client/echo_api/php-nextgen/src/HeaderSelector.php create mode 100644 samples/client/echo_api/php-nextgen/src/Model/Bird.php create mode 100644 samples/client/echo_api/php-nextgen/src/Model/Category.php create mode 100644 samples/client/echo_api/php-nextgen/src/Model/DataQuery.php create mode 100644 samples/client/echo_api/php-nextgen/src/Model/DefaultValue.php create mode 100644 samples/client/echo_api/php-nextgen/src/Model/ModelInterface.php create mode 100644 samples/client/echo_api/php-nextgen/src/Model/NumberPropertiesOnly.php create mode 100644 samples/client/echo_api/php-nextgen/src/Model/Pet.php create mode 100644 samples/client/echo_api/php-nextgen/src/Model/Query.php create mode 100644 samples/client/echo_api/php-nextgen/src/Model/StringEnumRef.php create mode 100644 samples/client/echo_api/php-nextgen/src/Model/Tag.php create mode 100644 samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php create mode 100644 samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php create mode 100644 samples/client/echo_api/php-nextgen/src/ObjectSerializer.php create mode 100644 samples/client/echo_api/php-nextgen/tests/Api/AuthApiTest.php create mode 100644 samples/client/echo_api/php-nextgen/tests/Api/BodyApiTest.php create mode 100644 samples/client/echo_api/php-nextgen/tests/Api/FormApiTest.php create mode 100644 samples/client/echo_api/php-nextgen/tests/Api/HeaderApiTest.php create mode 100644 samples/client/echo_api/php-nextgen/tests/Api/PathApiTest.php create mode 100644 samples/client/echo_api/php-nextgen/tests/Api/QueryApiTest.php create mode 100644 samples/client/echo_api/php-nextgen/tests/Model/BirdTest.php create mode 100644 samples/client/echo_api/php-nextgen/tests/Model/CategoryTest.php create mode 100644 samples/client/echo_api/php-nextgen/tests/Model/DataQueryTest.php create mode 100644 samples/client/echo_api/php-nextgen/tests/Model/DefaultValueTest.php create mode 100644 samples/client/echo_api/php-nextgen/tests/Model/NumberPropertiesOnlyTest.php create mode 100644 samples/client/echo_api/php-nextgen/tests/Model/PetTest.php create mode 100644 samples/client/echo_api/php-nextgen/tests/Model/QueryTest.php create mode 100644 samples/client/echo_api/php-nextgen/tests/Model/StringEnumRefTest.php create mode 100644 samples/client/echo_api/php-nextgen/tests/Model/TagTest.php create mode 100644 samples/client/echo_api/php-nextgen/tests/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTest.php create mode 100644 samples/client/echo_api/php-nextgen/tests/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.php diff --git a/bin/configs/php-nextgen-echo-api.yaml b/bin/configs/php-nextgen-echo-api.yaml new file mode 100644 index 000000000000..ada80ba47001 --- /dev/null +++ b/bin/configs/php-nextgen-echo-api.yaml @@ -0,0 +1,6 @@ +generatorName: php-nextgen +outputDir: samples/client/echo_api/php-nextgen +inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml +templateDir: modules/openapi-generator/src/main/resources/php-nextgen +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/bin/configs/php-nextgen.yaml b/bin/configs/php-nextgen.yaml index 50d05c086efb..e8db9d729c2d 100644 --- a/bin/configs/php-nextgen.yaml +++ b/bin/configs/php-nextgen.yaml @@ -1,4 +1,4 @@ generatorName: php-nextgen outputDir: samples/client/petstore/php-nextgen/OpenAPIClient-php -inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/php-nextgen/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/php-nextgen diff --git a/modules/openapi-generator/src/test/resources/3_0/php-nextgen/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/php-nextgen/petstore-with-fake-endpoints-models-for-testing.yaml new file mode 100644 index 000000000000..746d1be1134b --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/php-nextgen/petstore-with-fake-endpoints-models-for-testing.yaml @@ -0,0 +1,1999 @@ +openapi: 3.0.0 +info: + description: >- + This spec is mainly for testing Petstore server and contains fake endpoints, + models. Please do not use this for any other purpose. Special characters: " + \ + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +tags: + - name: pet + description: Everything about your Pets + - name: store + description: Access to Petstore orders + - name: user + description: Operations about user +paths: + /foo: + get: + responses: + default: + description: response + content: + application/json: + schema: + type: object + properties: + string: + $ref: '#/components/schemas/Foo' + /pet: + servers: + - url: 'http://petstore.swagger.io/v2' + - url: 'http://path-server-test.petstore.local/v2' + - url: 'http://{server}.swagger.io:{port}/v2' + description: test server with variables + variables: + server: + description: target server + enum: + - 'petstore' + - 'qa-petstore' + - 'dev-petstore' + default: 'petstore' + port: + enum: + - 80 + - 8080 + default: 80 + post: + tags: + - pet + summary: Add a new pet to the store + description: '' + operationId: addPet + responses: + '200': + description: Successful operation + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + put: + tags: + - pet + summary: Update an existing pet + description: '' + operationId: updatePet + x-webclient-blocking: true + responses: + '200': + description: Successful operation + '400': + description: Invalid ID supplied + '404': + description: Pet not found + '405': + description: Validation exception + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + x-webclient-blocking: true + parameters: + - name: status + in: query + description: Status values that need to be considered for filter + required: true + style: form + explode: false + deprecated: true + schema: + type: array + items: + type: string + enum: + - available + - pending + - sold + default: available + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid status value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags + description: >- + Multiple tags can be provided with comma separated strings. Use tag1, + tag2, tag3 for testing. + operationId: findPetsByTags + x-webclient-blocking: true + parameters: + - name: tags + in: query + description: Tags to filter by + required: true + style: form + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + uniqueItems: true + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + uniqueItems: true + '400': + description: Invalid tag value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + deprecated: true + '/pet/{petId}': + get: + tags: + - pet + summary: Find pet by ID + description: Returns a single pet + operationId: getPetById + x-webclient-blocking: true + parameters: + - name: petId + in: path + description: ID of pet to return + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + security: + - api_key: [] + post: + tags: + - pet + summary: Updates a pet in the store with form data + description: '' + operationId: updatePetWithForm + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Successful operation + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + delete: + tags: + - pet + summary: Deletes a pet + description: '' + operationId: deletePet + parameters: + - name: api_key + in: header + required: false + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Successful operation + '400': + description: Invalid pet value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + '/pet/{petId}/uploadImage': + post: + tags: + - pet + summary: uploads an image + description: '' + operationId: uploadFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + type: string + format: binary + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status + description: Returns a map of status codes to quantities + operationId: getInventory + x-webclient-blocking: false + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: object + additionalProperties: + type: integer + format: int32 + security: + - api_key: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet + description: '' + operationId: placeOrder + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid Order + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + '/store/order/{order_id}': + get: + tags: + - store + summary: Find purchase order by ID + description: >- + For valid response try integer IDs with value <= 5 or > 10. Other values + will generate exceptions + operationId: getOrderById + parameters: + - name: order_id + in: path + description: ID of pet that needs to be fetched + required: true + schema: + type: integer + format: int64 + minimum: 1 + maximum: 5 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid ID supplied + '404': + description: Order not found + delete: + tags: + - store + summary: Delete purchase order by ID + description: >- + For valid response try integer IDs with value < 1000. Anything above + 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - name: order_id + in: path + description: ID of the order that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid ID supplied + '404': + description: Order not found + /user: + post: + tags: + - user + summary: Create user + description: This can only be done by the logged in user. + operationId: createUser + responses: + default: + description: successful operation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + /user/createWithArray: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithArrayInput + responses: + default: + description: successful operation + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithListInput + responses: + default: + description: successful operation + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/login: + get: + tags: + - user + summary: Logs user into the system + description: '' + operationId: loginUser + parameters: + - name: username + in: query + description: The user name for login + required: true + schema: + type: string + - name: password + in: query + description: The password for login in clear text + required: true + schema: + type: string + responses: + '200': + description: successful operation + headers: + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + type: integer + format: int32 + X-Expires-After: + description: date in UTC when token expires + schema: + type: string + format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + '400': + description: Invalid username/password supplied + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session + description: '' + operationId: logoutUser + responses: + default: + description: successful operation + '/user/{username}': + get: + tags: + - user + summary: Get user by user name + description: '' + operationId: getUserByName + parameters: + - name: username + in: path + description: The name that needs to be fetched. Use user1 for testing. + required: true + schema: + type: string + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + '400': + description: Invalid username supplied + '404': + description: User not found + put: + tags: + - user + summary: Updated user + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - name: username + in: path + description: name that need to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid user supplied + '404': + description: User not found + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + delete: + tags: + - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + /fake_classname_test: + patch: + tags: + - 'fake_classname_tags 123#$%^' + summary: To test class name in snake case + description: To test class name in snake case + operationId: testClassname + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + security: + - api_key_query: [] + requestBody: + $ref: '#/components/requestBodies/Client' + /fake: + patch: + tags: + - fake + summary: To test "client" model + description: To test "client" model + operationId: testClientModel + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + requestBody: + $ref: '#/components/requestBodies/Client' + get: + tags: + - fake + summary: To test enum parameters + description: To test enum parameters + operationId: testEnumParameters + parameters: + - name: enum_header_string_array + in: header + description: Header parameter enum test (string array) + schema: + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + - name: enum_header_string + in: header + description: Header parameter enum test (string) + schema: + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + - name: enum_query_string_array + in: query + description: Query parameter enum test (string array) + schema: + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + - name: enum_query_string + in: query + description: Query parameter enum test (string) + schema: + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + - name: enum_query_integer + in: query + description: Query parameter enum test (double) + schema: + type: integer + format: int32 + enum: + - 1 + - -2 + - name: enum_query_double + in: query + description: Query parameter enum test (double) + schema: + type: number + format: double + enum: + - 1.1 + - -1.2 + - name: enum_query_model_array + in: query + schema: + type: array + items: + $ref: '#/components/schemas/EnumClass' + responses: + '400': + description: Invalid request + '404': + description: Not found + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + enum_form_string_array: + description: Form parameter enum test (string array) + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + enum_form_string: + description: Form parameter enum test (string) + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + post: + tags: + - fake + summary: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + description: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + operationId: testEndpointParameters + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + security: + - http_basic_test: [] + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + integer: + description: None + type: integer + minimum: 10 + maximum: 100 + int32: + description: None + type: integer + format: int32 + minimum: 20 + maximum: 200 + int64: + description: None + type: integer + format: int64 + number: + description: None + type: number + minimum: 32.1 + maximum: 543.2 + float: + description: None + type: number + format: float + maximum: 987.6 + double: + description: None + type: number + format: double + minimum: 67.8 + maximum: 123.4 + string: + description: None + type: string + pattern: '/[a-z]/i' + pattern_without_delimiter: + description: None + type: string + pattern: '^[A-Z].*' + byte: + description: None + type: string + format: byte + binary: + description: None + type: string + format: binary + date: + description: None + type: string + format: date + dateTime: + description: None + type: string + format: date-time + password: + description: None + type: string + format: password + minLength: 10 + maxLength: 64 + callback: + description: None + type: string + required: + - number + - double + - pattern_without_delimiter + - byte + delete: + tags: + - fake + security: + - bearer_test: [] + summary: Fake endpoint to test group parameters (optional) + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + x-group-parameters: true + parameters: + - name: required_string_group + in: query + description: Required String in group parameters + required: true + schema: + type: integer + - name: required_boolean_group + in: header + description: Required Boolean in group parameters + required: true + schema: + type: boolean + - name: required_int64_group + in: query + description: Required Integer in group parameters + required: true + schema: + type: integer + format: int64 + - name: string_group + in: query + description: String in group parameters + schema: + type: integer + - name: boolean_group + in: header + description: Boolean in group parameters + schema: + type: boolean + - name: int64_group + in: query + description: Integer in group parameters + schema: + type: integer + format: int64 + responses: + '400': + description: Something wrong + /fake/outer/number: + post: + tags: + - fake + description: Test serialization of outer number types + operationId: fakeOuterNumberSerialize + responses: + '200': + description: Output number + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterNumber' + description: Input number as post body + /fake/property/enum-int: + post: + tags: + - fake + description: Test serialization of enum (int) properties with examples + operationId: fakePropertyEnumIntegerSerialize + responses: + '200': + description: Output enum (int) + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + description: Input enum (int) as post body + /fake/outer/string: + post: + tags: + - fake + description: Test serialization of outer string types + operationId: fakeOuterStringSerialize + responses: + '200': + description: Output string + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterString' + description: Input string as post body + /fake/outer/boolean: + post: + tags: + - fake + description: Test serialization of outer boolean types + operationId: fakeOuterBooleanSerialize + responses: + '200': + description: Output boolean + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Input boolean as post body + /fake/outer/composite: + post: + tags: + - fake + description: Test serialization of object with outer number type + operationId: fakeOuterCompositeSerialize + responses: + '200': + description: Output composite + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterComposite' + description: Input composite as post body + /fake/BigDecimalMap: + get: + tags: + - fake + description: for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys + operationId: fakeBigDecimalMap + responses: + '200': + description: successful operation + content: + '*/*': + schema: + type: object + properties: + someId: + type: number + someMap: + type: object + additionalProperties: + type: number + /fake/jsonFormData: + get: + tags: + - fake + summary: test json serialization of form data + description: '' + operationId: testJsonFormData + responses: + '200': + description: successful operation + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + /fake/inline-additionalProperties: + post: + tags: + - fake + summary: test inline additionalProperties + description: '' + operationId: testInlineAdditionalProperties + responses: + '200': + description: successful operation + requestBody: + content: + application/json: + schema: + type: object + additionalProperties: + type: string + description: request body + required: true + /fake/nullable: + post: + tags: + - fake + summary: test nullable parent property + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + /fake/body-with-query-params: + put: + tags: + - fake + operationId: testBodyWithQueryParams + parameters: + - name: query + in: query + required: true + schema: + type: string + responses: + '200': + description: Success + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + /another-fake/dummy: + patch: + tags: + - $another-fake? + summary: To test special tags + description: To test special tags and operation ID starting with number + operationId: '123_test_@#$%_special_tags' + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + requestBody: + $ref: '#/components/requestBodies/Client' + /fake/body-with-file-schema: + put: + tags: + - fake + description: >- + For this test, the body for this request must reference a schema named + `File`. + operationId: testBodyWithFileSchema + responses: + '200': + description: Success + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileSchemaTestClass' + required: true + /fake/body-with-binary: + put: + tags: + - fake + description: >- + For this test, the body has to be a binary file. + operationId: testBodyWithBinary + responses: + '200': + description: Success + requestBody: + content: + image/png: + schema: + type: string + nullable: true + format: binary + description: image to upload + required: true + /fake/test-query-parameters: + put: + tags: + - fake + description: To test the collection format in query parameters + operationId: testQueryParameterCollectionFormat + parameters: + - name: pipe + in: query + required: true + style: pipeDelimited + schema: + type: array + items: + type: string + - name: ioutil + in: query + required: true + style: form + explode: false + schema: + type: array + items: + type: string + - name: http + in: query + required: true + style: spaceDelimited + schema: + type: array + items: + type: string + - name: url + in: query + required: true + style: form + explode: false + schema: + type: array + items: + type: string + - name: context + in: query + required: true + explode: true + schema: + type: array + items: + type: string + - name: language + in: query + required: false + schema: + type: object + additionalProperties: + type: string + format: string + - name: allowEmpty + in: query + required: true + allowEmptyValue: true + schema: + type: string + responses: + "200": + description: Success + '/fake/{petId}/uploadImageWithRequiredFile': + post: + tags: + - pet + summary: uploads an image (required) + description: '' + operationId: uploadFileWithRequiredFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + requiredFile: + description: file to upload + type: string + format: binary + required: + - requiredFile + /fake/health: + get: + tags: + - fake + summary: Health check endpoint + responses: + 200: + description: The instance started successfully + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResult' + /fake/http-signature-test: + get: + tags: + - fake + summary: test http signature authentication + operationId: fake-http-signature-test + parameters: + - name: query_1 + in: query + description: query parameter + required: optional + schema: + type: string + - name: header_1 + in: header + description: header parameter + required: optional + schema: + type: string + security: + - http_signature_test: [] + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + 200: + description: The instance started successfully +servers: + - url: 'http://{server}.swagger.io:{port}/v2' + description: petstore server + variables: + server: + enum: + - 'petstore' + - 'qa-petstore' + - 'dev-petstore' + default: 'petstore' + port: + enum: + - 80 + - 8080 + default: 80 + - url: https://localhost:8080/{version} + description: The local server + variables: + version: + enum: + - 'v1' + - 'v2' + default: 'v2' + - url: https://127.0.0.1/no_varaible + description: The local server without variables +components: + requestBodies: + UserArray: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + description: List of user object + required: true + Client: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + securitySchemes: + petstore_auth: + type: oauth2 + flows: + implicit: + authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog' + scopes: + 'write:pets': modify pets in your account + 'read:pets': read your pets + api_key: + type: apiKey + name: api_key + in: header + api_key_query: + type: apiKey + name: api_key_query + in: query + http_basic_test: + type: http + scheme: basic + bearer_test: + type: http + scheme: bearer + bearerFormat: JWT + http_signature_test: + type: http + scheme: signature + schemas: + Foo: + type: object + properties: + bar: + $ref: '#/components/schemas/Bar' + Bar: + type: string + default: bar + Order: + type: object + properties: + id: + type: integer + format: int64 + petId: + type: integer + format: int64 + quantity: + type: integer + format: int32 + shipDate: + type: string + format: date-time + status: + type: string + description: Order Status + enum: + - placed + - approved + - delivered + complete: + type: boolean + default: false + xml: + name: Order + Category: + type: object + required: + - name + properties: + id: + type: integer + format: int64 + name: + type: string + default: default-name + xml: + name: Category + User: + type: object + properties: + id: + type: integer + format: int64 + x-is-unique: true + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + type: integer + format: int32 + description: User Status + xml: + name: User + Tag: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Tag + Pet: + type: object + required: + - name + - photoUrls + properties: + id: + type: integer + format: int64 + x-is-unique: true + category: + $ref: '#/components/schemas/Category' + name: + type: string + example: doggie + photoUrls: + type: array + xml: + name: photoUrl + wrapped: true + items: + type: string + uniqueItems: true + tags: + type: array + xml: + name: tag + wrapped: true + items: + $ref: '#/components/schemas/Tag' + status: + type: string + description: pet status in the store + enum: + - available + - pending + - sold + xml: + name: Pet + ApiResponse: + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string + Return: + description: Model for testing reserved words + properties: + return: + type: integer + format: int32 + xml: + name: Return + Name: + description: Model for testing model name same as property name + required: + - name + properties: + name: + type: integer + format: int32 + snake_case: + readOnly: true + type: integer + format: int32 + property: + type: string + 123Number: + type: integer + readOnly: true + xml: + name: Name + 200_response: + description: Model for testing model name starting with number + properties: + name: + type: integer + format: int32 + class: + type: string + xml: + name: Name + ClassModel: + description: Model for testing model with "_class" property + properties: + _class: + type: string + Dog: + allOf: + - $ref: '#/components/schemas/Animal' + - type: object + properties: + breed: + type: string + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - type: object + properties: + declawed: + type: boolean + Animal: + type: object + discriminator: + propertyName: className + mapping: + DOG: '#/components/schemas/Dog' + CAT: '#/components/schemas/Cat' + required: + - className + properties: + className: + type: string + color: + type: string + default: red + AnimalFarm: + type: array + items: + $ref: '#/components/schemas/Animal' + format_test: + type: object + required: + - number + - byte + - date + - password + properties: + integer: + type: integer + maximum: 100 + minimum: 10 + int32: + type: integer + format: int32 + maximum: 200 + minimum: 20 + int64: + type: integer + format: int64 + number: + maximum: 543.2 + minimum: 32.1 + type: number + float: + type: number + format: float + maximum: 987.6 + minimum: 54.3 + double: + type: number + format: double + maximum: 123.4 + minimum: 67.8 + decimal: + type: string + format: number + string: + type: string + pattern: '/[a-z]/i' + byte: + type: string + format: byte + binary: + type: string + format: binary + date: + type: string + format: date + dateTime: + type: string + format: date-time + uuid: + type: string + format: uuid + example: 72f98069-206d-4f12-9f12-3d1e525a8e84 + password: + type: string + format: password + maxLength: 64 + minLength: 10 + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + type: string + pattern: '^\d{10}$' + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + type: string + pattern: '/^image_\d{1,3}$/i' + EnumClass: + type: string + default: '-efg' + enum: + - _abc + - '-efg' + - (xyz) + Enum_Test: + type: object + required: + - enum_string_required + properties: + enum_string: + type: string + enum: + - UPPER + - lower + - '' + enum_string_required: + type: string + enum: + - UPPER + - lower + - '' + enum_integer: + type: integer + format: int32 + enum: + - 1 + - -1 + enum_number: + type: number + format: double + enum: + - 1.1 + - -1.2 + outerEnum: + $ref: '#/components/schemas/OuterEnum' + outerEnumInteger: + $ref: '#/components/schemas/OuterEnumInteger' + outerEnumDefaultValue: + $ref: '#/components/schemas/OuterEnumDefaultValue' + outerEnumIntegerDefaultValue: + $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' + AdditionalPropertiesClass: + type: object + properties: + map_property: + type: object + additionalProperties: + type: string + map_of_map_property: + type: object + additionalProperties: + type: object + additionalProperties: + type: string + MixedPropertiesAndAdditionalPropertiesClass: + type: object + properties: + uuid: + type: string + format: uuid + dateTime: + type: string + format: date-time + map: + type: object + additionalProperties: + $ref: '#/components/schemas/Animal' + List: + type: object + properties: + 123-list: + type: string + Client: + type: object + properties: + client: + type: string + ReadOnlyFirst: + type: object + properties: + bar: + type: string + readOnly: true + baz: + type: string + hasOnlyReadOnly: + type: object + properties: + bar: + type: string + readOnly: true + foo: + type: string + readOnly: true + Capitalization: + type: object + properties: + smallCamel: + type: string + CapitalCamel: + type: string + small_Snake: + type: string + Capital_Snake: + type: string + SCA_ETH_Flow_Points: + type: string + ATT_NAME: + description: | + Name of the pet + type: string + MapTest: + type: object + properties: + map_map_of_string: + type: object + additionalProperties: + type: object + additionalProperties: + type: string + map_of_enum_string: + type: object + additionalProperties: + type: string + enum: + - UPPER + - lower + direct_map: + type: object + additionalProperties: + type: boolean + indirect_map: + $ref: '#/components/schemas/StringBooleanMap' + ArrayTest: + type: object + properties: + array_of_string: + type: array + items: + type: string + minItems: 0 + maxItems: 3 + array_array_of_integer: + type: array + items: + type: array + items: + type: integer + format: int64 + array_array_of_model: + type: array + items: + type: array + items: + $ref: '#/components/schemas/ReadOnlyFirst' + NumberOnly: + type: object + properties: + JustNumber: + type: number + ArrayOfNumberOnly: + type: object + properties: + ArrayNumber: + type: array + items: + type: number + ArrayOfArrayOfNumberOnly: + type: object + properties: + ArrayArrayNumber: + type: array + items: + type: array + items: + type: number + EnumArrays: + type: object + properties: + just_symbol: + type: string + enum: + - '>=' + - $ + array_enum: + type: array + items: + type: string + enum: + - fish + - crab + OuterEnum: + nullable: true + type: string + enum: + - placed + - approved + - delivered + OuterEnumInteger: + type: integer + enum: + - 0 + - 1 + - 2 + example: 2 + OuterEnumDefaultValue: + type: string + enum: + - placed + - approved + - delivered + default: placed + OuterEnumIntegerDefaultValue: + type: integer + enum: + - 0 + - 1 + - 2 + default: 0 + OuterComposite: + type: object + properties: + my_number: + $ref: '#/components/schemas/OuterNumber' + my_string: + $ref: '#/components/schemas/OuterString' + my_boolean: + $ref: '#/components/schemas/OuterBoolean' + OuterNumber: + type: number + OuterString: + type: string + OuterBoolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + type: object + discriminator: + propertyName: type + properties: + type: + type: string + enum: + - ChildWithNullable + nullableProperty: + type: string + nullable: true + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - type: object + properties: + otherProperty: + type: string + StringBooleanMap: + additionalProperties: + type: boolean + FileSchemaTestClass: + type: object + properties: + file: + $ref: '#/components/schemas/File' + files: + type: array + items: + $ref: '#/components/schemas/File' + File: + type: object + description: Must be named `File` for test. + properties: + sourceURI: + description: Test capitalization + type: string + _special_model.name_: + properties: + '$special[property.name]': + type: integer + format: int64 + xml: + name: '$special[model.name]' + HealthCheckResult: + type: object + properties: + NullableMessage: + nullable: true + type: string + description: Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + NullableClass: + type: object + properties: + integer_prop: + type: integer + nullable: true + number_prop: + type: number + nullable: true + boolean_prop: + type: boolean + nullable: true + string_prop: + type: string + nullable: true + date_prop: + type: string + format: date + nullable: true + datetime_prop: + type: string + format: date-time + nullable: true + array_nullable_prop: + type: array + nullable: true + items: + type: object + array_and_items_nullable_prop: + type: array + nullable: true + items: + type: object + nullable: true + array_items_nullable: + type: array + items: + type: object + nullable: true + object_nullable_prop: + type: object + nullable: true + additionalProperties: + type: object + object_and_items_nullable_prop: + type: object + nullable: true + additionalProperties: + type: object + nullable: true + object_items_nullable: + type: object + additionalProperties: + type: object + nullable: true + additionalProperties: + type: object + nullable: true + OuterObjectWithEnumProperty: + type: object + example: + value: 2 + required: + - value + properties: + value: + $ref: '#/components/schemas/OuterEnumInteger' + DeprecatedObject: + type: object + deprecated: true + properties: + name: + type: string + ObjectWithDeprecatedFields: + type: object + properties: + uuid: + type: string + id: + type: number + deprecated: true + deprecatedRef: + $ref: '#/components/schemas/DeprecatedObject' + bars: + type: array + deprecated: true + items: + $ref: '#/components/schemas/Bar' + AllOfWithSingleRef: + type: object + properties: + username: + type: string + SingleRefType: + allOf: + - $ref: '#/components/schemas/SingleRefType' + SingleRefType: + type: string + title: SingleRefType + enum: + - admin + - user diff --git a/samples/client/echo_api/php-nextgen/.gitignore b/samples/client/echo_api/php-nextgen/.gitignore new file mode 100644 index 000000000000..cc2a4bdc54f9 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/.gitignore @@ -0,0 +1,19 @@ +# ref: https://github.com/github/gitignore/blob/master/Composer.gitignore + +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +# makes sense since it's a library(client SDK) and not a project +composer.lock + +# php-cs-fixer cache +.php_cs.cache +.php-cs-fixer.cache + +# PHPUnit cache +.phpunit.result.cache + +# PHPLint cache +build/phplint.cache diff --git a/samples/client/echo_api/php-nextgen/.openapi-generator-ignore b/samples/client/echo_api/php-nextgen/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/echo_api/php-nextgen/.openapi-generator/FILES b/samples/client/echo_api/php-nextgen/.openapi-generator/FILES new file mode 100644 index 000000000000..82705c8ca1df --- /dev/null +++ b/samples/client/echo_api/php-nextgen/.openapi-generator/FILES @@ -0,0 +1,47 @@ +.gitignore +.php-cs-fixer.dist.php +.phplint.yml +.travis.yml +README.md +composer.json +docs/Api/AuthApi.md +docs/Api/BodyApi.md +docs/Api/FormApi.md +docs/Api/HeaderApi.md +docs/Api/PathApi.md +docs/Api/QueryApi.md +docs/Model/Bird.md +docs/Model/Category.md +docs/Model/DataQuery.md +docs/Model/DefaultValue.md +docs/Model/NumberPropertiesOnly.md +docs/Model/Pet.md +docs/Model/Query.md +docs/Model/StringEnumRef.md +docs/Model/Tag.md +docs/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md +docs/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md +git_push.sh +phpunit.xml.dist +src/Api/AuthApi.php +src/Api/BodyApi.php +src/Api/FormApi.php +src/Api/HeaderApi.php +src/Api/PathApi.php +src/Api/QueryApi.php +src/ApiException.php +src/Configuration.php +src/HeaderSelector.php +src/Model/Bird.php +src/Model/Category.php +src/Model/DataQuery.php +src/Model/DefaultValue.php +src/Model/ModelInterface.php +src/Model/NumberPropertiesOnly.php +src/Model/Pet.php +src/Model/Query.php +src/Model/StringEnumRef.php +src/Model/Tag.php +src/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php +src/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php +src/ObjectSerializer.php diff --git a/samples/client/echo_api/php-nextgen/.openapi-generator/VERSION b/samples/client/echo_api/php-nextgen/.openapi-generator/VERSION new file mode 100644 index 000000000000..44bad91b171c --- /dev/null +++ b/samples/client/echo_api/php-nextgen/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/echo_api/php-nextgen/.php-cs-fixer.dist.php b/samples/client/echo_api/php-nextgen/.php-cs-fixer.dist.php new file mode 100644 index 000000000000..af9cf39fddb0 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/.php-cs-fixer.dist.php @@ -0,0 +1,29 @@ +in(__DIR__) + ->exclude('vendor') + ->exclude('test') + ->exclude('tests') +; + +$config = new PhpCsFixer\Config(); +return $config->setRules([ + '@PSR12' => true, + 'phpdoc_order' => true, + 'array_syntax' => [ 'syntax' => 'short' ], + 'strict_comparison' => true, + 'strict_param' => true, + 'no_trailing_whitespace' => false, + 'no_trailing_whitespace_in_comment' => false, + 'braces' => false, + 'single_blank_line_at_eof' => false, + 'blank_line_after_namespace' => false, + 'no_leading_import_slash' => false, + ]) + ->setFinder($finder) +; diff --git a/samples/client/echo_api/php-nextgen/.phplint.yml b/samples/client/echo_api/php-nextgen/.phplint.yml new file mode 100644 index 000000000000..ef4be48fa2d2 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/.phplint.yml @@ -0,0 +1,11 @@ +path: + - ./src + - ./tests +jobs: 10 +extensions: + - php +exclude: + - vendor +warning: true +memory-limit: -1 +no-cache: true diff --git a/samples/client/echo_api/php-nextgen/.travis.yml b/samples/client/echo_api/php-nextgen/.travis.yml new file mode 100644 index 000000000000..707be2a11d5d --- /dev/null +++ b/samples/client/echo_api/php-nextgen/.travis.yml @@ -0,0 +1,12 @@ +language: php +# Jammy Jellyfish environment has preinstalled PHP 8.1 +# Focal Fossa doesn't fit since it contains preinstalled PHP 7.4 only +# https://docs.travis-ci.com/user/reference/jammy/#php-support +dist: jammy +os: + - linux +php: + - 8.1 + - 8.2 +before_install: "composer install" +script: "vendor/bin/phpunit" diff --git a/samples/client/echo_api/php-nextgen/README.md b/samples/client/echo_api/php-nextgen/README.md new file mode 100644 index 000000000000..f73398ca1f40 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/README.md @@ -0,0 +1,138 @@ +# OpenAPIClient-php + +Echo Server API + + +## Installation & Usage + +### Requirements + +PHP 8.1 and later. + +### Composer + +To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`: + +```json +{ + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" + } + ], + "require": { + "GIT_USER_ID/GIT_REPO_ID": "*@dev" + } +} +``` + +Then run `composer install` + +### Manual Installation + +Download the files and include `autoload.php`: + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new OpenAPI\Client\Api\AuthApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->testAuthHttpBasic(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AuthApi->testAuthHttpBasic: ', $e->getMessage(), PHP_EOL; +} + +``` + +## API Endpoints + +All URIs are relative to *http://localhost:3000* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AuthApi* | [**testAuthHttpBasic**](docs/Api/AuthApi.md#testauthhttpbasic) | **POST** /auth/http/basic | To test HTTP basic authentication +*BodyApi* | [**testBinaryGif**](docs/Api/BodyApi.md#testbinarygif) | **POST** /binary/gif | Test binary (gif) response body +*BodyApi* | [**testBodyApplicationOctetstreamBinary**](docs/Api/BodyApi.md#testbodyapplicationoctetstreambinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) +*BodyApi* | [**testBodyMultipartFormdataArrayOfBinary**](docs/Api/BodyApi.md#testbodymultipartformdataarrayofbinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*BodyApi* | [**testEchoBodyFreeFormObjectResponseString**](docs/Api/BodyApi.md#testechobodyfreeformobjectresponsestring) | **POST** /echo/body/FreeFormObject/response_string | Test free form object +*BodyApi* | [**testEchoBodyPet**](docs/Api/BodyApi.md#testechobodypet) | **POST** /echo/body/Pet | Test body parameter(s) +*BodyApi* | [**testEchoBodyPetResponseString**](docs/Api/BodyApi.md#testechobodypetresponsestring) | **POST** /echo/body/Pet/response_string | Test empty response body +*BodyApi* | [**testEchoBodyTagResponseString**](docs/Api/BodyApi.md#testechobodytagresponsestring) | **POST** /echo/body/Tag/response_string | Test empty json (request body) +*FormApi* | [**testFormIntegerBooleanString**](docs/Api/FormApi.md#testformintegerbooleanstring) | **POST** /form/integer/boolean/string | Test form parameter(s) +*FormApi* | [**testFormOneof**](docs/Api/FormApi.md#testformoneof) | **POST** /form/oneof | Test form parameter(s) for oneOf schema +*HeaderApi* | [**testHeaderIntegerBooleanString**](docs/Api/HeaderApi.md#testheaderintegerbooleanstring) | **GET** /header/integer/boolean/string | Test header parameter(s) +*PathApi* | [**testsPathStringPathStringIntegerPathInteger**](docs/Api/PathApi.md#testspathstringpathstringintegerpathinteger) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s) +*QueryApi* | [**testEnumRefString**](docs/Api/QueryApi.md#testenumrefstring) | **GET** /query/enum_ref_string | Test query parameter(s) +*QueryApi* | [**testQueryDatetimeDateString**](docs/Api/QueryApi.md#testquerydatetimedatestring) | **GET** /query/datetime/date/string | Test query parameter(s) +*QueryApi* | [**testQueryIntegerBooleanString**](docs/Api/QueryApi.md#testqueryintegerbooleanstring) | **GET** /query/integer/boolean/string | Test query parameter(s) +*QueryApi* | [**testQueryStyleDeepObjectExplodeTrueObject**](docs/Api/QueryApi.md#testquerystyledeepobjectexplodetrueobject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s) +*QueryApi* | [**testQueryStyleDeepObjectExplodeTrueObjectAllOf**](docs/Api/QueryApi.md#testquerystyledeepobjectexplodetrueobjectallof) | **GET** /query/style_deepObject/explode_true/object/allOf | Test query parameter(s) +*QueryApi* | [**testQueryStyleFormExplodeTrueArrayString**](docs/Api/QueryApi.md#testquerystyleformexplodetruearraystring) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) +*QueryApi* | [**testQueryStyleFormExplodeTrueObject**](docs/Api/QueryApi.md#testquerystyleformexplodetrueobject) | **GET** /query/style_form/explode_true/object | Test query parameter(s) +*QueryApi* | [**testQueryStyleFormExplodeTrueObjectAllOf**](docs/Api/QueryApi.md#testquerystyleformexplodetrueobjectallof) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s) + +## Models + +- [Bird](docs/Model/Bird.md) +- [Category](docs/Model/Category.md) +- [DataQuery](docs/Model/DataQuery.md) +- [DefaultValue](docs/Model/DefaultValue.md) +- [NumberPropertiesOnly](docs/Model/NumberPropertiesOnly.md) +- [Pet](docs/Model/Pet.md) +- [Query](docs/Model/Query.md) +- [StringEnumRef](docs/Model/StringEnumRef.md) +- [Tag](docs/Model/Tag.md) +- [TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter](docs/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md) +- [TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter](docs/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md) + +## Authorization + +### http_auth + +- **Type**: HTTP basic authentication + +## Tests + +To run the tests, use: + +```bash +composer install +vendor/bin/phpunit +``` + +## Author + +team@openapitools.org + +## About this package + +This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: `0.1.0` +- Build package: `org.openapitools.codegen.languages.PhpNextgenClientCodegen` diff --git a/samples/client/echo_api/php-nextgen/composer.json b/samples/client/echo_api/php-nextgen/composer.json new file mode 100644 index 000000000000..1d2015c490eb --- /dev/null +++ b/samples/client/echo_api/php-nextgen/composer.json @@ -0,0 +1,45 @@ +{ + "description": "Echo Server API", + "keywords": [ + "openapitools", + "openapi-generator", + "openapi", + "php", + "sdk", + "rest", + "api" + ], + "homepage": "https://openapi-generator.tech", + "license": "unlicense", + "authors": [ + { + "name": "OpenAPI-Generator contributors", + "homepage": "https://openapi-generator.tech" + } + ], + "require": { + "php": "^8.1", + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/psr7": "^2.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.5", + "overtrue/phplint": "^9.0", + "phpunit/phpunit": "^9.0" + }, + "autoload": { + "psr-4": { "OpenAPI\\Client\\" : "src/" } + }, + "autoload-dev": { + "psr-4": { "OpenAPI\\Client\\Test\\" : "tests/" } + }, + "scripts": { + "test": [ + "@phplint" + ], + "phplint": "phplint" + } +} diff --git a/samples/client/echo_api/php-nextgen/docs/Api/AuthApi.md b/samples/client/echo_api/php-nextgen/docs/Api/AuthApi.md new file mode 100644 index 000000000000..8fb88b69afef --- /dev/null +++ b/samples/client/echo_api/php-nextgen/docs/Api/AuthApi.md @@ -0,0 +1,67 @@ +# OpenAPI\Client\AuthApi + +All URIs are relative to http://localhost:3000, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**testAuthHttpBasic()**](AuthApi.md#testAuthHttpBasic) | **POST** /auth/http/basic | To test HTTP basic authentication | + + +## `testAuthHttpBasic()` + +```php +testAuthHttpBasic(): string +``` + +To test HTTP basic authentication + +To test HTTP basic authentication + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new OpenAPI\Client\Api\AuthApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->testAuthHttpBasic(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AuthApi->testAuthHttpBasic: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**string** + +### Authorization + +[http_auth](../../README.md#http_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/samples/client/echo_api/php-nextgen/docs/Api/BodyApi.md b/samples/client/echo_api/php-nextgen/docs/Api/BodyApi.md new file mode 100644 index 000000000000..84fb8a7aa783 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/docs/Api/BodyApi.md @@ -0,0 +1,403 @@ +# OpenAPI\Client\BodyApi + +All URIs are relative to http://localhost:3000, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**testBinaryGif()**](BodyApi.md#testBinaryGif) | **POST** /binary/gif | Test binary (gif) response body | +| [**testBodyApplicationOctetstreamBinary()**](BodyApi.md#testBodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) | +| [**testBodyMultipartFormdataArrayOfBinary()**](BodyApi.md#testBodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime | +| [**testEchoBodyFreeFormObjectResponseString()**](BodyApi.md#testEchoBodyFreeFormObjectResponseString) | **POST** /echo/body/FreeFormObject/response_string | Test free form object | +| [**testEchoBodyPet()**](BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) | +| [**testEchoBodyPetResponseString()**](BodyApi.md#testEchoBodyPetResponseString) | **POST** /echo/body/Pet/response_string | Test empty response body | +| [**testEchoBodyTagResponseString()**](BodyApi.md#testEchoBodyTagResponseString) | **POST** /echo/body/Tag/response_string | Test empty json (request body) | + + +## `testBinaryGif()` + +```php +testBinaryGif(): \SplFileObject +``` + +Test binary (gif) response body + +Test binary (gif) response body + +### Example + +```php +testBinaryGif(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling BodyApi->testBinaryGif: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**\SplFileObject** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `image/gif` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `testBodyApplicationOctetstreamBinary()` + +```php +testBodyApplicationOctetstreamBinary($body): string +``` + +Test body parameter(s) + +Test body parameter(s) + +### Example + +```php +testBodyApplicationOctetstreamBinary($body); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling BodyApi->testBodyApplicationOctetstreamBinary: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **body** | **\SplFileObject****\SplFileObject**| | [optional] | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/octet-stream` +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `testBodyMultipartFormdataArrayOfBinary()` + +```php +testBodyMultipartFormdataArrayOfBinary($files): string +``` + +Test array of binary in multipart mime + +Test array of binary in multipart mime + +### Example + +```php +testBodyMultipartFormdataArrayOfBinary($files); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling BodyApi->testBodyMultipartFormdataArrayOfBinary: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **files** | **\SplFileObject[]**| | | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `multipart/form-data` +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `testEchoBodyFreeFormObjectResponseString()` + +```php +testEchoBodyFreeFormObjectResponseString($body): string +``` + +Test free form object + +Test free form object + +### Example + +```php + new \stdClass); // object | Free form object + +try { + $result = $apiInstance->testEchoBodyFreeFormObjectResponseString($body); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling BodyApi->testEchoBodyFreeFormObjectResponseString: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **body** | **object**| Free form object | [optional] | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `testEchoBodyPet()` + +```php +testEchoBodyPet($pet): \OpenAPI\Client\Model\Pet +``` + +Test body parameter(s) + +Test body parameter(s) + +### Example + +```php +testEchoBodyPet($pet); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling BodyApi->testEchoBodyPet: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **pet** | [**\OpenAPI\Client\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\Pet**](../Model/Pet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `testEchoBodyPetResponseString()` + +```php +testEchoBodyPetResponseString($pet): string +``` + +Test empty response body + +Test empty response body + +### Example + +```php +testEchoBodyPetResponseString($pet); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling BodyApi->testEchoBodyPetResponseString: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **pet** | [**\OpenAPI\Client\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store | [optional] | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `testEchoBodyTagResponseString()` + +```php +testEchoBodyTagResponseString($tag): string +``` + +Test empty json (request body) + +Test empty json (request body) + +### Example + +```php +testEchoBodyTagResponseString($tag); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling BodyApi->testEchoBodyTagResponseString: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **tag** | [**\OpenAPI\Client\Model\Tag**](../Model/Tag.md)| Tag object | [optional] | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/samples/client/echo_api/php-nextgen/docs/Api/FormApi.md b/samples/client/echo_api/php-nextgen/docs/Api/FormApi.md new file mode 100644 index 000000000000..1321378cc07b --- /dev/null +++ b/samples/client/echo_api/php-nextgen/docs/Api/FormApi.md @@ -0,0 +1,135 @@ +# OpenAPI\Client\FormApi + +All URIs are relative to http://localhost:3000, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**testFormIntegerBooleanString()**](FormApi.md#testFormIntegerBooleanString) | **POST** /form/integer/boolean/string | Test form parameter(s) | +| [**testFormOneof()**](FormApi.md#testFormOneof) | **POST** /form/oneof | Test form parameter(s) for oneOf schema | + + +## `testFormIntegerBooleanString()` + +```php +testFormIntegerBooleanString($integer_form, $boolean_form, $string_form): string +``` + +Test form parameter(s) + +Test form parameter(s) + +### Example + +```php +testFormIntegerBooleanString($integer_form, $boolean_form, $string_form); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling FormApi->testFormIntegerBooleanString: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **integer_form** | **int**| | [optional] | +| **boolean_form** | **bool**| | [optional] | +| **string_form** | **string**| | [optional] | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/x-www-form-urlencoded` +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `testFormOneof()` + +```php +testFormOneof($form1, $form2, $form3, $form4, $id, $name): string +``` + +Test form parameter(s) for oneOf schema + +Test form parameter(s) for oneOf schema + +### Example + +```php +testFormOneof($form1, $form2, $form3, $form4, $id, $name); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling FormApi->testFormOneof: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **form1** | **string**| | [optional] | +| **form2** | **int**| | [optional] | +| **form3** | **string**| | [optional] | +| **form4** | **bool**| | [optional] | +| **id** | **int**| | [optional] | +| **name** | **string**| | [optional] | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/x-www-form-urlencoded` +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/samples/client/echo_api/php-nextgen/docs/Api/HeaderApi.md b/samples/client/echo_api/php-nextgen/docs/Api/HeaderApi.md new file mode 100644 index 000000000000..12146c4b4ba6 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/docs/Api/HeaderApi.md @@ -0,0 +1,68 @@ +# OpenAPI\Client\HeaderApi + +All URIs are relative to http://localhost:3000, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**testHeaderIntegerBooleanString()**](HeaderApi.md#testHeaderIntegerBooleanString) | **GET** /header/integer/boolean/string | Test header parameter(s) | + + +## `testHeaderIntegerBooleanString()` + +```php +testHeaderIntegerBooleanString($integer_header, $boolean_header, $string_header): string +``` + +Test header parameter(s) + +Test header parameter(s) + +### Example + +```php +testHeaderIntegerBooleanString($integer_header, $boolean_header, $string_header); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling HeaderApi->testHeaderIntegerBooleanString: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **integer_header** | **int**| | [optional] | +| **boolean_header** | **bool**| | [optional] | +| **string_header** | **string**| | [optional] | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/samples/client/echo_api/php-nextgen/docs/Api/PathApi.md b/samples/client/echo_api/php-nextgen/docs/Api/PathApi.md new file mode 100644 index 000000000000..7adda508e748 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/docs/Api/PathApi.md @@ -0,0 +1,66 @@ +# OpenAPI\Client\PathApi + +All URIs are relative to http://localhost:3000, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**testsPathStringPathStringIntegerPathInteger()**](PathApi.md#testsPathStringPathStringIntegerPathInteger) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s) | + + +## `testsPathStringPathStringIntegerPathInteger()` + +```php +testsPathStringPathStringIntegerPathInteger($path_string, $path_integer): string +``` + +Test path parameter(s) + +Test path parameter(s) + +### Example + +```php +testsPathStringPathStringIntegerPathInteger($path_string, $path_integer); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling PathApi->testsPathStringPathStringIntegerPathInteger: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **path_string** | **string**| | | +| **path_integer** | **int**| | | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/samples/client/echo_api/php-nextgen/docs/Api/QueryApi.md b/samples/client/echo_api/php-nextgen/docs/Api/QueryApi.md new file mode 100644 index 000000000000..c7534bcbdc74 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/docs/Api/QueryApi.md @@ -0,0 +1,471 @@ +# OpenAPI\Client\QueryApi + +All URIs are relative to http://localhost:3000, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**testEnumRefString()**](QueryApi.md#testEnumRefString) | **GET** /query/enum_ref_string | Test query parameter(s) | +| [**testQueryDatetimeDateString()**](QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s) | +| [**testQueryIntegerBooleanString()**](QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) | +| [**testQueryStyleDeepObjectExplodeTrueObject()**](QueryApi.md#testQueryStyleDeepObjectExplodeTrueObject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s) | +| [**testQueryStyleDeepObjectExplodeTrueObjectAllOf()**](QueryApi.md#testQueryStyleDeepObjectExplodeTrueObjectAllOf) | **GET** /query/style_deepObject/explode_true/object/allOf | Test query parameter(s) | +| [**testQueryStyleFormExplodeTrueArrayString()**](QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) | +| [**testQueryStyleFormExplodeTrueObject()**](QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s) | +| [**testQueryStyleFormExplodeTrueObjectAllOf()**](QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOf) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s) | + + +## `testEnumRefString()` + +```php +testEnumRefString($enum_ref_string_query): string +``` + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```php +testEnumRefString($enum_ref_string_query); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling QueryApi->testEnumRefString: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **enum_ref_string_query** | [**StringEnumRef**](../Model/.md)| | [optional] | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `testQueryDatetimeDateString()` + +```php +testQueryDatetimeDateString($datetime_query, $date_query, $string_query): string +``` + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```php +testQueryDatetimeDateString($datetime_query, $date_query, $string_query); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling QueryApi->testQueryDatetimeDateString: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **datetime_query** | **\DateTime**| | [optional] | +| **date_query** | **\DateTime**| | [optional] | +| **string_query** | **string**| | [optional] | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `testQueryIntegerBooleanString()` + +```php +testQueryIntegerBooleanString($integer_query, $boolean_query, $string_query): string +``` + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```php +testQueryIntegerBooleanString($integer_query, $boolean_query, $string_query); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling QueryApi->testQueryIntegerBooleanString: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **integer_query** | **int**| | [optional] | +| **boolean_query** | **bool**| | [optional] | +| **string_query** | **string**| | [optional] | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `testQueryStyleDeepObjectExplodeTrueObject()` + +```php +testQueryStyleDeepObjectExplodeTrueObject($query_object): string +``` + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```php +testQueryStyleDeepObjectExplodeTrueObject($query_object); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling QueryApi->testQueryStyleDeepObjectExplodeTrueObject: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **query_object** | [**Pet**](../Model/.md)| | [optional] | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `testQueryStyleDeepObjectExplodeTrueObjectAllOf()` + +```php +testQueryStyleDeepObjectExplodeTrueObjectAllOf($query_object): string +``` + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```php +testQueryStyleDeepObjectExplodeTrueObjectAllOf($query_object); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling QueryApi->testQueryStyleDeepObjectExplodeTrueObjectAllOf: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **query_object** | [**TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter**](../Model/.md)| | [optional] | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `testQueryStyleFormExplodeTrueArrayString()` + +```php +testQueryStyleFormExplodeTrueArrayString($query_object): string +``` + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```php +testQueryStyleFormExplodeTrueArrayString($query_object); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling QueryApi->testQueryStyleFormExplodeTrueArrayString: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **query_object** | [**TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter**](../Model/.md)| | [optional] | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `testQueryStyleFormExplodeTrueObject()` + +```php +testQueryStyleFormExplodeTrueObject($query_object): string +``` + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```php +testQueryStyleFormExplodeTrueObject($query_object); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling QueryApi->testQueryStyleFormExplodeTrueObject: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **query_object** | [**Pet**](../Model/.md)| | [optional] | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `testQueryStyleFormExplodeTrueObjectAllOf()` + +```php +testQueryStyleFormExplodeTrueObjectAllOf($query_object): string +``` + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```php +testQueryStyleFormExplodeTrueObjectAllOf($query_object); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling QueryApi->testQueryStyleFormExplodeTrueObjectAllOf: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **query_object** | [**DataQuery**](../Model/.md)| | [optional] | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/samples/client/echo_api/php-nextgen/docs/Model/Bird.md b/samples/client/echo_api/php-nextgen/docs/Model/Bird.md new file mode 100644 index 000000000000..e6aa9ec6b21b --- /dev/null +++ b/samples/client/echo_api/php-nextgen/docs/Model/Bird.md @@ -0,0 +1,10 @@ +# # Bird + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**size** | **string** | | [optional] +**color** | **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/echo_api/php-nextgen/docs/Model/Category.md b/samples/client/echo_api/php-nextgen/docs/Model/Category.md new file mode 100644 index 000000000000..7302be9d97dd --- /dev/null +++ b/samples/client/echo_api/php-nextgen/docs/Model/Category.md @@ -0,0 +1,10 @@ +# # Category + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **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/echo_api/php-nextgen/docs/Model/DataQuery.md b/samples/client/echo_api/php-nextgen/docs/Model/DataQuery.md new file mode 100644 index 000000000000..c618206597dc --- /dev/null +++ b/samples/client/echo_api/php-nextgen/docs/Model/DataQuery.md @@ -0,0 +1,11 @@ +# # DataQuery + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**suffix** | **string** | test suffix | [optional] +**text** | **string** | Some text containing white spaces | [optional] +**date** | **\DateTime** | A date | [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/echo_api/php-nextgen/docs/Model/DefaultValue.md b/samples/client/echo_api/php-nextgen/docs/Model/DefaultValue.md new file mode 100644 index 000000000000..a5000ed94eed --- /dev/null +++ b/samples/client/echo_api/php-nextgen/docs/Model/DefaultValue.md @@ -0,0 +1,16 @@ +# # DefaultValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**array_string_enum_ref_default** | [**\OpenAPI\Client\Model\StringEnumRef[]**](StringEnumRef.md) | | [optional] +**array_string_enum_default** | **string[]** | | [optional] +**array_string_default** | **string[]** | | [optional] +**array_integer_default** | **int[]** | | [optional] +**array_string** | **string[]** | | [optional] +**array_string_nullable** | **string[]** | | [optional] +**array_string_extension_nullable** | **string[]** | | [optional] +**string_nullable** | **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/echo_api/php-nextgen/docs/Model/NumberPropertiesOnly.md b/samples/client/echo_api/php-nextgen/docs/Model/NumberPropertiesOnly.md new file mode 100644 index 000000000000..e6ea27f9be3c --- /dev/null +++ b/samples/client/echo_api/php-nextgen/docs/Model/NumberPropertiesOnly.md @@ -0,0 +1,11 @@ +# # NumberPropertiesOnly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number** | **float** | | [optional] +**float** | **float** | | [optional] +**double** | **float** | | [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/echo_api/php-nextgen/docs/Model/Pet.md b/samples/client/echo_api/php-nextgen/docs/Model/Pet.md new file mode 100644 index 000000000000..833b1a761af9 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/docs/Model/Pet.md @@ -0,0 +1,14 @@ +# # Pet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **string** | | +**category** | [**\OpenAPI\Client\Model\Category**](Category.md) | | [optional] +**photo_urls** | **string[]** | | +**tags** | [**\OpenAPI\Client\Model\Tag[]**](Tag.md) | | [optional] +**status** | **string** | pet status in the store | [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/echo_api/php-nextgen/docs/Model/Query.md b/samples/client/echo_api/php-nextgen/docs/Model/Query.md new file mode 100644 index 000000000000..342a9f8ffb1e --- /dev/null +++ b/samples/client/echo_api/php-nextgen/docs/Model/Query.md @@ -0,0 +1,10 @@ +# # Query + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Query | [optional] +**outcomes** | **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/echo_api/php-nextgen/docs/Model/StringEnumRef.md b/samples/client/echo_api/php-nextgen/docs/Model/StringEnumRef.md new file mode 100644 index 000000000000..71ea837b8ed6 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/docs/Model/StringEnumRef.md @@ -0,0 +1,8 @@ +# # StringEnumRef + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/echo_api/php-nextgen/docs/Model/Tag.md b/samples/client/echo_api/php-nextgen/docs/Model/Tag.md new file mode 100644 index 000000000000..4cf7084738b0 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/docs/Model/Tag.md @@ -0,0 +1,10 @@ +# # Tag + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **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/echo_api/php-nextgen/docs/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md b/samples/client/echo_api/php-nextgen/docs/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md new file mode 100644 index 000000000000..c68f7a620bc5 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/docs/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md @@ -0,0 +1,12 @@ +# # TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**size** | **string** | | [optional] +**color** | **string** | | [optional] +**id** | **int** | | [optional] +**name** | **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/echo_api/php-nextgen/docs/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md b/samples/client/echo_api/php-nextgen/docs/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md new file mode 100644 index 000000000000..f91817fe7769 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/docs/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md @@ -0,0 +1,9 @@ +# # TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**values** | **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/echo_api/php-nextgen/git_push.sh b/samples/client/echo_api/php-nextgen/git_push.sh new file mode 100644 index 000000000000..f53a75d4fabe --- /dev/null +++ b/samples/client/echo_api/php-nextgen/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/echo_api/php-nextgen/phpunit.xml.dist b/samples/client/echo_api/php-nextgen/phpunit.xml.dist new file mode 100644 index 000000000000..1135449a8d9b --- /dev/null +++ b/samples/client/echo_api/php-nextgen/phpunit.xml.dist @@ -0,0 +1,18 @@ + + + + + ./src/Api + ./src/Model + + + + + ./tests/Api + ./tests/Model + + + + + + diff --git a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php new file mode 100644 index 000000000000..30ae128d7e18 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php @@ -0,0 +1,411 @@ + [ + 'application/json', + ], + ]; + +/** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ClientInterface $client = null, + Configuration $config = null, + HeaderSelector $selector = null, + $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation testAuthHttpBasic + * + * To test HTTP basic authentication + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBasic'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testAuthHttpBasic(string $contentType = self::contentTypes['testAuthHttpBasic'][0]) + { + list($response) = $this->testAuthHttpBasicWithHttpInfo($contentType); + return $response; + } + + /** + * Operation testAuthHttpBasicWithHttpInfo + * + * To test HTTP basic authentication + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBasic'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testAuthHttpBasicWithHttpInfo(string $contentType = self::contentTypes['testAuthHttpBasic'][0]) + { + $request = $this->testAuthHttpBasicRequest($contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testAuthHttpBasicAsync + * + * To test HTTP basic authentication + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBasic'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testAuthHttpBasicAsync(string $contentType = self::contentTypes['testAuthHttpBasic'][0]) + { + return $this->testAuthHttpBasicAsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testAuthHttpBasicAsyncWithHttpInfo + * + * To test HTTP basic authentication + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBasic'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testAuthHttpBasicAsyncWithHttpInfo(string $contentType = self::contentTypes['testAuthHttpBasic'][0]) + { + $returnType = 'string'; + $request = $this->testAuthHttpBasicRequest($contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testAuthHttpBasic' + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testAuthHttpBasic'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testAuthHttpBasicRequest(string $contentType = self::contentTypes['testAuthHttpBasic'][0]) + { + + + $resourcePath = '/auth/http/basic'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php new file mode 100644 index 000000000000..8456fd77969f --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php @@ -0,0 +1,2092 @@ + [ + 'application/json', + ], + 'testBodyApplicationOctetstreamBinary' => [ + 'application/octet-stream', + ], + 'testBodyMultipartFormdataArrayOfBinary' => [ + 'multipart/form-data', + ], + 'testEchoBodyFreeFormObjectResponseString' => [ + 'application/json', + ], + 'testEchoBodyPet' => [ + 'application/json', + ], + 'testEchoBodyPetResponseString' => [ + 'application/json', + ], + 'testEchoBodyTagResponseString' => [ + 'application/json', + ], + ]; + +/** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ClientInterface $client = null, + Configuration $config = null, + HeaderSelector $selector = null, + $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation testBinaryGif + * + * Test binary (gif) response body + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBinaryGif'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \SplFileObject + */ + public function testBinaryGif(string $contentType = self::contentTypes['testBinaryGif'][0]) + { + list($response) = $this->testBinaryGifWithHttpInfo($contentType); + return $response; + } + + /** + * Operation testBinaryGifWithHttpInfo + * + * Test binary (gif) response body + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBinaryGif'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \SplFileObject, HTTP status code, HTTP response headers (array of strings) + */ + public function testBinaryGifWithHttpInfo(string $contentType = self::contentTypes['testBinaryGif'][0]) + { + $request = $this->testBinaryGifRequest($contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\SplFileObject' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\SplFileObject' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\SplFileObject', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\SplFileObject'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SplFileObject', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testBinaryGifAsync + * + * Test binary (gif) response body + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBinaryGif'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testBinaryGifAsync(string $contentType = self::contentTypes['testBinaryGif'][0]) + { + return $this->testBinaryGifAsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testBinaryGifAsyncWithHttpInfo + * + * Test binary (gif) response body + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBinaryGif'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testBinaryGifAsyncWithHttpInfo(string $contentType = self::contentTypes['testBinaryGif'][0]) + { + $returnType = '\SplFileObject'; + $request = $this->testBinaryGifRequest($contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testBinaryGif' + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBinaryGif'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testBinaryGifRequest(string $contentType = self::contentTypes['testBinaryGif'][0]) + { + + + $resourcePath = '/binary/gif'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['image/gif', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation testBodyApplicationOctetstreamBinary + * + * Test body parameter(s) + * + * @param \SplFileObject $body body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBodyApplicationOctetstreamBinary'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testBodyApplicationOctetstreamBinary($body = null, string $contentType = self::contentTypes['testBodyApplicationOctetstreamBinary'][0]) + { + list($response) = $this->testBodyApplicationOctetstreamBinaryWithHttpInfo($body, $contentType); + return $response; + } + + /** + * Operation testBodyApplicationOctetstreamBinaryWithHttpInfo + * + * Test body parameter(s) + * + * @param \SplFileObject $body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBodyApplicationOctetstreamBinary'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testBodyApplicationOctetstreamBinaryWithHttpInfo($body = null, string $contentType = self::contentTypes['testBodyApplicationOctetstreamBinary'][0]) + { + $request = $this->testBodyApplicationOctetstreamBinaryRequest($body, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testBodyApplicationOctetstreamBinaryAsync + * + * Test body parameter(s) + * + * @param \SplFileObject $body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBodyApplicationOctetstreamBinary'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testBodyApplicationOctetstreamBinaryAsync($body = null, string $contentType = self::contentTypes['testBodyApplicationOctetstreamBinary'][0]) + { + return $this->testBodyApplicationOctetstreamBinaryAsyncWithHttpInfo($body, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testBodyApplicationOctetstreamBinaryAsyncWithHttpInfo + * + * Test body parameter(s) + * + * @param \SplFileObject $body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBodyApplicationOctetstreamBinary'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testBodyApplicationOctetstreamBinaryAsyncWithHttpInfo($body = null, string $contentType = self::contentTypes['testBodyApplicationOctetstreamBinary'][0]) + { + $returnType = 'string'; + $request = $this->testBodyApplicationOctetstreamBinaryRequest($body, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testBodyApplicationOctetstreamBinary' + * + * @param \SplFileObject $body (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBodyApplicationOctetstreamBinary'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testBodyApplicationOctetstreamBinaryRequest($body = null, string $contentType = self::contentTypes['testBodyApplicationOctetstreamBinary'][0]) + { + + + + $resourcePath = '/body/application/octetstream/binary'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($body)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + } else { + $httpBody = $body; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation testBodyMultipartFormdataArrayOfBinary + * + * Test array of binary in multipart mime + * + * @param \SplFileObject[] $files files (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBodyMultipartFormdataArrayOfBinary'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testBodyMultipartFormdataArrayOfBinary($files, string $contentType = self::contentTypes['testBodyMultipartFormdataArrayOfBinary'][0]) + { + list($response) = $this->testBodyMultipartFormdataArrayOfBinaryWithHttpInfo($files, $contentType); + return $response; + } + + /** + * Operation testBodyMultipartFormdataArrayOfBinaryWithHttpInfo + * + * Test array of binary in multipart mime + * + * @param \SplFileObject[] $files (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBodyMultipartFormdataArrayOfBinary'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testBodyMultipartFormdataArrayOfBinaryWithHttpInfo($files, string $contentType = self::contentTypes['testBodyMultipartFormdataArrayOfBinary'][0]) + { + $request = $this->testBodyMultipartFormdataArrayOfBinaryRequest($files, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testBodyMultipartFormdataArrayOfBinaryAsync + * + * Test array of binary in multipart mime + * + * @param \SplFileObject[] $files (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBodyMultipartFormdataArrayOfBinary'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testBodyMultipartFormdataArrayOfBinaryAsync($files, string $contentType = self::contentTypes['testBodyMultipartFormdataArrayOfBinary'][0]) + { + return $this->testBodyMultipartFormdataArrayOfBinaryAsyncWithHttpInfo($files, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testBodyMultipartFormdataArrayOfBinaryAsyncWithHttpInfo + * + * Test array of binary in multipart mime + * + * @param \SplFileObject[] $files (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBodyMultipartFormdataArrayOfBinary'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testBodyMultipartFormdataArrayOfBinaryAsyncWithHttpInfo($files, string $contentType = self::contentTypes['testBodyMultipartFormdataArrayOfBinary'][0]) + { + $returnType = 'string'; + $request = $this->testBodyMultipartFormdataArrayOfBinaryRequest($files, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testBodyMultipartFormdataArrayOfBinary' + * + * @param \SplFileObject[] $files (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBodyMultipartFormdataArrayOfBinary'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testBodyMultipartFormdataArrayOfBinaryRequest($files, string $contentType = self::contentTypes['testBodyMultipartFormdataArrayOfBinary'][0]) + { + + // verify the required parameter 'files' is set + if ($files === null || (is_array($files) && count($files) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $files when calling testBodyMultipartFormdataArrayOfBinary' + ); + } + + + $resourcePath = '/body/application/octetstream/array_of_binary'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + // form params + if ($files !== null) { + $multipart = true; + $formParams['files'] = []; + $paramFiles = is_array($files) ? $files : [$files]; + foreach ($paramFiles as $paramFile) { + $formParams['files'][] = \GuzzleHttp\Psr7\Utils::tryFopen( + ObjectSerializer::toFormValue($paramFile), + 'rb' + ); + } + } + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation testEchoBodyFreeFormObjectResponseString + * + * Test free form object + * + * @param object $body Free form object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyFreeFormObjectResponseString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testEchoBodyFreeFormObjectResponseString($body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0]) + { + list($response) = $this->testEchoBodyFreeFormObjectResponseStringWithHttpInfo($body, $contentType); + return $response; + } + + /** + * Operation testEchoBodyFreeFormObjectResponseStringWithHttpInfo + * + * Test free form object + * + * @param object $body Free form object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyFreeFormObjectResponseString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testEchoBodyFreeFormObjectResponseStringWithHttpInfo($body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0]) + { + $request = $this->testEchoBodyFreeFormObjectResponseStringRequest($body, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testEchoBodyFreeFormObjectResponseStringAsync + * + * Test free form object + * + * @param object $body Free form object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyFreeFormObjectResponseString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testEchoBodyFreeFormObjectResponseStringAsync($body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0]) + { + return $this->testEchoBodyFreeFormObjectResponseStringAsyncWithHttpInfo($body, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testEchoBodyFreeFormObjectResponseStringAsyncWithHttpInfo + * + * Test free form object + * + * @param object $body Free form object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyFreeFormObjectResponseString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testEchoBodyFreeFormObjectResponseStringAsyncWithHttpInfo($body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0]) + { + $returnType = 'string'; + $request = $this->testEchoBodyFreeFormObjectResponseStringRequest($body, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testEchoBodyFreeFormObjectResponseString' + * + * @param object $body Free form object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyFreeFormObjectResponseString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testEchoBodyFreeFormObjectResponseStringRequest($body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0]) + { + + + + $resourcePath = '/echo/body/FreeFormObject/response_string'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($body)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + } else { + $httpBody = $body; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation testEchoBodyPet + * + * Test body parameter(s) + * + * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyPet'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\Pet + */ + public function testEchoBodyPet($pet = null, string $contentType = self::contentTypes['testEchoBodyPet'][0]) + { + list($response) = $this->testEchoBodyPetWithHttpInfo($pet, $contentType); + return $response; + } + + /** + * Operation testEchoBodyPetWithHttpInfo + * + * Test body parameter(s) + * + * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyPet'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\Pet, HTTP status code, HTTP response headers (array of strings) + */ + public function testEchoBodyPetWithHttpInfo($pet = null, string $contentType = self::contentTypes['testEchoBodyPet'][0]) + { + $request = $this->testEchoBodyPetRequest($pet, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\OpenAPI\Client\Model\Pet' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\Pet' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\Pet', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\OpenAPI\Client\Model\Pet'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\Pet', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testEchoBodyPetAsync + * + * Test body parameter(s) + * + * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyPet'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testEchoBodyPetAsync($pet = null, string $contentType = self::contentTypes['testEchoBodyPet'][0]) + { + return $this->testEchoBodyPetAsyncWithHttpInfo($pet, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testEchoBodyPetAsyncWithHttpInfo + * + * Test body parameter(s) + * + * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyPet'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testEchoBodyPetAsyncWithHttpInfo($pet = null, string $contentType = self::contentTypes['testEchoBodyPet'][0]) + { + $returnType = '\OpenAPI\Client\Model\Pet'; + $request = $this->testEchoBodyPetRequest($pet, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testEchoBodyPet' + * + * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyPet'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testEchoBodyPetRequest($pet = null, string $contentType = self::contentTypes['testEchoBodyPet'][0]) + { + + + + $resourcePath = '/echo/body/Pet'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($pet)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($pet)); + } else { + $httpBody = $pet; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation testEchoBodyPetResponseString + * + * Test empty response body + * + * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyPetResponseString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testEchoBodyPetResponseString($pet = null, string $contentType = self::contentTypes['testEchoBodyPetResponseString'][0]) + { + list($response) = $this->testEchoBodyPetResponseStringWithHttpInfo($pet, $contentType); + return $response; + } + + /** + * Operation testEchoBodyPetResponseStringWithHttpInfo + * + * Test empty response body + * + * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyPetResponseString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testEchoBodyPetResponseStringWithHttpInfo($pet = null, string $contentType = self::contentTypes['testEchoBodyPetResponseString'][0]) + { + $request = $this->testEchoBodyPetResponseStringRequest($pet, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testEchoBodyPetResponseStringAsync + * + * Test empty response body + * + * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyPetResponseString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testEchoBodyPetResponseStringAsync($pet = null, string $contentType = self::contentTypes['testEchoBodyPetResponseString'][0]) + { + return $this->testEchoBodyPetResponseStringAsyncWithHttpInfo($pet, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testEchoBodyPetResponseStringAsyncWithHttpInfo + * + * Test empty response body + * + * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyPetResponseString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testEchoBodyPetResponseStringAsyncWithHttpInfo($pet = null, string $contentType = self::contentTypes['testEchoBodyPetResponseString'][0]) + { + $returnType = 'string'; + $request = $this->testEchoBodyPetResponseStringRequest($pet, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testEchoBodyPetResponseString' + * + * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyPetResponseString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testEchoBodyPetResponseStringRequest($pet = null, string $contentType = self::contentTypes['testEchoBodyPetResponseString'][0]) + { + + + + $resourcePath = '/echo/body/Pet/response_string'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($pet)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($pet)); + } else { + $httpBody = $pet; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation testEchoBodyTagResponseString + * + * Test empty json (request body) + * + * @param \OpenAPI\Client\Model\Tag $tag Tag object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyTagResponseString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testEchoBodyTagResponseString($tag = null, string $contentType = self::contentTypes['testEchoBodyTagResponseString'][0]) + { + list($response) = $this->testEchoBodyTagResponseStringWithHttpInfo($tag, $contentType); + return $response; + } + + /** + * Operation testEchoBodyTagResponseStringWithHttpInfo + * + * Test empty json (request body) + * + * @param \OpenAPI\Client\Model\Tag $tag Tag object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyTagResponseString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testEchoBodyTagResponseStringWithHttpInfo($tag = null, string $contentType = self::contentTypes['testEchoBodyTagResponseString'][0]) + { + $request = $this->testEchoBodyTagResponseStringRequest($tag, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testEchoBodyTagResponseStringAsync + * + * Test empty json (request body) + * + * @param \OpenAPI\Client\Model\Tag $tag Tag object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyTagResponseString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testEchoBodyTagResponseStringAsync($tag = null, string $contentType = self::contentTypes['testEchoBodyTagResponseString'][0]) + { + return $this->testEchoBodyTagResponseStringAsyncWithHttpInfo($tag, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testEchoBodyTagResponseStringAsyncWithHttpInfo + * + * Test empty json (request body) + * + * @param \OpenAPI\Client\Model\Tag $tag Tag object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyTagResponseString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testEchoBodyTagResponseStringAsyncWithHttpInfo($tag = null, string $contentType = self::contentTypes['testEchoBodyTagResponseString'][0]) + { + $returnType = 'string'; + $request = $this->testEchoBodyTagResponseStringRequest($tag, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testEchoBodyTagResponseString' + * + * @param \OpenAPI\Client\Model\Tag $tag Tag object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEchoBodyTagResponseString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testEchoBodyTagResponseStringRequest($tag = null, string $contentType = self::contentTypes['testEchoBodyTagResponseString'][0]) + { + + + + $resourcePath = '/echo/body/Tag/response_string'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($tag)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($tag)); + } else { + $httpBody = $tag; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/samples/client/echo_api/php-nextgen/src/Api/FormApi.php b/samples/client/echo_api/php-nextgen/src/Api/FormApi.php new file mode 100644 index 000000000000..5c2a2d000272 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/Api/FormApi.php @@ -0,0 +1,763 @@ + [ + 'application/x-www-form-urlencoded', + ], + 'testFormOneof' => [ + 'application/x-www-form-urlencoded', + ], + ]; + +/** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ClientInterface $client = null, + Configuration $config = null, + HeaderSelector $selector = null, + $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation testFormIntegerBooleanString + * + * Test form parameter(s) + * + * @param int $integer_form integer_form (optional) + * @param bool $boolean_form boolean_form (optional) + * @param string $string_form string_form (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testFormIntegerBooleanString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testFormIntegerBooleanString($integer_form = null, $boolean_form = null, $string_form = null, string $contentType = self::contentTypes['testFormIntegerBooleanString'][0]) + { + list($response) = $this->testFormIntegerBooleanStringWithHttpInfo($integer_form, $boolean_form, $string_form, $contentType); + return $response; + } + + /** + * Operation testFormIntegerBooleanStringWithHttpInfo + * + * Test form parameter(s) + * + * @param int $integer_form (optional) + * @param bool $boolean_form (optional) + * @param string $string_form (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testFormIntegerBooleanString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testFormIntegerBooleanStringWithHttpInfo($integer_form = null, $boolean_form = null, $string_form = null, string $contentType = self::contentTypes['testFormIntegerBooleanString'][0]) + { + $request = $this->testFormIntegerBooleanStringRequest($integer_form, $boolean_form, $string_form, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testFormIntegerBooleanStringAsync + * + * Test form parameter(s) + * + * @param int $integer_form (optional) + * @param bool $boolean_form (optional) + * @param string $string_form (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testFormIntegerBooleanString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testFormIntegerBooleanStringAsync($integer_form = null, $boolean_form = null, $string_form = null, string $contentType = self::contentTypes['testFormIntegerBooleanString'][0]) + { + return $this->testFormIntegerBooleanStringAsyncWithHttpInfo($integer_form, $boolean_form, $string_form, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testFormIntegerBooleanStringAsyncWithHttpInfo + * + * Test form parameter(s) + * + * @param int $integer_form (optional) + * @param bool $boolean_form (optional) + * @param string $string_form (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testFormIntegerBooleanString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testFormIntegerBooleanStringAsyncWithHttpInfo($integer_form = null, $boolean_form = null, $string_form = null, string $contentType = self::contentTypes['testFormIntegerBooleanString'][0]) + { + $returnType = 'string'; + $request = $this->testFormIntegerBooleanStringRequest($integer_form, $boolean_form, $string_form, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testFormIntegerBooleanString' + * + * @param int $integer_form (optional) + * @param bool $boolean_form (optional) + * @param string $string_form (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testFormIntegerBooleanString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testFormIntegerBooleanStringRequest($integer_form = null, $boolean_form = null, $string_form = null, string $contentType = self::contentTypes['testFormIntegerBooleanString'][0]) + { + + + + + + $resourcePath = '/form/integer/boolean/string'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + // form params + if ($integer_form !== null) { + $formParams['integer_form'] = ObjectSerializer::toFormValue($integer_form); + } + // form params + if ($boolean_form !== null) { + $formParams['boolean_form'] = ObjectSerializer::toFormValue($boolean_form); + } + // form params + if ($string_form !== null) { + $formParams['string_form'] = ObjectSerializer::toFormValue($string_form); + } + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation testFormOneof + * + * Test form parameter(s) for oneOf schema + * + * @param string $form1 form1 (optional) + * @param int $form2 form2 (optional) + * @param string $form3 form3 (optional) + * @param bool $form4 form4 (optional) + * @param int $id id (optional) + * @param string $name name (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testFormOneof'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testFormOneof($form1 = null, $form2 = null, $form3 = null, $form4 = null, $id = null, $name = null, string $contentType = self::contentTypes['testFormOneof'][0]) + { + list($response) = $this->testFormOneofWithHttpInfo($form1, $form2, $form3, $form4, $id, $name, $contentType); + return $response; + } + + /** + * Operation testFormOneofWithHttpInfo + * + * Test form parameter(s) for oneOf schema + * + * @param string $form1 (optional) + * @param int $form2 (optional) + * @param string $form3 (optional) + * @param bool $form4 (optional) + * @param int $id (optional) + * @param string $name (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testFormOneof'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testFormOneofWithHttpInfo($form1 = null, $form2 = null, $form3 = null, $form4 = null, $id = null, $name = null, string $contentType = self::contentTypes['testFormOneof'][0]) + { + $request = $this->testFormOneofRequest($form1, $form2, $form3, $form4, $id, $name, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testFormOneofAsync + * + * Test form parameter(s) for oneOf schema + * + * @param string $form1 (optional) + * @param int $form2 (optional) + * @param string $form3 (optional) + * @param bool $form4 (optional) + * @param int $id (optional) + * @param string $name (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testFormOneof'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testFormOneofAsync($form1 = null, $form2 = null, $form3 = null, $form4 = null, $id = null, $name = null, string $contentType = self::contentTypes['testFormOneof'][0]) + { + return $this->testFormOneofAsyncWithHttpInfo($form1, $form2, $form3, $form4, $id, $name, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testFormOneofAsyncWithHttpInfo + * + * Test form parameter(s) for oneOf schema + * + * @param string $form1 (optional) + * @param int $form2 (optional) + * @param string $form3 (optional) + * @param bool $form4 (optional) + * @param int $id (optional) + * @param string $name (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testFormOneof'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testFormOneofAsyncWithHttpInfo($form1 = null, $form2 = null, $form3 = null, $form4 = null, $id = null, $name = null, string $contentType = self::contentTypes['testFormOneof'][0]) + { + $returnType = 'string'; + $request = $this->testFormOneofRequest($form1, $form2, $form3, $form4, $id, $name, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testFormOneof' + * + * @param string $form1 (optional) + * @param int $form2 (optional) + * @param string $form3 (optional) + * @param bool $form4 (optional) + * @param int $id (optional) + * @param string $name (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testFormOneof'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testFormOneofRequest($form1 = null, $form2 = null, $form3 = null, $form4 = null, $id = null, $name = null, string $contentType = self::contentTypes['testFormOneof'][0]) + { + + + + + + + + + $resourcePath = '/form/oneof'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + // form params + if ($form1 !== null) { + $formParams['form1'] = ObjectSerializer::toFormValue($form1); + } + // form params + if ($form2 !== null) { + $formParams['form2'] = ObjectSerializer::toFormValue($form2); + } + // form params + if ($form3 !== null) { + $formParams['form3'] = ObjectSerializer::toFormValue($form3); + } + // form params + if ($form4 !== null) { + $formParams['form4'] = ObjectSerializer::toFormValue($form4); + } + // form params + if ($id !== null) { + $formParams['id'] = ObjectSerializer::toFormValue($id); + } + // form params + if ($name !== null) { + $formParams['name'] = ObjectSerializer::toFormValue($name); + } + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php new file mode 100644 index 000000000000..3f6f1a0da6bb --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php @@ -0,0 +1,437 @@ + [ + 'application/json', + ], + ]; + +/** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ClientInterface $client = null, + Configuration $config = null, + HeaderSelector $selector = null, + $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation testHeaderIntegerBooleanString + * + * Test header parameter(s) + * + * @param int $integer_header integer_header (optional) + * @param bool $boolean_header boolean_header (optional) + * @param string $string_header string_header (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testHeaderIntegerBooleanString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testHeaderIntegerBooleanString($integer_header = null, $boolean_header = null, $string_header = null, string $contentType = self::contentTypes['testHeaderIntegerBooleanString'][0]) + { + list($response) = $this->testHeaderIntegerBooleanStringWithHttpInfo($integer_header, $boolean_header, $string_header, $contentType); + return $response; + } + + /** + * Operation testHeaderIntegerBooleanStringWithHttpInfo + * + * Test header parameter(s) + * + * @param int $integer_header (optional) + * @param bool $boolean_header (optional) + * @param string $string_header (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testHeaderIntegerBooleanString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testHeaderIntegerBooleanStringWithHttpInfo($integer_header = null, $boolean_header = null, $string_header = null, string $contentType = self::contentTypes['testHeaderIntegerBooleanString'][0]) + { + $request = $this->testHeaderIntegerBooleanStringRequest($integer_header, $boolean_header, $string_header, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testHeaderIntegerBooleanStringAsync + * + * Test header parameter(s) + * + * @param int $integer_header (optional) + * @param bool $boolean_header (optional) + * @param string $string_header (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testHeaderIntegerBooleanString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testHeaderIntegerBooleanStringAsync($integer_header = null, $boolean_header = null, $string_header = null, string $contentType = self::contentTypes['testHeaderIntegerBooleanString'][0]) + { + return $this->testHeaderIntegerBooleanStringAsyncWithHttpInfo($integer_header, $boolean_header, $string_header, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testHeaderIntegerBooleanStringAsyncWithHttpInfo + * + * Test header parameter(s) + * + * @param int $integer_header (optional) + * @param bool $boolean_header (optional) + * @param string $string_header (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testHeaderIntegerBooleanString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testHeaderIntegerBooleanStringAsyncWithHttpInfo($integer_header = null, $boolean_header = null, $string_header = null, string $contentType = self::contentTypes['testHeaderIntegerBooleanString'][0]) + { + $returnType = 'string'; + $request = $this->testHeaderIntegerBooleanStringRequest($integer_header, $boolean_header, $string_header, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testHeaderIntegerBooleanString' + * + * @param int $integer_header (optional) + * @param bool $boolean_header (optional) + * @param string $string_header (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testHeaderIntegerBooleanString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testHeaderIntegerBooleanStringRequest($integer_header = null, $boolean_header = null, $string_header = null, string $contentType = self::contentTypes['testHeaderIntegerBooleanString'][0]) + { + + + + + + $resourcePath = '/header/integer/boolean/string'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + if ($integer_header !== null) { + $headerParams['integer_header'] = ObjectSerializer::toHeaderValue($integer_header); + } + // header params + if ($boolean_header !== null) { + $headerParams['boolean_header'] = ObjectSerializer::toHeaderValue($boolean_header); + } + // header params + if ($string_header !== null) { + $headerParams['string_header'] = ObjectSerializer::toHeaderValue($string_header); + } + + + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php new file mode 100644 index 000000000000..c745e61ca330 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php @@ -0,0 +1,447 @@ + [ + 'application/json', + ], + ]; + +/** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ClientInterface $client = null, + Configuration $config = null, + HeaderSelector $selector = null, + $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation testsPathStringPathStringIntegerPathInteger + * + * Test path parameter(s) + * + * @param string $path_string path_string (required) + * @param int $path_integer path_integer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testsPathStringPathStringIntegerPathInteger'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testsPathStringPathStringIntegerPathInteger($path_string, $path_integer, string $contentType = self::contentTypes['testsPathStringPathStringIntegerPathInteger'][0]) + { + list($response) = $this->testsPathStringPathStringIntegerPathIntegerWithHttpInfo($path_string, $path_integer, $contentType); + return $response; + } + + /** + * Operation testsPathStringPathStringIntegerPathIntegerWithHttpInfo + * + * Test path parameter(s) + * + * @param string $path_string (required) + * @param int $path_integer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testsPathStringPathStringIntegerPathInteger'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testsPathStringPathStringIntegerPathIntegerWithHttpInfo($path_string, $path_integer, string $contentType = self::contentTypes['testsPathStringPathStringIntegerPathInteger'][0]) + { + $request = $this->testsPathStringPathStringIntegerPathIntegerRequest($path_string, $path_integer, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testsPathStringPathStringIntegerPathIntegerAsync + * + * Test path parameter(s) + * + * @param string $path_string (required) + * @param int $path_integer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testsPathStringPathStringIntegerPathInteger'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testsPathStringPathStringIntegerPathIntegerAsync($path_string, $path_integer, string $contentType = self::contentTypes['testsPathStringPathStringIntegerPathInteger'][0]) + { + return $this->testsPathStringPathStringIntegerPathIntegerAsyncWithHttpInfo($path_string, $path_integer, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testsPathStringPathStringIntegerPathIntegerAsyncWithHttpInfo + * + * Test path parameter(s) + * + * @param string $path_string (required) + * @param int $path_integer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testsPathStringPathStringIntegerPathInteger'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testsPathStringPathStringIntegerPathIntegerAsyncWithHttpInfo($path_string, $path_integer, string $contentType = self::contentTypes['testsPathStringPathStringIntegerPathInteger'][0]) + { + $returnType = 'string'; + $request = $this->testsPathStringPathStringIntegerPathIntegerRequest($path_string, $path_integer, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testsPathStringPathStringIntegerPathInteger' + * + * @param string $path_string (required) + * @param int $path_integer (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testsPathStringPathStringIntegerPathInteger'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testsPathStringPathStringIntegerPathIntegerRequest($path_string, $path_integer, string $contentType = self::contentTypes['testsPathStringPathStringIntegerPathInteger'][0]) + { + + // verify the required parameter 'path_string' is set + if ($path_string === null || (is_array($path_string) && count($path_string) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $path_string when calling testsPathStringPathStringIntegerPathInteger' + ); + } + + // verify the required parameter 'path_integer' is set + if ($path_integer === null || (is_array($path_integer) && count($path_integer) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $path_integer when calling testsPathStringPathStringIntegerPathInteger' + ); + } + + + $resourcePath = '/path/string/{path_string}/integer/{path_integer}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($path_string !== null) { + $resourcePath = str_replace( + '{' . 'path_string' . '}', + ObjectSerializer::toPathValue($path_string), + $resourcePath + ); + } + // path params + if ($path_integer !== null) { + $resourcePath = str_replace( + '{' . 'path_integer' . '}', + ObjectSerializer::toPathValue($path_integer), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php new file mode 100644 index 000000000000..45e2df0f3fb8 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php @@ -0,0 +1,2449 @@ + [ + 'application/json', + ], + 'testQueryDatetimeDateString' => [ + 'application/json', + ], + 'testQueryIntegerBooleanString' => [ + 'application/json', + ], + 'testQueryStyleDeepObjectExplodeTrueObject' => [ + 'application/json', + ], + 'testQueryStyleDeepObjectExplodeTrueObjectAllOf' => [ + 'application/json', + ], + 'testQueryStyleFormExplodeTrueArrayString' => [ + 'application/json', + ], + 'testQueryStyleFormExplodeTrueObject' => [ + 'application/json', + ], + 'testQueryStyleFormExplodeTrueObjectAllOf' => [ + 'application/json', + ], + ]; + +/** + * @param ClientInterface $client + * @param Configuration $config + * @param HeaderSelector $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ClientInterface $client = null, + Configuration $config = null, + HeaderSelector $selector = null, + $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation testEnumRefString + * + * Test query parameter(s) + * + * @param StringEnumRef $enum_ref_string_query enum_ref_string_query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEnumRefString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testEnumRefString($enum_ref_string_query = null, string $contentType = self::contentTypes['testEnumRefString'][0]) + { + list($response) = $this->testEnumRefStringWithHttpInfo($enum_ref_string_query, $contentType); + return $response; + } + + /** + * Operation testEnumRefStringWithHttpInfo + * + * Test query parameter(s) + * + * @param StringEnumRef $enum_ref_string_query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEnumRefString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testEnumRefStringWithHttpInfo($enum_ref_string_query = null, string $contentType = self::contentTypes['testEnumRefString'][0]) + { + $request = $this->testEnumRefStringRequest($enum_ref_string_query, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testEnumRefStringAsync + * + * Test query parameter(s) + * + * @param StringEnumRef $enum_ref_string_query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEnumRefString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testEnumRefStringAsync($enum_ref_string_query = null, string $contentType = self::contentTypes['testEnumRefString'][0]) + { + return $this->testEnumRefStringAsyncWithHttpInfo($enum_ref_string_query, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testEnumRefStringAsyncWithHttpInfo + * + * Test query parameter(s) + * + * @param StringEnumRef $enum_ref_string_query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEnumRefString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testEnumRefStringAsyncWithHttpInfo($enum_ref_string_query = null, string $contentType = self::contentTypes['testEnumRefString'][0]) + { + $returnType = 'string'; + $request = $this->testEnumRefStringRequest($enum_ref_string_query, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testEnumRefString' + * + * @param StringEnumRef $enum_ref_string_query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEnumRefString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testEnumRefStringRequest($enum_ref_string_query = null, string $contentType = self::contentTypes['testEnumRefString'][0]) + { + + + + $resourcePath = '/query/enum_ref_string'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $enum_ref_string_query, + 'enum_ref_string_query', // param base name + 'StringEnumRef', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation testQueryDatetimeDateString + * + * Test query parameter(s) + * + * @param \DateTime $datetime_query datetime_query (optional) + * @param \DateTime $date_query date_query (optional) + * @param string $string_query string_query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryDatetimeDateString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testQueryDatetimeDateString($datetime_query = null, $date_query = null, $string_query = null, string $contentType = self::contentTypes['testQueryDatetimeDateString'][0]) + { + list($response) = $this->testQueryDatetimeDateStringWithHttpInfo($datetime_query, $date_query, $string_query, $contentType); + return $response; + } + + /** + * Operation testQueryDatetimeDateStringWithHttpInfo + * + * Test query parameter(s) + * + * @param \DateTime $datetime_query (optional) + * @param \DateTime $date_query (optional) + * @param string $string_query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryDatetimeDateString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testQueryDatetimeDateStringWithHttpInfo($datetime_query = null, $date_query = null, $string_query = null, string $contentType = self::contentTypes['testQueryDatetimeDateString'][0]) + { + $request = $this->testQueryDatetimeDateStringRequest($datetime_query, $date_query, $string_query, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testQueryDatetimeDateStringAsync + * + * Test query parameter(s) + * + * @param \DateTime $datetime_query (optional) + * @param \DateTime $date_query (optional) + * @param string $string_query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryDatetimeDateString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testQueryDatetimeDateStringAsync($datetime_query = null, $date_query = null, $string_query = null, string $contentType = self::contentTypes['testQueryDatetimeDateString'][0]) + { + return $this->testQueryDatetimeDateStringAsyncWithHttpInfo($datetime_query, $date_query, $string_query, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testQueryDatetimeDateStringAsyncWithHttpInfo + * + * Test query parameter(s) + * + * @param \DateTime $datetime_query (optional) + * @param \DateTime $date_query (optional) + * @param string $string_query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryDatetimeDateString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testQueryDatetimeDateStringAsyncWithHttpInfo($datetime_query = null, $date_query = null, $string_query = null, string $contentType = self::contentTypes['testQueryDatetimeDateString'][0]) + { + $returnType = 'string'; + $request = $this->testQueryDatetimeDateStringRequest($datetime_query, $date_query, $string_query, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testQueryDatetimeDateString' + * + * @param \DateTime $datetime_query (optional) + * @param \DateTime $date_query (optional) + * @param string $string_query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryDatetimeDateString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testQueryDatetimeDateStringRequest($datetime_query = null, $date_query = null, $string_query = null, string $contentType = self::contentTypes['testQueryDatetimeDateString'][0]) + { + + + + + + $resourcePath = '/query/datetime/date/string'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $datetime_query, + 'datetime_query', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $date_query, + 'date_query', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $string_query, + 'string_query', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation testQueryIntegerBooleanString + * + * Test query parameter(s) + * + * @param int $integer_query integer_query (optional) + * @param bool $boolean_query boolean_query (optional) + * @param string $string_query string_query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryIntegerBooleanString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testQueryIntegerBooleanString($integer_query = null, $boolean_query = null, $string_query = null, string $contentType = self::contentTypes['testQueryIntegerBooleanString'][0]) + { + list($response) = $this->testQueryIntegerBooleanStringWithHttpInfo($integer_query, $boolean_query, $string_query, $contentType); + return $response; + } + + /** + * Operation testQueryIntegerBooleanStringWithHttpInfo + * + * Test query parameter(s) + * + * @param int $integer_query (optional) + * @param bool $boolean_query (optional) + * @param string $string_query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryIntegerBooleanString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testQueryIntegerBooleanStringWithHttpInfo($integer_query = null, $boolean_query = null, $string_query = null, string $contentType = self::contentTypes['testQueryIntegerBooleanString'][0]) + { + $request = $this->testQueryIntegerBooleanStringRequest($integer_query, $boolean_query, $string_query, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testQueryIntegerBooleanStringAsync + * + * Test query parameter(s) + * + * @param int $integer_query (optional) + * @param bool $boolean_query (optional) + * @param string $string_query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryIntegerBooleanString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testQueryIntegerBooleanStringAsync($integer_query = null, $boolean_query = null, $string_query = null, string $contentType = self::contentTypes['testQueryIntegerBooleanString'][0]) + { + return $this->testQueryIntegerBooleanStringAsyncWithHttpInfo($integer_query, $boolean_query, $string_query, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testQueryIntegerBooleanStringAsyncWithHttpInfo + * + * Test query parameter(s) + * + * @param int $integer_query (optional) + * @param bool $boolean_query (optional) + * @param string $string_query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryIntegerBooleanString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testQueryIntegerBooleanStringAsyncWithHttpInfo($integer_query = null, $boolean_query = null, $string_query = null, string $contentType = self::contentTypes['testQueryIntegerBooleanString'][0]) + { + $returnType = 'string'; + $request = $this->testQueryIntegerBooleanStringRequest($integer_query, $boolean_query, $string_query, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testQueryIntegerBooleanString' + * + * @param int $integer_query (optional) + * @param bool $boolean_query (optional) + * @param string $string_query (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryIntegerBooleanString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testQueryIntegerBooleanStringRequest($integer_query = null, $boolean_query = null, $string_query = null, string $contentType = self::contentTypes['testQueryIntegerBooleanString'][0]) + { + + + + + + $resourcePath = '/query/integer/boolean/string'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $integer_query, + 'integer_query', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $boolean_query, + 'boolean_query', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $string_query, + 'string_query', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation testQueryStyleDeepObjectExplodeTrueObject + * + * Test query parameter(s) + * + * @param Pet $query_object query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleDeepObjectExplodeTrueObject'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testQueryStyleDeepObjectExplodeTrueObject($query_object = null, string $contentType = self::contentTypes['testQueryStyleDeepObjectExplodeTrueObject'][0]) + { + list($response) = $this->testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo($query_object, $contentType); + return $response; + } + + /** + * Operation testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo + * + * Test query parameter(s) + * + * @param Pet $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleDeepObjectExplodeTrueObject'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo($query_object = null, string $contentType = self::contentTypes['testQueryStyleDeepObjectExplodeTrueObject'][0]) + { + $request = $this->testQueryStyleDeepObjectExplodeTrueObjectRequest($query_object, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testQueryStyleDeepObjectExplodeTrueObjectAsync + * + * Test query parameter(s) + * + * @param Pet $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleDeepObjectExplodeTrueObject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testQueryStyleDeepObjectExplodeTrueObjectAsync($query_object = null, string $contentType = self::contentTypes['testQueryStyleDeepObjectExplodeTrueObject'][0]) + { + return $this->testQueryStyleDeepObjectExplodeTrueObjectAsyncWithHttpInfo($query_object, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testQueryStyleDeepObjectExplodeTrueObjectAsyncWithHttpInfo + * + * Test query parameter(s) + * + * @param Pet $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleDeepObjectExplodeTrueObject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testQueryStyleDeepObjectExplodeTrueObjectAsyncWithHttpInfo($query_object = null, string $contentType = self::contentTypes['testQueryStyleDeepObjectExplodeTrueObject'][0]) + { + $returnType = 'string'; + $request = $this->testQueryStyleDeepObjectExplodeTrueObjectRequest($query_object, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testQueryStyleDeepObjectExplodeTrueObject' + * + * @param Pet $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleDeepObjectExplodeTrueObject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testQueryStyleDeepObjectExplodeTrueObjectRequest($query_object = null, string $contentType = self::contentTypes['testQueryStyleDeepObjectExplodeTrueObject'][0]) + { + + + + $resourcePath = '/query/style_deepObject/explode_true/object'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $query_object, + 'query_object', // param base name + 'object', // openApiType + 'deepObject', // style + true, // explode + false // required + ) ?? []); + + + + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation testQueryStyleDeepObjectExplodeTrueObjectAllOf + * + * Test query parameter(s) + * + * @param TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter $query_object query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleDeepObjectExplodeTrueObjectAllOf'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testQueryStyleDeepObjectExplodeTrueObjectAllOf($query_object = null, string $contentType = self::contentTypes['testQueryStyleDeepObjectExplodeTrueObjectAllOf'][0]) + { + list($response) = $this->testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo($query_object, $contentType); + return $response; + } + + /** + * Operation testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo + * + * Test query parameter(s) + * + * @param TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleDeepObjectExplodeTrueObjectAllOf'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo($query_object = null, string $contentType = self::contentTypes['testQueryStyleDeepObjectExplodeTrueObjectAllOf'][0]) + { + $request = $this->testQueryStyleDeepObjectExplodeTrueObjectAllOfRequest($query_object, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testQueryStyleDeepObjectExplodeTrueObjectAllOfAsync + * + * Test query parameter(s) + * + * @param TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleDeepObjectExplodeTrueObjectAllOf'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testQueryStyleDeepObjectExplodeTrueObjectAllOfAsync($query_object = null, string $contentType = self::contentTypes['testQueryStyleDeepObjectExplodeTrueObjectAllOf'][0]) + { + return $this->testQueryStyleDeepObjectExplodeTrueObjectAllOfAsyncWithHttpInfo($query_object, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testQueryStyleDeepObjectExplodeTrueObjectAllOfAsyncWithHttpInfo + * + * Test query parameter(s) + * + * @param TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleDeepObjectExplodeTrueObjectAllOf'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testQueryStyleDeepObjectExplodeTrueObjectAllOfAsyncWithHttpInfo($query_object = null, string $contentType = self::contentTypes['testQueryStyleDeepObjectExplodeTrueObjectAllOf'][0]) + { + $returnType = 'string'; + $request = $this->testQueryStyleDeepObjectExplodeTrueObjectAllOfRequest($query_object, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testQueryStyleDeepObjectExplodeTrueObjectAllOf' + * + * @param TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleDeepObjectExplodeTrueObjectAllOf'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testQueryStyleDeepObjectExplodeTrueObjectAllOfRequest($query_object = null, string $contentType = self::contentTypes['testQueryStyleDeepObjectExplodeTrueObjectAllOf'][0]) + { + + + + $resourcePath = '/query/style_deepObject/explode_true/object/allOf'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $query_object, + 'query_object', // param base name + 'Bird', // openApiType + 'deepObject', // style + true, // explode + false // required + ) ?? []); + + + + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation testQueryStyleFormExplodeTrueArrayString + * + * Test query parameter(s) + * + * @param TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter $query_object query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleFormExplodeTrueArrayString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testQueryStyleFormExplodeTrueArrayString($query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeTrueArrayString'][0]) + { + list($response) = $this->testQueryStyleFormExplodeTrueArrayStringWithHttpInfo($query_object, $contentType); + return $response; + } + + /** + * Operation testQueryStyleFormExplodeTrueArrayStringWithHttpInfo + * + * Test query parameter(s) + * + * @param TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleFormExplodeTrueArrayString'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testQueryStyleFormExplodeTrueArrayStringWithHttpInfo($query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeTrueArrayString'][0]) + { + $request = $this->testQueryStyleFormExplodeTrueArrayStringRequest($query_object, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testQueryStyleFormExplodeTrueArrayStringAsync + * + * Test query parameter(s) + * + * @param TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleFormExplodeTrueArrayString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testQueryStyleFormExplodeTrueArrayStringAsync($query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeTrueArrayString'][0]) + { + return $this->testQueryStyleFormExplodeTrueArrayStringAsyncWithHttpInfo($query_object, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testQueryStyleFormExplodeTrueArrayStringAsyncWithHttpInfo + * + * Test query parameter(s) + * + * @param TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleFormExplodeTrueArrayString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testQueryStyleFormExplodeTrueArrayStringAsyncWithHttpInfo($query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeTrueArrayString'][0]) + { + $returnType = 'string'; + $request = $this->testQueryStyleFormExplodeTrueArrayStringRequest($query_object, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testQueryStyleFormExplodeTrueArrayString' + * + * @param TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleFormExplodeTrueArrayString'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testQueryStyleFormExplodeTrueArrayStringRequest($query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeTrueArrayString'][0]) + { + + + + $resourcePath = '/query/style_form/explode_true/array_string'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $query_object, + 'query_object', // param base name + 'object', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation testQueryStyleFormExplodeTrueObject + * + * Test query parameter(s) + * + * @param Pet $query_object query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleFormExplodeTrueObject'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testQueryStyleFormExplodeTrueObject($query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeTrueObject'][0]) + { + list($response) = $this->testQueryStyleFormExplodeTrueObjectWithHttpInfo($query_object, $contentType); + return $response; + } + + /** + * Operation testQueryStyleFormExplodeTrueObjectWithHttpInfo + * + * Test query parameter(s) + * + * @param Pet $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleFormExplodeTrueObject'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testQueryStyleFormExplodeTrueObjectWithHttpInfo($query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeTrueObject'][0]) + { + $request = $this->testQueryStyleFormExplodeTrueObjectRequest($query_object, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testQueryStyleFormExplodeTrueObjectAsync + * + * Test query parameter(s) + * + * @param Pet $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleFormExplodeTrueObject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testQueryStyleFormExplodeTrueObjectAsync($query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeTrueObject'][0]) + { + return $this->testQueryStyleFormExplodeTrueObjectAsyncWithHttpInfo($query_object, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testQueryStyleFormExplodeTrueObjectAsyncWithHttpInfo + * + * Test query parameter(s) + * + * @param Pet $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleFormExplodeTrueObject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testQueryStyleFormExplodeTrueObjectAsyncWithHttpInfo($query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeTrueObject'][0]) + { + $returnType = 'string'; + $request = $this->testQueryStyleFormExplodeTrueObjectRequest($query_object, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testQueryStyleFormExplodeTrueObject' + * + * @param Pet $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleFormExplodeTrueObject'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testQueryStyleFormExplodeTrueObjectRequest($query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeTrueObject'][0]) + { + + + + $resourcePath = '/query/style_form/explode_true/object'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $query_object, + 'query_object', // param base name + 'object', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation testQueryStyleFormExplodeTrueObjectAllOf + * + * Test query parameter(s) + * + * @param DataQuery $query_object query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleFormExplodeTrueObjectAllOf'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string + */ + public function testQueryStyleFormExplodeTrueObjectAllOf($query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeTrueObjectAllOf'][0]) + { + list($response) = $this->testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo($query_object, $contentType); + return $response; + } + + /** + * Operation testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo + * + * Test query parameter(s) + * + * @param DataQuery $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleFormExplodeTrueObjectAllOf'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo($query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeTrueObjectAllOf'][0]) + { + $request = $this->testQueryStyleFormExplodeTrueObjectAllOfRequest($query_object, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testQueryStyleFormExplodeTrueObjectAllOfAsync + * + * Test query parameter(s) + * + * @param DataQuery $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleFormExplodeTrueObjectAllOf'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testQueryStyleFormExplodeTrueObjectAllOfAsync($query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeTrueObjectAllOf'][0]) + { + return $this->testQueryStyleFormExplodeTrueObjectAllOfAsyncWithHttpInfo($query_object, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testQueryStyleFormExplodeTrueObjectAllOfAsyncWithHttpInfo + * + * Test query parameter(s) + * + * @param DataQuery $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleFormExplodeTrueObjectAllOf'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function testQueryStyleFormExplodeTrueObjectAllOfAsyncWithHttpInfo($query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeTrueObjectAllOf'][0]) + { + $returnType = 'string'; + $request = $this->testQueryStyleFormExplodeTrueObjectAllOfRequest($query_object, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testQueryStyleFormExplodeTrueObjectAllOf' + * + * @param DataQuery $query_object (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testQueryStyleFormExplodeTrueObjectAllOf'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testQueryStyleFormExplodeTrueObjectAllOfRequest($query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeTrueObjectAllOf'][0]) + { + + + + $resourcePath = '/query/style_form/explode_true/object/allOf'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $query_object, + 'query_object', // param base name + 'object', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/samples/client/echo_api/php-nextgen/src/ApiException.php b/samples/client/echo_api/php-nextgen/src/ApiException.php new file mode 100644 index 000000000000..2c3b6e48dbbf --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/ApiException.php @@ -0,0 +1,120 @@ +responseHeaders = $responseHeaders; + $this->responseBody = $responseBody; + } + + /** + * Gets the HTTP response header + * + * @return string[]|null HTTP response header + */ + public function getResponseHeaders() + { + return $this->responseHeaders; + } + + /** + * Gets the HTTP body of the server response either as Json or string + * + * @return \stdClass|string|null HTTP body of the server response either as \stdClass or string + */ + public function getResponseBody() + { + return $this->responseBody; + } + + /** + * Sets the deserialized response object (during deserialization) + * + * @param mixed $obj Deserialized response object + * + * @return void + */ + public function setResponseObject($obj) + { + $this->responseObject = $obj; + } + + /** + * Gets the deserialized response object (during deserialization) + * + * @return mixed the deserialized response object + */ + public function getResponseObject() + { + return $this->responseObject; + } +} diff --git a/samples/client/echo_api/php-nextgen/src/Configuration.php b/samples/client/echo_api/php-nextgen/src/Configuration.php new file mode 100644 index 000000000000..ffb22a3cbeb3 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/Configuration.php @@ -0,0 +1,531 @@ +tempFolderPath = sys_get_temp_dir(); + } + + /** + * Sets API key + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string $key API key or token + * + * @return $this + */ + public function setApiKey($apiKeyIdentifier, $key) + { + $this->apiKeys[$apiKeyIdentifier] = $key; + return $this; + } + + /** + * Gets API key + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * + * @return null|string API key or token + */ + public function getApiKey($apiKeyIdentifier) + { + return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null; + } + + /** + * Sets the prefix for API key (e.g. Bearer) + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string $prefix API key prefix, e.g. Bearer + * + * @return $this + */ + public function setApiKeyPrefix($apiKeyIdentifier, $prefix) + { + $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; + return $this; + } + + /** + * Gets API key prefix + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * + * @return null|string + */ + public function getApiKeyPrefix($apiKeyIdentifier) + { + return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null; + } + + /** + * Sets the access token for OAuth + * + * @param string $accessToken Token for OAuth + * + * @return $this + */ + public function setAccessToken($accessToken) + { + $this->accessToken = $accessToken; + return $this; + } + + /** + * Gets the access token for OAuth + * + * @return string Access token for OAuth + */ + public function getAccessToken() + { + return $this->accessToken; + } + + /** + * Sets boolean format for query string. + * + * @param string $booleanFormatForQueryString Boolean format for query string + * + * @return $this + */ + public function setBooleanFormatForQueryString(string $booleanFormat) + { + $this->booleanFormatForQueryString = $booleanFormat; + + return $this; + } + + /** + * Gets boolean format for query string. + * + * @return string Boolean format for query string + */ + public function getBooleanFormatForQueryString(): string + { + return $this->booleanFormatForQueryString; + } + + /** + * Sets the username for HTTP basic authentication + * + * @param string $username Username for HTTP basic authentication + * + * @return $this + */ + public function setUsername($username) + { + $this->username = $username; + return $this; + } + + /** + * Gets the username for HTTP basic authentication + * + * @return string Username for HTTP basic authentication + */ + public function getUsername() + { + return $this->username; + } + + /** + * Sets the password for HTTP basic authentication + * + * @param string $password Password for HTTP basic authentication + * + * @return $this + */ + public function setPassword($password) + { + $this->password = $password; + return $this; + } + + /** + * Gets the password for HTTP basic authentication + * + * @return string Password for HTTP basic authentication + */ + public function getPassword() + { + return $this->password; + } + + /** + * Sets the host + * + * @param string $host Host + * + * @return $this + */ + public function setHost($host) + { + $this->host = $host; + return $this; + } + + /** + * Gets the host + * + * @return string Host + */ + public function getHost() + { + return $this->host; + } + + /** + * Sets the user agent of the api client + * + * @param string $userAgent the user agent of the api client + * + * @throws \InvalidArgumentException + * @return $this + */ + public function setUserAgent($userAgent) + { + if (!is_string($userAgent)) { + throw new \InvalidArgumentException('User-agent must be a string.'); + } + + $this->userAgent = $userAgent; + return $this; + } + + /** + * Gets the user agent of the api client + * + * @return string user agent + */ + public function getUserAgent() + { + return $this->userAgent; + } + + /** + * Sets debug flag + * + * @param bool $debug Debug flag + * + * @return $this + */ + public function setDebug($debug) + { + $this->debug = $debug; + return $this; + } + + /** + * Gets the debug flag + * + * @return bool + */ + public function getDebug() + { + return $this->debug; + } + + /** + * Sets the debug file + * + * @param string $debugFile Debug file + * + * @return $this + */ + public function setDebugFile($debugFile) + { + $this->debugFile = $debugFile; + return $this; + } + + /** + * Gets the debug file + * + * @return string + */ + public function getDebugFile() + { + return $this->debugFile; + } + + /** + * Sets the temp folder path + * + * @param string $tempFolderPath Temp folder path + * + * @return $this + */ + public function setTempFolderPath($tempFolderPath) + { + $this->tempFolderPath = $tempFolderPath; + return $this; + } + + /** + * Gets the temp folder path + * + * @return string Temp folder path + */ + public function getTempFolderPath() + { + return $this->tempFolderPath; + } + + /** + * Gets the default configuration instance + * + * @return Configuration + */ + public static function getDefaultConfiguration() + { + if (self::$defaultConfiguration === null) { + self::$defaultConfiguration = new Configuration(); + } + + return self::$defaultConfiguration; + } + + /** + * Sets the default configuration instance + * + * @param Configuration $config An instance of the Configuration Object + * + * @return void + */ + public static function setDefaultConfiguration(Configuration $config) + { + self::$defaultConfiguration = $config; + } + + /** + * Gets the essential information for debugging + * + * @return string The report for debugging + */ + public static function toDebugReport() + { + $report = 'PHP SDK (OpenAPI\Client) Debug Report:' . PHP_EOL; + $report .= ' OS: ' . php_uname() . PHP_EOL; + $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; + $report .= ' The version of the OpenAPI document: 0.1.0' . PHP_EOL; + $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; + + return $report; + } + + /** + * Get API key (with prefix if set) + * + * @param string $apiKeyIdentifier name of apikey + * + * @return null|string API key with the prefix + */ + public function getApiKeyWithPrefix($apiKeyIdentifier) + { + $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); + $apiKey = $this->getApiKey($apiKeyIdentifier); + + if ($apiKey === null) { + return null; + } + + if ($prefix === null) { + $keyWithPrefix = $apiKey; + } else { + $keyWithPrefix = $prefix . ' ' . $apiKey; + } + + return $keyWithPrefix; + } + + /** + * Returns an array of host settings + * + * @return array an array of host settings + */ + public function getHostSettings() + { + return [ + [ + "url" => "http://localhost:3000", + "description" => "No description provided", + ] + ]; + } + + /** + * Returns URL based on host settings, index and variables + * + * @param array $hostSettings array of host settings, generated from getHostSettings() or equivalent from the API clients + * @param int $hostIndex index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) + * @return string URL based on host settings + */ + public static function getHostString(array $hostsSettings, $hostIndex, array $variables = null) + { + if (null === $variables) { + $variables = []; + } + + // check array index out of bound + if ($hostIndex < 0 || $hostIndex >= count($hostsSettings)) { + throw new \InvalidArgumentException("Invalid index $hostIndex when selecting the host. Must be less than ".count($hostsSettings)); + } + + $host = $hostsSettings[$hostIndex]; + $url = $host["url"]; + + // go through variable and assign a value + foreach ($host["variables"] ?? [] as $name => $variable) { + if (array_key_exists($name, $variables)) { // check to see if it's in the variables provided by the user + if (!isset($variable['enum_values']) || in_array($variables[$name], $variable["enum_values"], true)) { // check to see if the value is in the enum + $url = str_replace("{".$name."}", $variables[$name], $url); + } else { + throw new \InvalidArgumentException("The variable `$name` in the host URL has invalid value ".$variables[$name].". Must be ".join(',', $variable["enum_values"])."."); + } + } else { + // use default value + $url = str_replace("{".$name."}", $variable["default_value"], $url); + } + } + + return $url; + } + + /** + * Returns URL based on the index and variables + * + * @param int $index index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) + * @return string URL based on host settings + */ + public function getHostFromSettings($index, $variables = null) + { + return self::getHostString($this->getHostSettings(), $index, $variables); + } +} diff --git a/samples/client/echo_api/php-nextgen/src/HeaderSelector.php b/samples/client/echo_api/php-nextgen/src/HeaderSelector.php new file mode 100644 index 000000000000..de00e44e7155 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/HeaderSelector.php @@ -0,0 +1,246 @@ +selectAcceptHeader($accept); + if ($accept !== null) { + $headers['Accept'] = $accept; + } + + if (!$isMultipart) { + if($contentType === '') { + $contentType = 'application/json'; + } + + $headers['Content-Type'] = $contentType; + } + + return $headers; + } + + /** + * Return the header 'Accept' based on an array of Accept provided. + * + * @param string[] $accept Array of header + * + * @return null|string Accept (e.g. application/json) + */ + private function selectAcceptHeader(array $accept): ?string + { + # filter out empty entries + $accept = array_filter($accept); + + if (count($accept) === 0) { + return null; + } + + # If there's only one Accept header, just use it + if (count($accept) === 1) { + return reset($accept); + } + + # If none of the available Accept headers is of type "json", then just use all them + $headersWithJson = preg_grep('~(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$~', $accept); + if (count($headersWithJson) === 0) { + return implode(',', $accept); + } + + # If we got here, then we need add quality values (weight), as described in IETF RFC 9110, Items 12.4.2/12.5.1, + # to give the highest priority to json-like headers - recalculating the existing ones, if needed + return $this->getAcceptHeaderWithAdjustedWeight($accept, $headersWithJson); + } + + /** + * Create an Accept header string from the given "Accept" headers array, recalculating all weights + * + * @param string[] $accept Array of Accept Headers + * @param string[] $headersWithJson Array of Accept Headers of type "json" + * + * @return string "Accept" Header (e.g. "application/json, text/html; q=0.9") + */ + private function getAcceptHeaderWithAdjustedWeight(array $accept, array $headersWithJson): string + { + $processedHeaders = [ + 'withApplicationJson' => [], + 'withJson' => [], + 'withoutJson' => [], + ]; + + foreach ($accept as $header) { + + $headerData = $this->getHeaderAndWeight($header); + + if (stripos($headerData['header'], 'application/json') === 0) { + $processedHeaders['withApplicationJson'][] = $headerData; + } elseif (in_array($header, $headersWithJson, true)) { + $processedHeaders['withJson'][] = $headerData; + } else { + $processedHeaders['withoutJson'][] = $headerData; + } + } + + $acceptHeaders = []; + $currentWeight = 1000; + + $hasMoreThan28Headers = count($accept) > 28; + + foreach($processedHeaders as $headers) { + if (count($headers) > 0) { + $acceptHeaders[] = $this->adjustWeight($headers, $currentWeight, $hasMoreThan28Headers); + } + } + + $acceptHeaders = array_merge(...$acceptHeaders); + + return implode(',', $acceptHeaders); + } + + /** + * Given an Accept header, returns an associative array splitting the header and its weight + * + * @param string $header "Accept" Header + * + * @return array with the header and its weight + */ + private function getHeaderAndWeight(string $header): array + { + # matches headers with weight, splitting the header and the weight in $outputArray + if (preg_match('/(.*);\s*q=(1(?:\.0+)?|0\.\d+)$/', $header, $outputArray) === 1) { + $headerData = [ + 'header' => $outputArray[1], + 'weight' => (int)($outputArray[2] * 1000), + ]; + } else { + $headerData = [ + 'header' => trim($header), + 'weight' => 1000, + ]; + } + + return $headerData; + } + + /** + * @param array[] $headers + * @param float $currentWeight + * @param bool $hasMoreThan28Headers + * @return string[] array of adjusted "Accept" headers + */ + private function adjustWeight(array $headers, float &$currentWeight, bool $hasMoreThan28Headers): array + { + usort($headers, function (array $a, array $b) { + return $b['weight'] - $a['weight']; + }); + + $acceptHeaders = []; + foreach ($headers as $index => $header) { + if($index > 0 && $headers[$index - 1]['weight'] > $header['weight']) + { + $currentWeight = $this->getNextWeight($currentWeight, $hasMoreThan28Headers); + } + + $weight = $currentWeight; + + $acceptHeaders[] = $this->buildAcceptHeader($header['header'], $weight); + } + + $currentWeight = $this->getNextWeight($currentWeight, $hasMoreThan28Headers); + + return $acceptHeaders; + } + + /** + * @param string $header + * @param int $weight + * @return string + */ + private function buildAcceptHeader(string $header, int $weight): string + { + if($weight === 1000) { + return $header; + } + + return trim($header, '; ') . ';q=' . rtrim(sprintf('%0.3f', $weight / 1000), '0'); + } + + /** + * Calculate the next weight, based on the current one. + * + * If there are less than 28 "Accept" headers, the weights will be decreased by 1 on its highest significant digit, using the + * following formula: + * + * next weight = current weight - 10 ^ (floor(log(current weight - 1))) + * + * ( current weight minus ( 10 raised to the power of ( floor of (log to the base 10 of ( current weight minus 1 ) ) ) ) ) + * + * Starting from 1000, this generates the following series: + * + * 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 + * + * The resulting quality codes are closer to the average "normal" usage of them (like "q=0.9", "q=0.8" and so on), but it only works + * if there is a maximum of 28 "Accept" headers. If we have more than that (which is extremely unlikely), then we fall back to a 1-by-1 + * decrement rule, which will result in quality codes like "q=0.999", "q=0.998" etc. + * + * @param int $currentWeight varying from 1 to 1000 (will be divided by 1000 to build the quality value) + * @param bool $hasMoreThan28Headers + * @return int + */ + public function getNextWeight(int $currentWeight, bool $hasMoreThan28Headers): int + { + if ($currentWeight <= 1) { + return 1; + } + + if ($hasMoreThan28Headers) { + return $currentWeight - 1; + } + + return $currentWeight - 10 ** floor( log10($currentWeight - 1) ); + } +} diff --git a/samples/client/echo_api/php-nextgen/src/Model/Bird.php b/samples/client/echo_api/php-nextgen/src/Model/Bird.php new file mode 100644 index 000000000000..78c6e208fc1c --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/Model/Bird.php @@ -0,0 +1,444 @@ + + */ +class Bird implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Bird'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'size' => 'string', + 'color' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'size' => null, + 'color' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'size' => false, + 'color' => 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 = [ + 'size' => 'size', + 'color' => 'color' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'size' => 'setSize', + 'color' => 'setColor' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'size' => 'getSize', + 'color' => 'getColor' + ]; + + /** + * 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('size', $data ?? [], null); + $this->setIfExists('color', $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 size + * + * @return string|null + */ + public function getSize() + { + return $this->container['size']; + } + + /** + * Sets size + * + * @param string|null $size size + * + * @return self + */ + public function setSize($size) + { + if (is_null($size)) { + throw new \InvalidArgumentException('non-nullable size cannot be null'); + } + $this->container['size'] = $size; + + return $this; + } + + /** + * Gets color + * + * @return string|null + */ + public function getColor() + { + return $this->container['color']; + } + + /** + * Sets color + * + * @param string|null $color color + * + * @return self + */ + public function setColor($color) + { + if (is_null($color)) { + throw new \InvalidArgumentException('non-nullable color cannot be null'); + } + $this->container['color'] = $color; + + 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/echo_api/php-nextgen/src/Model/Category.php b/samples/client/echo_api/php-nextgen/src/Model/Category.php new file mode 100644 index 000000000000..c33e03307b6c --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/Model/Category.php @@ -0,0 +1,444 @@ + + */ +class Category implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Category'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => 'int64', + 'name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'name' => 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 = [ + 'id' => 'id', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName' + ]; + + /** + * 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('id', $data ?? [], null); + $this->setIfExists('name', $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 id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + 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/echo_api/php-nextgen/src/Model/DataQuery.php b/samples/client/echo_api/php-nextgen/src/Model/DataQuery.php new file mode 100644 index 000000000000..1efa3a9e4f80 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/Model/DataQuery.php @@ -0,0 +1,472 @@ + + */ +class DataQuery extends Query +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DataQuery'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'suffix' => 'string', + 'text' => 'string', + 'date' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'suffix' => null, + 'text' => null, + 'date' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'suffix' => false, + 'text' => false, + 'date' => 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 + parent::openAPITypes(); + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats + parent::openAPIFormats(); + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables + parent::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 = [ + 'suffix' => 'suffix', + 'text' => 'text', + 'date' => 'date' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'suffix' => 'setSuffix', + 'text' => 'setText', + 'date' => 'setDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'suffix' => 'getSuffix', + 'text' => 'getText', + 'date' => 'getDate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return parent::attributeMap() + self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return parent::setters() + self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return parent::getters() + self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + parent::__construct($data); + + $this->setIfExists('suffix', $data ?? [], null); + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('date', $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 = parent::listInvalidProperties(); + + 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 suffix + * + * @return string|null + */ + public function getSuffix() + { + return $this->container['suffix']; + } + + /** + * Sets suffix + * + * @param string|null $suffix test suffix + * + * @return self + */ + public function setSuffix($suffix) + { + if (is_null($suffix)) { + throw new \InvalidArgumentException('non-nullable suffix cannot be null'); + } + $this->container['suffix'] = $suffix; + + return $this; + } + + /** + * Gets text + * + * @return string|null + */ + public function getText() + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string|null $text Some text containing white spaces + * + * @return self + */ + public function setText($text) + { + if (is_null($text)) { + throw new \InvalidArgumentException('non-nullable text cannot be null'); + } + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets date + * + * @return \DateTime|null + */ + public function getDate() + { + return $this->container['date']; + } + + /** + * Sets date + * + * @param \DateTime|null $date A date + * + * @return self + */ + public function setDate($date) + { + if (is_null($date)) { + throw new \InvalidArgumentException('non-nullable date cannot be null'); + } + $this->container['date'] = $date; + + 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/echo_api/php-nextgen/src/Model/DefaultValue.php b/samples/client/echo_api/php-nextgen/src/Model/DefaultValue.php new file mode 100644 index 000000000000..d11057ebada8 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/Model/DefaultValue.php @@ -0,0 +1,696 @@ + + */ +class DefaultValue implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DefaultValue'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'array_string_enum_ref_default' => '\OpenAPI\Client\Model\StringEnumRef[]', + 'array_string_enum_default' => 'string[]', + 'array_string_default' => 'string[]', + 'array_integer_default' => 'int[]', + 'array_string' => 'string[]', + 'array_string_nullable' => 'string[]', + 'array_string_extension_nullable' => 'string[]', + 'string_nullable' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'array_string_enum_ref_default' => null, + 'array_string_enum_default' => null, + 'array_string_default' => null, + 'array_integer_default' => null, + 'array_string' => null, + 'array_string_nullable' => null, + 'array_string_extension_nullable' => null, + 'string_nullable' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'array_string_enum_ref_default' => false, + 'array_string_enum_default' => false, + 'array_string_default' => false, + 'array_integer_default' => false, + 'array_string' => false, + 'array_string_nullable' => true, + 'array_string_extension_nullable' => true, + 'string_nullable' => true + ]; + + /** + * 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 = [ + 'array_string_enum_ref_default' => 'array_string_enum_ref_default', + 'array_string_enum_default' => 'array_string_enum_default', + 'array_string_default' => 'array_string_default', + 'array_integer_default' => 'array_integer_default', + 'array_string' => 'array_string', + 'array_string_nullable' => 'array_string_nullable', + 'array_string_extension_nullable' => 'array_string_extension_nullable', + 'string_nullable' => 'string_nullable' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'array_string_enum_ref_default' => 'setArrayStringEnumRefDefault', + 'array_string_enum_default' => 'setArrayStringEnumDefault', + 'array_string_default' => 'setArrayStringDefault', + 'array_integer_default' => 'setArrayIntegerDefault', + 'array_string' => 'setArrayString', + 'array_string_nullable' => 'setArrayStringNullable', + 'array_string_extension_nullable' => 'setArrayStringExtensionNullable', + 'string_nullable' => 'setStringNullable' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'array_string_enum_ref_default' => 'getArrayStringEnumRefDefault', + 'array_string_enum_default' => 'getArrayStringEnumDefault', + 'array_string_default' => 'getArrayStringDefault', + 'array_integer_default' => 'getArrayIntegerDefault', + 'array_string' => 'getArrayString', + 'array_string_nullable' => 'getArrayStringNullable', + 'array_string_extension_nullable' => 'getArrayStringExtensionNullable', + 'string_nullable' => 'getStringNullable' + ]; + + /** + * 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; + } + + public const ARRAY_STRING_ENUM_DEFAULT_SUCCESS = 'success'; + public const ARRAY_STRING_ENUM_DEFAULT_FAILURE = 'failure'; + public const ARRAY_STRING_ENUM_DEFAULT_UNCLASSIFIED = 'unclassified'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getArrayStringEnumDefaultAllowableValues() + { + return [ + self::ARRAY_STRING_ENUM_DEFAULT_SUCCESS, + self::ARRAY_STRING_ENUM_DEFAULT_FAILURE, + self::ARRAY_STRING_ENUM_DEFAULT_UNCLASSIFIED, + ]; + } + + /** + * 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('array_string_enum_ref_default', $data ?? [], null); + $this->setIfExists('array_string_enum_default', $data ?? [], null); + $this->setIfExists('array_string_default', $data ?? [], null); + $this->setIfExists('array_integer_default', $data ?? [], null); + $this->setIfExists('array_string', $data ?? [], null); + $this->setIfExists('array_string_nullable', $data ?? [], null); + $this->setIfExists('array_string_extension_nullable', $data ?? [], null); + $this->setIfExists('string_nullable', $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 array_string_enum_ref_default + * + * @return \OpenAPI\Client\Model\StringEnumRef[]|null + */ + public function getArrayStringEnumRefDefault() + { + return $this->container['array_string_enum_ref_default']; + } + + /** + * Sets array_string_enum_ref_default + * + * @param \OpenAPI\Client\Model\StringEnumRef[]|null $array_string_enum_ref_default array_string_enum_ref_default + * + * @return self + */ + public function setArrayStringEnumRefDefault($array_string_enum_ref_default) + { + if (is_null($array_string_enum_ref_default)) { + throw new \InvalidArgumentException('non-nullable array_string_enum_ref_default cannot be null'); + } + $this->container['array_string_enum_ref_default'] = $array_string_enum_ref_default; + + return $this; + } + + /** + * Gets array_string_enum_default + * + * @return string[]|null + */ + public function getArrayStringEnumDefault() + { + return $this->container['array_string_enum_default']; + } + + /** + * Sets array_string_enum_default + * + * @param string[]|null $array_string_enum_default array_string_enum_default + * + * @return self + */ + public function setArrayStringEnumDefault($array_string_enum_default) + { + if (is_null($array_string_enum_default)) { + throw new \InvalidArgumentException('non-nullable array_string_enum_default cannot be null'); + } + $allowedValues = $this->getArrayStringEnumDefaultAllowableValues(); + if (array_diff($array_string_enum_default, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'array_string_enum_default', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['array_string_enum_default'] = $array_string_enum_default; + + return $this; + } + + /** + * Gets array_string_default + * + * @return string[]|null + */ + public function getArrayStringDefault() + { + return $this->container['array_string_default']; + } + + /** + * Sets array_string_default + * + * @param string[]|null $array_string_default array_string_default + * + * @return self + */ + public function setArrayStringDefault($array_string_default) + { + if (is_null($array_string_default)) { + throw new \InvalidArgumentException('non-nullable array_string_default cannot be null'); + } + $this->container['array_string_default'] = $array_string_default; + + return $this; + } + + /** + * Gets array_integer_default + * + * @return int[]|null + */ + public function getArrayIntegerDefault() + { + return $this->container['array_integer_default']; + } + + /** + * Sets array_integer_default + * + * @param int[]|null $array_integer_default array_integer_default + * + * @return self + */ + public function setArrayIntegerDefault($array_integer_default) + { + if (is_null($array_integer_default)) { + throw new \InvalidArgumentException('non-nullable array_integer_default cannot be null'); + } + $this->container['array_integer_default'] = $array_integer_default; + + return $this; + } + + /** + * Gets array_string + * + * @return string[]|null + */ + public function getArrayString() + { + return $this->container['array_string']; + } + + /** + * Sets array_string + * + * @param string[]|null $array_string array_string + * + * @return self + */ + public function setArrayString($array_string) + { + if (is_null($array_string)) { + throw new \InvalidArgumentException('non-nullable array_string cannot be null'); + } + $this->container['array_string'] = $array_string; + + return $this; + } + + /** + * Gets array_string_nullable + * + * @return string[]|null + */ + public function getArrayStringNullable() + { + return $this->container['array_string_nullable']; + } + + /** + * Sets array_string_nullable + * + * @param string[]|null $array_string_nullable array_string_nullable + * + * @return self + */ + public function setArrayStringNullable($array_string_nullable) + { + if (is_null($array_string_nullable)) { + array_push($this->openAPINullablesSetToNull, 'array_string_nullable'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('array_string_nullable', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['array_string_nullable'] = $array_string_nullable; + + return $this; + } + + /** + * Gets array_string_extension_nullable + * + * @return string[]|null + */ + public function getArrayStringExtensionNullable() + { + return $this->container['array_string_extension_nullable']; + } + + /** + * Sets array_string_extension_nullable + * + * @param string[]|null $array_string_extension_nullable array_string_extension_nullable + * + * @return self + */ + public function setArrayStringExtensionNullable($array_string_extension_nullable) + { + if (is_null($array_string_extension_nullable)) { + array_push($this->openAPINullablesSetToNull, 'array_string_extension_nullable'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('array_string_extension_nullable', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['array_string_extension_nullable'] = $array_string_extension_nullable; + + return $this; + } + + /** + * Gets string_nullable + * + * @return string|null + */ + public function getStringNullable() + { + return $this->container['string_nullable']; + } + + /** + * Sets string_nullable + * + * @param string|null $string_nullable string_nullable + * + * @return self + */ + public function setStringNullable($string_nullable) + { + if (is_null($string_nullable)) { + array_push($this->openAPINullablesSetToNull, 'string_nullable'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('string_nullable', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['string_nullable'] = $string_nullable; + + 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/echo_api/php-nextgen/src/Model/ModelInterface.php b/samples/client/echo_api/php-nextgen/src/Model/ModelInterface.php new file mode 100644 index 000000000000..60e917bca3e0 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/Model/ModelInterface.php @@ -0,0 +1,112 @@ + + */ +class NumberPropertiesOnly implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'NumberPropertiesOnly'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'number' => 'float', + 'float' => 'float', + 'double' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'number' => null, + 'float' => 'float', + 'double' => 'double' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'number' => false, + 'float' => false, + 'double' => 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 = [ + 'number' => 'number', + 'float' => 'float', + 'double' => 'double' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'number' => 'setNumber', + 'float' => 'setFloat', + 'double' => 'setDouble' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'number' => 'getNumber', + 'float' => 'getFloat', + 'double' => 'getDouble' + ]; + + /** + * 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('number', $data ?? [], null); + $this->setIfExists('float', $data ?? [], null); + $this->setIfExists('double', $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 = []; + + if (!is_null($this->container['double']) && ($this->container['double'] > 50.2)) { + $invalidProperties[] = "invalid value for 'double', must be smaller than or equal to 50.2."; + } + + if (!is_null($this->container['double']) && ($this->container['double'] < 0.8)) { + $invalidProperties[] = "invalid value for 'double', must be bigger than or equal to 0.8."; + } + + 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 number + * + * @return float|null + */ + public function getNumber() + { + return $this->container['number']; + } + + /** + * Sets number + * + * @param float|null $number number + * + * @return self + */ + public function setNumber($number) + { + if (is_null($number)) { + throw new \InvalidArgumentException('non-nullable number cannot be null'); + } + $this->container['number'] = $number; + + return $this; + } + + /** + * Gets float + * + * @return float|null + */ + public function getFloat() + { + return $this->container['float']; + } + + /** + * Sets float + * + * @param float|null $float float + * + * @return self + */ + public function setFloat($float) + { + if (is_null($float)) { + throw new \InvalidArgumentException('non-nullable float cannot be null'); + } + $this->container['float'] = $float; + + return $this; + } + + /** + * Gets double + * + * @return float|null + */ + public function getDouble() + { + return $this->container['double']; + } + + /** + * Sets double + * + * @param float|null $double double + * + * @return self + */ + public function setDouble($double) + { + if (is_null($double)) { + throw new \InvalidArgumentException('non-nullable double cannot be null'); + } + + if (($double > 50.2)) { + throw new \InvalidArgumentException('invalid value for $double when calling NumberPropertiesOnly., must be smaller than or equal to 50.2.'); + } + if (($double < 0.8)) { + throw new \InvalidArgumentException('invalid value for $double when calling NumberPropertiesOnly., must be bigger than or equal to 0.8.'); + } + + $this->container['double'] = $double; + + 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/echo_api/php-nextgen/src/Model/Pet.php b/samples/client/echo_api/php-nextgen/src/Model/Pet.php new file mode 100644 index 000000000000..86f15d851237 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/Model/Pet.php @@ -0,0 +1,622 @@ + + */ +class Pet implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Pet'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'name' => 'string', + 'category' => '\OpenAPI\Client\Model\Category', + 'photo_urls' => 'string[]', + 'tags' => '\OpenAPI\Client\Model\Tag[]', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => 'int64', + 'name' => null, + 'category' => null, + 'photo_urls' => null, + 'tags' => null, + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'name' => false, + 'category' => false, + 'photo_urls' => false, + 'tags' => false, + 'status' => 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 = [ + 'id' => 'id', + 'name' => 'name', + 'category' => 'category', + 'photo_urls' => 'photoUrls', + 'tags' => 'tags', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'category' => 'setCategory', + 'photo_urls' => 'setPhotoUrls', + 'tags' => 'setTags', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'category' => 'getCategory', + 'photo_urls' => 'getPhotoUrls', + 'tags' => 'getTags', + 'status' => 'getStatus' + ]; + + /** + * 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; + } + + public const STATUS_AVAILABLE = 'available'; + public const STATUS_PENDING = 'pending'; + public const STATUS_SOLD = 'sold'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_AVAILABLE, + self::STATUS_PENDING, + self::STATUS_SOLD, + ]; + } + + /** + * 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('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('category', $data ?? [], null); + $this->setIfExists('photo_urls', $data ?? [], null); + $this->setIfExists('tags', $data ?? [], null); + $this->setIfExists('status', $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 = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['photo_urls'] === null) { + $invalidProperties[] = "'photo_urls' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + 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 id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets category + * + * @return \OpenAPI\Client\Model\Category|null + */ + public function getCategory() + { + return $this->container['category']; + } + + /** + * Sets category + * + * @param \OpenAPI\Client\Model\Category|null $category category + * + * @return self + */ + public function setCategory($category) + { + if (is_null($category)) { + throw new \InvalidArgumentException('non-nullable category cannot be null'); + } + $this->container['category'] = $category; + + return $this; + } + + /** + * Gets photo_urls + * + * @return string[] + */ + public function getPhotoUrls() + { + return $this->container['photo_urls']; + } + + /** + * Sets photo_urls + * + * @param string[] $photo_urls photo_urls + * + * @return self + */ + public function setPhotoUrls($photo_urls) + { + if (is_null($photo_urls)) { + throw new \InvalidArgumentException('non-nullable photo_urls cannot be null'); + } + $this->container['photo_urls'] = $photo_urls; + + return $this; + } + + /** + * Gets tags + * + * @return \OpenAPI\Client\Model\Tag[]|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param \OpenAPI\Client\Model\Tag[]|null $tags tags + * + * @return self + */ + public function setTags($tags) + { + if (is_null($tags)) { + throw new \InvalidArgumentException('non-nullable tags cannot be null'); + } + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status pet status in the store + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + 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/echo_api/php-nextgen/src/Model/Query.php b/samples/client/echo_api/php-nextgen/src/Model/Query.php new file mode 100644 index 000000000000..120083e272a7 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/Model/Query.php @@ -0,0 +1,470 @@ + + */ +class Query implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Query'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'outcomes' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => 'int64', + 'outcomes' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'outcomes' => 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 = [ + 'id' => 'id', + 'outcomes' => 'outcomes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'outcomes' => 'setOutcomes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'outcomes' => 'getOutcomes' + ]; + + /** + * 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; + } + + public const OUTCOMES_SUCCESS = 'SUCCESS'; + public const OUTCOMES_FAILURE = 'FAILURE'; + public const OUTCOMES_SKIPPED = 'SKIPPED'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOutcomesAllowableValues() + { + return [ + self::OUTCOMES_SUCCESS, + self::OUTCOMES_FAILURE, + self::OUTCOMES_SKIPPED, + ]; + } + + /** + * 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('id', $data ?? [], null); + $this->setIfExists('outcomes', $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 id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id Query + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets outcomes + * + * @return string[]|null + */ + public function getOutcomes() + { + return $this->container['outcomes']; + } + + /** + * Sets outcomes + * + * @param string[]|null $outcomes outcomes + * + * @return self + */ + public function setOutcomes($outcomes) + { + if (is_null($outcomes)) { + throw new \InvalidArgumentException('non-nullable outcomes cannot be null'); + } + $allowedValues = $this->getOutcomesAllowableValues(); + if (array_diff($outcomes, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'outcomes', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['outcomes'] = $outcomes; + + 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/echo_api/php-nextgen/src/Model/StringEnumRef.php b/samples/client/echo_api/php-nextgen/src/Model/StringEnumRef.php new file mode 100644 index 000000000000..7f2ccd378ff5 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/Model/StringEnumRef.php @@ -0,0 +1,51 @@ + + */ +class Tag implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Tag'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => 'int64', + 'name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'id' => false, + 'name' => 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 = [ + 'id' => 'id', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName' + ]; + + /** + * 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('id', $data ?? [], null); + $this->setIfExists('name', $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 id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + 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/echo_api/php-nextgen/src/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php b/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php new file mode 100644 index 000000000000..8a3f95fe219e --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php @@ -0,0 +1,512 @@ + + */ +class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'test_query_style_deepObject_explode_true_object_allOf_query_object_parameter'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'size' => 'string', + 'color' => 'string', + 'id' => 'int', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'size' => null, + 'color' => null, + 'id' => 'int64', + 'name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'size' => false, + 'color' => false, + 'id' => false, + 'name' => 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 = [ + 'size' => 'size', + 'color' => 'color', + 'id' => 'id', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'size' => 'setSize', + 'color' => 'setColor', + 'id' => 'setId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'size' => 'getSize', + 'color' => 'getColor', + 'id' => 'getId', + 'name' => 'getName' + ]; + + /** + * 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('size', $data ?? [], null); + $this->setIfExists('color', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $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 size + * + * @return string|null + */ + public function getSize() + { + return $this->container['size']; + } + + /** + * Sets size + * + * @param string|null $size size + * + * @return self + */ + public function setSize($size) + { + if (is_null($size)) { + throw new \InvalidArgumentException('non-nullable size cannot be null'); + } + $this->container['size'] = $size; + + return $this; + } + + /** + * Gets color + * + * @return string|null + */ + public function getColor() + { + return $this->container['color']; + } + + /** + * Sets color + * + * @param string|null $color color + * + * @return self + */ + public function setColor($color) + { + if (is_null($color)) { + throw new \InvalidArgumentException('non-nullable color cannot be null'); + } + $this->container['color'] = $color; + + return $this; + } + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + 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/echo_api/php-nextgen/src/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php b/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php new file mode 100644 index 000000000000..c1fc04a39c44 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php @@ -0,0 +1,410 @@ + + */ +class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'test_query_style_form_explode_true_array_string_query_object_parameter'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'values' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'values' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'values' => 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 = [ + 'values' => 'values' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'values' => 'setValues' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'values' => 'getValues' + ]; + + /** + * 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('values', $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 values + * + * @return string[]|null + */ + public function getValues() + { + return $this->container['values']; + } + + /** + * Sets values + * + * @param string[]|null $values values + * + * @return self + */ + public function setValues($values) + { + if (is_null($values)) { + throw new \InvalidArgumentException('non-nullable values cannot be null'); + } + $this->container['values'] = $values; + + 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/echo_api/php-nextgen/src/ObjectSerializer.php b/samples/client/echo_api/php-nextgen/src/ObjectSerializer.php new file mode 100644 index 000000000000..780354b3bb56 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/src/ObjectSerializer.php @@ -0,0 +1,567 @@ +format('Y-m-d') : $data->format(self::$dateTimeFormat); + } + + if (is_array($data)) { + foreach ($data as $property => $value) { + $data[$property] = self::sanitizeForSerialization($value); + } + return $data; + } + + if (is_object($data)) { + $values = []; + if ($data instanceof ModelInterface) { + $formats = $data::openAPIFormats(); + foreach ($data::openAPITypes() as $property => $openAPIType) { + $getter = $data::getters()[$property]; + $value = $data->$getter(); + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if (is_sublass_of($openAPIType, '\BackedEnum')) { + $data = $openAPIType::tryFrom($data); + if ($data === null) { + $imploded = implode("', '", array_map(fn($case) => $case->value, $openAPIType::cases())); + throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); + } + } + } + if (($data::isNullable($property) && $data->isNullableSetToNull($property)) || $value !== null) { + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]); + } + } + } else { + foreach($data as $property => $value) { + $values[$property] = self::sanitizeForSerialization($value); + } + } + return (object)$values; + } else { + return (string)$data; + } + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param string $filename filename to be sanitized + * + * @return string the sanitized filename + */ + public static function sanitizeFilename($filename) + { + if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + return $match[1]; + } else { + return $filename; + } + } + + /** + * Shorter timestamp microseconds to 6 digits length. + * + * @param string $timestamp Original timestamp + * + * @return string the shorten timestamp + */ + public static function sanitizeTimestamp($timestamp) + { + if (!is_string($timestamp)) return $timestamp; + + return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the path, by url-encoding. + * + * @param string $value a string which will be part of the path + * + * @return string the serialized object + */ + public static function toPathValue($value) + { + return rawurlencode(self::toString($value)); + } + + /** + * Checks if a value is empty, based on its OpenAPI type. + * + * @param mixed $value + * @param string $openApiType + * + * @return bool true if $value is empty + */ + private static function isEmptyValue($value, string $openApiType): bool + { + # If empty() returns false, it is not empty regardless of its type. + if (!empty($value)) { + return false; + } + + # Null is always empty, as we cannot send a real "null" value in a query parameter. + if ($value === null) { + return true; + } + + switch ($openApiType) { + # For numeric values, false and '' are considered empty. + # This comparison is safe for floating point values, since the previous call to empty() will + # filter out values that don't match 0. + case 'int': + case 'integer': + return $value !== 0; + + case 'number': + case 'float': + return $value !== 0 && $value !== 0.0; + + # For boolean values, '' is considered empty + case 'bool': + case 'boolean': + return !in_array($value, [false, 0], true); + + # For all the other types, any value at this point can be considered empty. + default: + return true; + } + } + + /** + * Take query parameter properties and turn it into an array suitable for + * native http_build_query or GuzzleHttp\Psr7\Query::build. + * + * @param mixed $value Parameter value + * @param string $paramName Parameter name + * @param string $openApiType OpenAPIType eg. array or object + * @param string $style Parameter serialization style + * @param bool $explode Parameter explode option + * @param bool $required Whether query param is required or not + * + * @return array + */ + public static function toQueryValue( + $value, + string $paramName, + string $openApiType = 'string', + string $style = 'form', + bool $explode = true, + bool $required = true + ): array { + + # Check if we should omit this parameter from the query. This should only happen when: + # - Parameter is NOT required; AND + # - its value is set to a value that is equivalent to "empty", depending on its OpenAPI type. For + # example, 0 as "int" or "boolean" is NOT an empty value. + if (self::isEmptyValue($value, $openApiType)) { + if ($required) { + return ["{$paramName}" => '']; + } else { + return []; + } + } + + # Handle DateTime objects in query + if($openApiType === "\\DateTime" && $value instanceof \DateTime) { + return ["{$paramName}" => $value->format(self::$dateTimeFormat)]; + } + + $query = []; + $value = (in_array($openApiType, ['object', 'array'], true)) ? (array)$value : $value; + + // since \GuzzleHttp\Psr7\Query::build fails with nested arrays + // need to flatten array first + $flattenArray = function ($arr, $name, &$result = []) use (&$flattenArray, $style, $explode) { + if (!is_array($arr)) return $arr; + + foreach ($arr as $k => $v) { + $prop = ($style === 'deepObject') ? $prop = "{$name}[{$k}]" : $k; + + if (is_array($v)) { + $flattenArray($v, $prop, $result); + } else { + if ($style !== 'deepObject' && !$explode) { + // push key itself + $result[] = $prop; + } + $result[$prop] = $v; + } + } + return $result; + }; + + $value = $flattenArray($value, $paramName); + + if ($openApiType === 'object' && ($style === 'deepObject' || $explode)) { + return $value; + } + + if ('boolean' === $openApiType && is_bool($value)) { + $value = self::convertBoolToQueryStringFormat($value); + } + + // handle style in serializeCollection + $query[$paramName] = ($explode) ? $value : self::serializeCollection((array)$value, $style); + + return $query; + } + + /** + * Convert boolean value to format for query string. + * + * @param bool $value Boolean value + * + * @return int|string Boolean value in format + */ + public static function convertBoolToQueryStringFormat(bool $value) + { + if (Configuration::BOOLEAN_FORMAT_STRING == Configuration::getDefaultConfiguration()->getBooleanFormatForQueryString()) { + return $value ? 'true' : 'false'; + } + + return (int) $value; + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the header. If it's a string, pass through unchanged + * If it's a datetime object, format it in ISO8601 + * + * @param string $value a string which will be part of the header + * + * @return string the header string + */ + public static function toHeaderValue($value) + { + $callable = [$value, 'toHeaderValue']; + if (is_callable($callable)) { + return $callable(); + } + + return self::toString($value); + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the http body (form parameter). If it's a string, pass through unchanged + * If it's a datetime object, format it in ISO8601 + * + * @param string|\SplFileObject $value the value of the form parameter + * + * @return string the form string + */ + public static function toFormValue($value) + { + if ($value instanceof \SplFileObject) { + return $value->getRealPath(); + } else { + return self::toString($value); + } + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the parameter. If it's a string, pass through unchanged + * If it's a datetime object, format it in ISO8601 + * If it's a boolean, convert it to "true" or "false". + * + * @param string|bool|\DateTime $value the value of the parameter + * + * @return string the header string + */ + public static function toString($value) + { + if ($value instanceof \DateTime) { // datetime in ISO8601 format + return $value->format(self::$dateTimeFormat); + } elseif (is_bool($value)) { + return $value ? 'true' : 'false'; + } else { + return (string) $value; + } + } + + /** + * Serialize an array to a string. + * + * @param array $collection collection to serialize to a string + * @param string $style the format use for serialization (csv, + * ssv, tsv, pipes, multi) + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * + * @return string + */ + public static function serializeCollection(array $collection, $style, $allowCollectionFormatMulti = false) + { + if ($allowCollectionFormatMulti && ('multi' === $style)) { + // http_build_query() almost does the job for us. We just + // need to fix the result of multidimensional arrays. + return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); + } + switch ($style) { + case 'pipeDelimited': + case 'pipes': + return implode('|', $collection); + + case 'tsv': + return implode("\t", $collection); + + case 'spaceDelimited': + case 'ssv': + return implode(' ', $collection); + + case 'simple': + case 'csv': + // Deliberate fall through. CSV is default format. + default: + return implode(',', $collection); + } + } + + /** + * Deserialize a JSON string into an object + * + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers + * @param string $discriminator discriminator if polymorphism is used + * + * @return object|array|null a single or an array of $class instances + */ + public static function deserialize($data, $class, $httpHeaders = null) + { + if (null === $data) { + return null; + } + + if (strcasecmp(substr($class, -2), '[]') === 0) { + $data = is_string($data) ? json_decode($data) : $data; + + if (!is_array($data)) { + throw new \InvalidArgumentException("Invalid array '$class'"); + } + + $subClass = substr($class, 0, -2); + $values = []; + foreach ($data as $key => $value) { + $values[] = self::deserialize($value, $subClass, null); + } + return $values; + } + + if (preg_match('/^(array<|map\[)/', $class)) { // for associative array e.g. array + $data = is_string($data) ? json_decode($data) : $data; + settype($data, 'array'); + $inner = substr($class, 4, -1); + $deserialized = []; + if (strrpos($inner, ",") !== false) { + $subClass_array = explode(',', $inner, 2); + $subClass = $subClass_array[1]; + foreach ($data as $key => $value) { + $deserialized[$key] = self::deserialize($value, $subClass, null); + } + } + return $deserialized; + } + + if ($class === 'object') { + settype($data, 'array'); + return $data; + } elseif ($class === 'mixed') { + settype($data, gettype($data)); + return $data; + } + + if ($class === '\DateTime') { + // Some APIs return an invalid, empty string as a + // date-time property. DateTime::__construct() will return + // the current time for empty input which is probably not + // what is meant. The invalid empty string is probably to + // be interpreted as a missing field/value. Let's handle + // this graceful. + if (!empty($data)) { + try { + return new \DateTime($data); + } catch (\Exception $exception) { + // Some APIs return a date-time with too high nanosecond + // precision for php's DateTime to handle. + // With provided regexp 6 digits of microseconds saved + return new \DateTime(self::sanitizeTimestamp($data)); + } + } else { + return null; + } + } + + if ($class === '\SplFileObject') { + $data = Utils::streamFor($data); + + /** @var \Psr\Http\Message\StreamInterface $data */ + + // determine file name + if ( + is_array($httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) + && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) + ) { + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + } else { + $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); + } + + $file = fopen($filename, 'w'); + while ($chunk = $data->read(200)) { + fwrite($file, $chunk); + } + fclose($file); + + return new \SplFileObject($filename, 'r'); + } + + /** @psalm-suppress ParadoxicalCondition */ + if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + settype($data, $class); + return $data; + } + + + if (is_subclass_of($class, '\BackedEnum')) { + $data = $class::tryFrom($data); + if ($data === null) { + $imploded = implode("', '", array_map(fn($case) => $case->value, $class::cases())); + throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + } + return $data; + } else { + $data = is_string($data) ? json_decode($data) : $data; + + if (is_array($data)) { + $data = (object)$data; + } + + // If a discriminator is defined and points to a valid subclass, use it. + $discriminator = $class::DISCRIMINATOR; + if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { + $subclass = '\OpenAPI\Client\Model\\' . $data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; + } + } + + /** @var ModelInterface $instance */ + $instance = new $class(); + foreach ($instance::openAPITypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter)) { + continue; + } + + if (!isset($data->{$instance::attributeMap()[$property]})) { + if ($instance::isNullable($property)) { + $instance->$propertySetter(null); + } + + continue; + } + + if (isset($data->{$instance::attributeMap()[$property]})) { + $propertyValue = $data->{$instance::attributeMap()[$property]}; + $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); + } + } + return $instance; + } + } + + /** + * Native `http_build_query` wrapper. + * @see https://www.php.net/manual/en/function.http-build-query + * + * @param array|object $data May be an array or object containing properties. + * @param string $numeric_prefix If numeric indices are used in the base array and this parameter is provided, it will be prepended to the numeric index for elements in the base array only. + * @param string|null $arg_separator arg_separator.output is used to separate arguments but may be overridden by specifying this parameter. + * @param int $encoding_type Encoding type. By default, PHP_QUERY_RFC1738. + * + * @return string + */ + public static function buildQuery( + $data, + string $numeric_prefix = '', + ?string $arg_separator = null, + int $encoding_type = \PHP_QUERY_RFC3986 + ): string { + return \GuzzleHttp\Psr7\Query::build($data, $encoding_type); + } +} diff --git a/samples/client/echo_api/php-nextgen/tests/Api/AuthApiTest.php b/samples/client/echo_api/php-nextgen/tests/Api/AuthApiTest.php new file mode 100644 index 000000000000..fee328d51e59 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/tests/Api/AuthApiTest.php @@ -0,0 +1,86 @@ +markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/echo_api/php-nextgen/tests/Api/BodyApiTest.php b/samples/client/echo_api/php-nextgen/tests/Api/BodyApiTest.php new file mode 100644 index 000000000000..24b4ef0f3941 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/tests/Api/BodyApiTest.php @@ -0,0 +1,158 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test case for testBodyApplicationOctetstreamBinary + * + * Test body parameter(s). + * + */ + public function testTestBodyApplicationOctetstreamBinary() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for testBodyMultipartFormdataArrayOfBinary + * + * Test array of binary in multipart mime. + * + */ + public function testTestBodyMultipartFormdataArrayOfBinary() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for testEchoBodyFreeFormObjectResponseString + * + * Test free form object. + * + */ + public function testTestEchoBodyFreeFormObjectResponseString() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for testEchoBodyPet + * + * Test body parameter(s). + * + */ + public function testTestEchoBodyPet() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for testEchoBodyPetResponseString + * + * Test empty response body. + * + */ + public function testTestEchoBodyPetResponseString() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for testEchoBodyTagResponseString + * + * Test empty json (request body). + * + */ + public function testTestEchoBodyTagResponseString() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/echo_api/php-nextgen/tests/Api/FormApiTest.php b/samples/client/echo_api/php-nextgen/tests/Api/FormApiTest.php new file mode 100644 index 000000000000..daa305ab02f6 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/tests/Api/FormApiTest.php @@ -0,0 +1,98 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test case for testFormOneof + * + * Test form parameter(s) for oneOf schema. + * + */ + public function testTestFormOneof() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/echo_api/php-nextgen/tests/Api/HeaderApiTest.php b/samples/client/echo_api/php-nextgen/tests/Api/HeaderApiTest.php new file mode 100644 index 000000000000..21e1c88b7b06 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/tests/Api/HeaderApiTest.php @@ -0,0 +1,86 @@ +markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/echo_api/php-nextgen/tests/Api/PathApiTest.php b/samples/client/echo_api/php-nextgen/tests/Api/PathApiTest.php new file mode 100644 index 000000000000..d01f470f01f4 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/tests/Api/PathApiTest.php @@ -0,0 +1,86 @@ +markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/echo_api/php-nextgen/tests/Api/QueryApiTest.php b/samples/client/echo_api/php-nextgen/tests/Api/QueryApiTest.php new file mode 100644 index 000000000000..b066dfc199d2 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/tests/Api/QueryApiTest.php @@ -0,0 +1,170 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test case for testQueryDatetimeDateString + * + * Test query parameter(s). + * + */ + public function testTestQueryDatetimeDateString() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for testQueryIntegerBooleanString + * + * Test query parameter(s). + * + */ + public function testTestQueryIntegerBooleanString() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for testQueryStyleDeepObjectExplodeTrueObject + * + * Test query parameter(s). + * + */ + public function testTestQueryStyleDeepObjectExplodeTrueObject() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for testQueryStyleDeepObjectExplodeTrueObjectAllOf + * + * Test query parameter(s). + * + */ + public function testTestQueryStyleDeepObjectExplodeTrueObjectAllOf() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for testQueryStyleFormExplodeTrueArrayString + * + * Test query parameter(s). + * + */ + public function testTestQueryStyleFormExplodeTrueArrayString() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for testQueryStyleFormExplodeTrueObject + * + * Test query parameter(s). + * + */ + public function testTestQueryStyleFormExplodeTrueObject() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for testQueryStyleFormExplodeTrueObjectAllOf + * + * Test query parameter(s). + * + */ + public function testTestQueryStyleFormExplodeTrueObjectAllOf() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/echo_api/php-nextgen/tests/Model/BirdTest.php b/samples/client/echo_api/php-nextgen/tests/Model/BirdTest.php new file mode 100644 index 000000000000..ef424f438add --- /dev/null +++ b/samples/client/echo_api/php-nextgen/tests/Model/BirdTest.php @@ -0,0 +1,100 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "size" + */ + public function testPropertySize() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "color" + */ + public function testPropertyColor() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/echo_api/php-nextgen/tests/Model/CategoryTest.php b/samples/client/echo_api/php-nextgen/tests/Model/CategoryTest.php new file mode 100644 index 000000000000..c643cb2b36c5 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/tests/Model/CategoryTest.php @@ -0,0 +1,100 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "id" + */ + public function testPropertyId() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "name" + */ + public function testPropertyName() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/echo_api/php-nextgen/tests/Model/DataQueryTest.php b/samples/client/echo_api/php-nextgen/tests/Model/DataQueryTest.php new file mode 100644 index 000000000000..43cdd5c7a90e --- /dev/null +++ b/samples/client/echo_api/php-nextgen/tests/Model/DataQueryTest.php @@ -0,0 +1,109 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "suffix" + */ + public function testPropertySuffix() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "text" + */ + public function testPropertyText() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "date" + */ + public function testPropertyDate() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/echo_api/php-nextgen/tests/Model/DefaultValueTest.php b/samples/client/echo_api/php-nextgen/tests/Model/DefaultValueTest.php new file mode 100644 index 000000000000..5d1bb1676492 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/tests/Model/DefaultValueTest.php @@ -0,0 +1,154 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "array_string_enum_ref_default" + */ + public function testPropertyArrayStringEnumRefDefault() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "array_string_enum_default" + */ + public function testPropertyArrayStringEnumDefault() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "array_string_default" + */ + public function testPropertyArrayStringDefault() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "array_integer_default" + */ + public function testPropertyArrayIntegerDefault() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "array_string" + */ + public function testPropertyArrayString() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "array_string_nullable" + */ + public function testPropertyArrayStringNullable() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "array_string_extension_nullable" + */ + public function testPropertyArrayStringExtensionNullable() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "string_nullable" + */ + public function testPropertyStringNullable() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/echo_api/php-nextgen/tests/Model/NumberPropertiesOnlyTest.php b/samples/client/echo_api/php-nextgen/tests/Model/NumberPropertiesOnlyTest.php new file mode 100644 index 000000000000..f1de2cd6cfd0 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/tests/Model/NumberPropertiesOnlyTest.php @@ -0,0 +1,109 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "number" + */ + public function testPropertyNumber() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "float" + */ + public function testPropertyFloat() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "double" + */ + public function testPropertyDouble() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/echo_api/php-nextgen/tests/Model/PetTest.php b/samples/client/echo_api/php-nextgen/tests/Model/PetTest.php new file mode 100644 index 000000000000..1b11ec08fdc2 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/tests/Model/PetTest.php @@ -0,0 +1,136 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "id" + */ + public function testPropertyId() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "name" + */ + public function testPropertyName() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "category" + */ + public function testPropertyCategory() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "photo_urls" + */ + public function testPropertyPhotoUrls() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "tags" + */ + public function testPropertyTags() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "status" + */ + public function testPropertyStatus() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/echo_api/php-nextgen/tests/Model/QueryTest.php b/samples/client/echo_api/php-nextgen/tests/Model/QueryTest.php new file mode 100644 index 000000000000..e984a7919ffd --- /dev/null +++ b/samples/client/echo_api/php-nextgen/tests/Model/QueryTest.php @@ -0,0 +1,100 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "id" + */ + public function testPropertyId() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "outcomes" + */ + public function testPropertyOutcomes() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/echo_api/php-nextgen/tests/Model/StringEnumRefTest.php b/samples/client/echo_api/php-nextgen/tests/Model/StringEnumRefTest.php new file mode 100644 index 000000000000..f48e712c2dd6 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/tests/Model/StringEnumRefTest.php @@ -0,0 +1,82 @@ +markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/echo_api/php-nextgen/tests/Model/TagTest.php b/samples/client/echo_api/php-nextgen/tests/Model/TagTest.php new file mode 100644 index 000000000000..2f1c1315bb60 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/tests/Model/TagTest.php @@ -0,0 +1,100 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "id" + */ + public function testPropertyId() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "name" + */ + public function testPropertyName() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/echo_api/php-nextgen/tests/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTest.php b/samples/client/echo_api/php-nextgen/tests/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTest.php new file mode 100644 index 000000000000..08e837c50b69 --- /dev/null +++ b/samples/client/echo_api/php-nextgen/tests/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTest.php @@ -0,0 +1,118 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "size" + */ + public function testPropertySize() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "color" + */ + public function testPropertyColor() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "id" + */ + public function testPropertyId() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "name" + */ + public function testPropertyName() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/samples/client/echo_api/php-nextgen/tests/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.php b/samples/client/echo_api/php-nextgen/tests/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.php new file mode 100644 index 000000000000..81783415f44b --- /dev/null +++ b/samples/client/echo_api/php-nextgen/tests/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.php @@ -0,0 +1,91 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "values" + */ + public function testPropertyValues() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} From 9170e1030f4c10b460d30d507db4e8996a87b23a Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 13 Sep 2023 15:49:38 +0800 Subject: [PATCH 15/59] fix enum in python flask (#16576) --- bin/configs/python-flask.yaml | 2 +- .../languages/AbstractPythonCodegen.java | 13 + .../AbstractPythonConnexionServerCodegen.java | 21 +- .../languages/PythonClientCodegen.java | 14 - .../resources/python-flask/model.mustache | 2 +- .../resources/2_0/python-flask/petstore.yaml | 703 ++++++++++++++++++ .../python-flask/.openapi-generator/FILES | 1 + .../openapi_server/models/__init__.py | 1 + .../openapi_server/models/enum_model.py | 42 ++ .../openapi_server/openapi/openapi.yaml | 8 + 10 files changed, 774 insertions(+), 33 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/2_0/python-flask/petstore.yaml create mode 100644 samples/server/petstore/python-flask/openapi_server/models/enum_model.py diff --git a/bin/configs/python-flask.yaml b/bin/configs/python-flask.yaml index c8bc1d08f5d4..570206be2bc1 100644 --- a/bin/configs/python-flask.yaml +++ b/bin/configs/python-flask.yaml @@ -1,4 +1,4 @@ generatorName: python-flask outputDir: samples/server/petstore/python-flask -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +inputSpec: modules/openapi-generator/src/test/resources/2_0/python-flask/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/python-flask diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java index c571b09f6bb7..c721a3c4c282 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java @@ -1981,4 +1981,17 @@ public String toEnumValue(String value, String datatype) { public String toEnumDefaultValue(String value, String datatype) { return value; } + + /** + * checks if the data should be classified as "string" in enum + * e.g. double in C# needs to be double-quoted (e.g. "2.8") by treating it as a string + * In the future, we may rename this function to "isEnumString" + * + * @param dataType data type + * @return true if it's a enum string + */ + @Override + public boolean isDataTypeString(String dataType) { + return "str".equals(dataType); + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonConnexionServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonConnexionServerCodegen.java index 9fdfde04999f..a171b8f77513 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonConnexionServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonConnexionServerCodegen.java @@ -16,17 +16,9 @@ package org.openapitools.codegen.languages; -import static org.openapitools.codegen.utils.StringUtils.camelize; - import java.io.File; import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.CliOption; @@ -69,6 +61,8 @@ import io.swagger.v3.oas.models.parameters.RequestBody; import io.swagger.v3.oas.models.security.SecurityScheme; +import static org.openapitools.codegen.utils.StringUtils.*; + public abstract class AbstractPythonConnexionServerCodegen extends AbstractPythonCodegen implements CodegenConfig { private static class PythonBooleanSerializer extends JsonSerializer { @Override @@ -178,7 +172,7 @@ public AbstractPythonConnexionServerCodegen(String templateDirectory, boolean fi cliOptions.add(new CliOption(USE_PYTHON_SRC_ROOT_IN_IMPORTS, "include pythonSrcRoot in import namespaces."). defaultValue("false")); cliOptions.add(new CliOption(MOVE_TESTS_UNDER_PYTHON_SRC_ROOT, "generates test under the pythonSrcRoot folder.") - .defaultValue("false")); + .defaultValue("false")); } protected void addSupportingFiles() { @@ -333,7 +327,6 @@ public String toApiName(String name) { } - @Override public String toApiTestFilename(String name) { return "test_" + toApiFilename(name); @@ -636,12 +629,6 @@ public void postProcessModelProperty(CodegenModel model, CodegenProperty propert postProcessPattern(property.pattern, property.vendorExtensions); } - @Override - public ModelsMap postProcessModels(ModelsMap objs) { - // process enum in models - return postProcessModelsEnum(objs); - } - @Override public Map postProcessAllModels(Map objs) { Map result = super.postProcessAllModels(objs); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index b6dc45052487..68aba6465839 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -464,20 +464,6 @@ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Sc } } - - /** - * checks if the data should be classified as "string" in enum - * e.g. double in C# needs to be double-quoted (e.g. "2.8") by treating it as a string - * In the future, we may rename this function to "isEnumString" - * - * @param dataType data type - * @return true if it's a enum string - */ - @Override - public boolean isDataTypeString(String dataType) { - return "str".equals(dataType); - } - @Override public String escapeReservedWord(String name) { if (this.reservedWordsMappings().containsKey(name)) { diff --git a/modules/openapi-generator/src/main/resources/python-flask/model.mustache b/modules/openapi-generator/src/main/resources/python-flask/model.mustache index b96033456082..47394704bf96 100644 --- a/modules/openapi-generator/src/main/resources/python-flask/model.mustache +++ b/modules/openapi-generator/src/main/resources/python-flask/model.mustache @@ -29,7 +29,7 @@ class {{classname}}(Model): allowed enum values """ {{#enumVars}} - {{name}} = {{{value}}}{{^-last}} + {{{name}}} = {{{value}}}{{^-last}} {{/-last}} {{/enumVars}} {{/allowableValues}} diff --git a/modules/openapi-generator/src/test/resources/2_0/python-flask/petstore.yaml b/modules/openapi-generator/src/test/resources/2_0/python-flask/petstore.yaml new file mode 100644 index 000000000000..952104fbb701 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/2_0/python-flask/petstore.yaml @@ -0,0 +1,703 @@ +swagger: '2.0' +info: + description: 'This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.' + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +host: petstore.swagger.io +basePath: /v2 +tags: + - name: pet + description: Everything about your Pets + - name: store + description: Access to Petstore orders + - name: user + description: Operations about user +schemes: + - http +paths: + /pet: + post: + tags: + - pet + summary: Add a new pet to the store + description: '' + operationId: addPet + consumes: + - application/json + - application/xml + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: Pet object that needs to be added to the store + required: true + schema: + $ref: '#/definitions/Pet' + responses: + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + put: + tags: + - pet + summary: Update an existing pet + description: '' + operationId: updatePet + consumes: + - application/json + - application/xml + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: Pet object that needs to be added to the store + required: true + schema: + $ref: '#/definitions/Pet' + responses: + '400': + description: Invalid ID supplied + '404': + description: Pet not found + '405': + description: Validation exception + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + produces: + - application/xml + - application/json + parameters: + - name: status + in: query + description: Status values that need to be considered for filter + required: true + type: array + items: + type: string + enum: + - available + - pending + - sold + default: available + collectionFormat: csv + responses: + '200': + description: successful operation + schema: + type: array + items: + $ref: '#/definitions/Pet' + '400': + description: Invalid status value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags + description: 'Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.' + operationId: findPetsByTags + produces: + - application/xml + - application/json + parameters: + - name: tags + in: query + description: Tags to filter by + required: true + type: array + items: + type: string + collectionFormat: csv + responses: + '200': + description: successful operation + schema: + type: array + items: + $ref: '#/definitions/Pet' + '400': + description: Invalid tag value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + deprecated: true + '/pet/{petId}': + get: + tags: + - pet + summary: Find pet by ID + description: Returns a single pet + operationId: getPetById + produces: + - application/xml + - application/json + parameters: + - name: petId + in: path + description: ID of pet to return + required: true + type: integer + format: int64 + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + security: + - api_key: [] + post: + tags: + - pet + summary: Updates a pet in the store with form data + description: '' + operationId: updatePetWithForm + consumes: + - application/x-www-form-urlencoded + produces: + - application/xml + - application/json + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + type: integer + format: int64 + - name: name + in: formData + description: Updated name of the pet + required: false + type: string + - name: status + in: formData + description: Updated status of the pet + required: false + type: string + responses: + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + delete: + tags: + - pet + summary: Deletes a pet + description: '' + operationId: deletePet + produces: + - application/xml + - application/json + parameters: + - name: api_key + in: header + required: false + type: string + - name: petId + in: path + description: Pet id to delete + required: true + type: integer + format: int64 + responses: + '400': + description: Invalid pet value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + '/pet/{petId}/uploadImage': + post: + tags: + - pet + summary: uploads an image + description: '' + operationId: uploadFile + consumes: + - multipart/form-data + produces: + - application/json + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + type: integer + format: int64 + - name: additionalMetadata + in: formData + description: Additional data to pass to server + required: false + type: string + - name: file + in: formData + description: file to upload + required: false + type: file + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status + description: Returns a map of status codes to quantities + operationId: getInventory + produces: + - application/json + parameters: [] + responses: + '200': + description: successful operation + schema: + type: object + additionalProperties: + type: integer + format: int32 + security: + - api_key: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet + description: '' + operationId: placeOrder + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: order placed for purchasing the pet + required: true + schema: + $ref: '#/definitions/Order' + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/Order' + '400': + description: Invalid Order + '/store/order/{orderId}': + get: + tags: + - store + summary: Find purchase order by ID + description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions' + operationId: getOrderById + produces: + - application/xml + - application/json + parameters: + - name: orderId + in: path + description: ID of pet that needs to be fetched + required: true + type: integer + maximum: 5 + minimum: 1 + format: int64 + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/Order' + '400': + description: Invalid ID supplied + '404': + description: Order not found + delete: + tags: + - store + summary: Delete purchase order by ID + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: deleteOrder + produces: + - application/xml + - application/json + parameters: + - name: orderId + in: path + description: ID of the order that needs to be deleted + required: true + type: string + responses: + '400': + description: Invalid ID supplied + '404': + description: Order not found + /user: + post: + tags: + - user + summary: Create user + description: This can only be done by the logged in user. + operationId: createUser + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: Created user object + required: true + schema: + $ref: '#/definitions/User' + responses: + default: + description: successful operation + /user/createWithArray: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithArrayInput + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: List of user object + required: true + schema: + type: array + items: + $ref: '#/definitions/User' + responses: + default: + description: successful operation + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithListInput + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: List of user object + required: true + schema: + type: array + items: + $ref: '#/definitions/User' + responses: + default: + description: successful operation + /user/login: + get: + tags: + - user + summary: Logs user into the system + description: '' + operationId: loginUser + produces: + - application/xml + - application/json + parameters: + - name: username + in: query + description: The user name for login + required: true + type: string + - name: password + in: query + description: The password for login in clear text + required: true + type: string + responses: + '200': + description: successful operation + schema: + type: string + headers: + X-Rate-Limit: + type: integer + format: int32 + description: calls per hour allowed by the user + X-Expires-After: + type: string + format: date-time + description: date in UTC when token expires + '400': + description: Invalid username/password supplied + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session + description: '' + operationId: logoutUser + produces: + - application/xml + - application/json + parameters: [] + responses: + default: + description: successful operation + '/user/{username}': + get: + tags: + - user + summary: Get user by user name + description: '' + operationId: getUserByName + produces: + - application/xml + - application/json + parameters: + - name: username + in: path + description: 'The name that needs to be fetched. Use user1 for testing.' + required: true + type: string + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/User' + '400': + description: Invalid username supplied + '404': + description: User not found + put: + tags: + - user + summary: Updated user + description: This can only be done by the logged in user. + operationId: updateUser + produces: + - application/xml + - application/json + parameters: + - name: username + in: path + description: name that need to be deleted + required: true + type: string + - in: body + name: body + description: Updated user object + required: true + schema: + $ref: '#/definitions/User' + responses: + '400': + description: Invalid user supplied + '404': + description: User not found + delete: + tags: + - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + produces: + - application/xml + - application/json + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + type: string + responses: + '400': + description: Invalid username supplied + '404': + description: User not found +securityDefinitions: + petstore_auth: + type: oauth2 + authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog' + flow: implicit + scopes: + 'write:pets': modify pets in your account + 'read:pets': read your pets + api_key: + type: apiKey + name: api_key + in: header +definitions: + Order: + title: Pet Order + description: An order for a pets from the pet store + type: object + properties: + id: + type: integer + format: int64 + petId: + type: integer + format: int64 + quantity: + type: integer + format: int32 + shipDate: + type: string + format: date-time + status: + type: string + description: Order Status + enum: + - placed + - approved + - delivered + complete: + type: boolean + default: false + xml: + name: Order + Category: + title: Pet category + description: A category for a pet + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Category + User: + title: a User + description: A User who is purchasing from the pet store + type: object + properties: + id: + type: integer + format: int64 + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + type: integer + format: int32 + description: User Status + xml: + name: User + Tag: + title: Pet Tag + description: A tag for a pet + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Tag + Pet: + title: a Pet + description: A pet for sale in the pet store + type: object + required: + - name + - photoUrls + properties: + id: + type: integer + format: int64 + category: + $ref: '#/definitions/Category' + name: + type: string + example: doggie + photoUrls: + type: array + xml: + name: photoUrl + wrapped: true + items: + type: string + tags: + type: array + xml: + name: tag + wrapped: true + items: + $ref: '#/definitions/Tag' + status: + type: string + description: pet status in the store + enum: + - available + - pending + - sold + xml: + name: Pet + ApiResponse: + title: An uploaded response + description: Describes the result of uploading an image resource + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string + EnumModel: + enum: + - available> + - pending< + - sold + - 1 + - 2 + type: string diff --git a/samples/server/petstore/python-flask/.openapi-generator/FILES b/samples/server/petstore/python-flask/.openapi-generator/FILES index 9dbaae5533b5..c08d341ed532 100644 --- a/samples/server/petstore/python-flask/.openapi-generator/FILES +++ b/samples/server/petstore/python-flask/.openapi-generator/FILES @@ -16,6 +16,7 @@ openapi_server/models/__init__.py openapi_server/models/api_response.py openapi_server/models/base_model.py openapi_server/models/category.py +openapi_server/models/enum_model.py openapi_server/models/order.py openapi_server/models/pet.py openapi_server/models/tag.py diff --git a/samples/server/petstore/python-flask/openapi_server/models/__init__.py b/samples/server/petstore/python-flask/openapi_server/models/__init__.py index 24ea9866d7bf..21d4d1aeb93d 100644 --- a/samples/server/petstore/python-flask/openapi_server/models/__init__.py +++ b/samples/server/petstore/python-flask/openapi_server/models/__init__.py @@ -2,6 +2,7 @@ # import models into model package from openapi_server.models.api_response import ApiResponse from openapi_server.models.category import Category +from openapi_server.models.enum_model import EnumModel from openapi_server.models.order import Order from openapi_server.models.pet import Pet from openapi_server.models.tag import Tag diff --git a/samples/server/petstore/python-flask/openapi_server/models/enum_model.py b/samples/server/petstore/python-flask/openapi_server/models/enum_model.py new file mode 100644 index 000000000000..5d60d2aaef2f --- /dev/null +++ b/samples/server/petstore/python-flask/openapi_server/models/enum_model.py @@ -0,0 +1,42 @@ +from datetime import date, datetime # noqa: F401 + +from typing import List, Dict # noqa: F401 + +from openapi_server.models.base_model import Model +from openapi_server import util + + +class EnumModel(Model): + """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + AVAILABLE_GREATER_THAN = 'available>' + PENDING_LESS_THAN = 'pending<' + SOLD = 'sold' + ENUM_1 = '1' + ENUM_2 = '2' + def __init__(self): # noqa: E501 + """EnumModel - a model defined in OpenAPI + + """ + self.openapi_types = { + } + + self.attribute_map = { + } + + @classmethod + def from_dict(cls, dikt) -> 'EnumModel': + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The EnumModel of this EnumModel. # noqa: E501 + :rtype: EnumModel + """ + return util.deserialize_model(dikt, cls) diff --git a/samples/server/petstore/python-flask/openapi_server/openapi/openapi.yaml b/samples/server/petstore/python-flask/openapi_server/openapi/openapi.yaml index 92baa6a0525e..21e70929a17c 100644 --- a/samples/server/petstore/python-flask/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/python-flask/openapi_server/openapi/openapi.yaml @@ -780,6 +780,14 @@ components: type: string title: An uploaded response type: object + EnumModel: + enum: + - available> + - pending< + - sold + - "1" + - "2" + type: string updatePetWithForm_request: properties: name: From 353507ef23caa898e7cebc70cf21a212c8e27e94 Mon Sep 17 00:00:00 2001 From: Kado Yasuyuki Date: Thu, 14 Sep 2023 11:29:08 +0900 Subject: [PATCH 16/59] Java 11 (#16581) --- .java-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.java-version b/.java-version index 6259340971be..b4de39476753 100644 --- a/.java-version +++ b/.java-version @@ -1 +1 @@ -1.8 +11 From 82e3590eed5497b3c2b18ec0787843ea957c11eb Mon Sep 17 00:00:00 2001 From: mol-pensiondk <96067271+mol-pensiondk@users.noreply.github.com> Date: Thu, 14 Sep 2023 06:03:26 +0200 Subject: [PATCH 17/59] Update AbstractCSharpCodegen.java (#16577) Fixed a bug in postProcessAllModels, changing an anyOf to a oneOf. --- .../openapitools/codegen/languages/AbstractCSharpCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index 60b9060890fe..46bb9df4aa1e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -527,7 +527,7 @@ public Map postProcessAllModels(Map objs) // GrandparentAnimal has a discriminator, but no oneOf nor anyOf // modules\openapi-generator\src\test\resources\3_0\csharp\petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml model.setHasDiscriminatorWithNonEmptyMapping( - ((model.anyOf != null && model.anyOf.size() > 0) || (model.anyOf != null && model.oneOf.size() > 0)) && + ((model.anyOf != null && model.anyOf.size() > 0) || (model.oneOf != null && model.oneOf.size() > 0)) && model.discriminator != null && model.discriminator.getMappedModels() != null && model.discriminator.getMappedModels().size() > 0); From ec593349046bbeb993a3e12b0c9a6558179d5ead Mon Sep 17 00:00:00 2001 From: Kado Yasuyuki Date: Thu, 14 Sep 2023 14:33:06 +0900 Subject: [PATCH 18/59] Fix ValidateTask failure if recommend is not assigned (#16580) * spec for recommend test * add ValidateTask test for custom defined tasks * add ValidateTask test for recommend option * ValidateTask recommend default value is true --- .../OpenApiGeneratorValidateExtension.kt | 9 +- .../gradle/plugin/tasks/ValidateTask.kt | 2 +- .../src/test/kotlin/ValidateTaskDslTest.kt | 157 ++++++++++++++++++ .../specs/petstore-v3.0-recommend.yaml | 114 +++++++++++++ 4 files changed, 273 insertions(+), 9 deletions(-) create mode 100644 modules/openapi-generator-gradle-plugin/src/test/resources/specs/petstore-v3.0-recommend.yaml diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorValidateExtension.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorValidateExtension.kt index 395481456b33..fb72552ee6e5 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorValidateExtension.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorValidateExtension.kt @@ -33,12 +33,5 @@ open class OpenApiGeneratorValidateExtension(project: Project) { /** * Whether to offer recommendations related to the validated specification document. */ - val recommend = project.objects.property() - - init { - applyDefaults() - } - - @Suppress("MemberVisibilityCanBePrivate") - fun applyDefaults() = recommend.set(true) + val recommend = project.objects.property().convention(true) } \ No newline at end of file diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt index da442383e0eb..f379e6c45d21 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt @@ -58,7 +58,7 @@ open class ValidateTask : DefaultTask() { @Optional @Input - val recommend = project.objects.property() + val recommend = project.objects.property().convention(true) @get:Internal @set:Option(option = "input", description = "The input specification.") diff --git a/modules/openapi-generator-gradle-plugin/src/test/kotlin/ValidateTaskDslTest.kt b/modules/openapi-generator-gradle-plugin/src/test/kotlin/ValidateTaskDslTest.kt index ac457cda6431..ff05a5784ca1 100644 --- a/modules/openapi-generator-gradle-plugin/src/test/kotlin/ValidateTaskDslTest.kt +++ b/modules/openapi-generator-gradle-plugin/src/test/kotlin/ValidateTaskDslTest.kt @@ -144,4 +144,161 @@ class ValidateTaskDslTest : TestBase() { "Expected a failed run, but found ${result.task(":openApiValidate")?.outcome}" ) } + + @Test(dataProvider = "gradle_version_provider") + fun `validateGoodSpec as defined task should succeed on valid spec`(gradleVersion: String?) { + // Arrange + val projectFiles = mapOf( + "spec.yaml" to javaClass.classLoader.getResourceAsStream("specs/petstore-v3.0.yaml") + ) + + withProject( + """ + | plugins { + | id 'org.openapi.generator' + | } + | + | task validateGoodSpec(type: org.openapitools.generator.gradle.plugin.tasks.ValidateTask) { + | inputSpec.set(file("spec.yaml").absolutePath) + | } + """.trimMargin(), projectFiles + ) + + // Act + val result = getGradleRunner(gradleVersion) + .withProjectDir(temp) + .withArguments("validateGoodSpec") + .withPluginClasspath() + .build() + + // Assert + assertTrue( + result.output.contains("Spec is valid."), + "Unexpected/no message presented to the user for a valid spec." + ) + assertEquals( + SUCCESS, result.task(":validateGoodSpec")?.outcome, + "Expected a successful run, but found ${result.task(":validateGoodSpec")?.outcome}" + ) + } + + @Test(dataProvider = "gradle_version_provider") + fun `validateBadSpec as defined task should fail on invalid spec`(gradleVersion: String?) { + // Arrange + val projectFiles = mapOf( + "spec.yaml" to javaClass.classLoader.getResourceAsStream("specs/petstore-v3.0-invalid.yaml") + ) + withProject( + """ + | plugins { + | id 'org.openapi.generator' + | } + | + | task validateBadSpec(type: org.openapitools.generator.gradle.plugin.tasks.ValidateTask) { + | inputSpec.set(file("spec.yaml").absolutePath) + | } + """.trimMargin(), projectFiles + ) + + // Act + val result = getGradleRunner(gradleVersion) + .withProjectDir(temp) + .withArguments("validateBadSpec") + .withPluginClasspath() + .buildAndFail() + + // Assert + assertTrue( + result.output.contains("Spec is invalid."), + "Unexpected/no message presented to the user for an invalid spec." + ) + assertEquals( + FAILED, result.task(":validateBadSpec")?.outcome, + "Expected a failed run, but found ${result.task(":validateBadSpec")?.outcome}" + ) + } + + @Test(dataProvider = "gradle_version_provider") + fun `openApiValidate should succeed with recommendations on valid spec`(gradleVersion: String?) { + // Arrange + val projectFiles = mapOf( + "spec.yaml" to javaClass.classLoader.getResourceAsStream("specs/petstore-v3.0-recommend.yaml") + ) + + // recommend = true is the default + withProject( + """ + | plugins { + | id 'org.openapi.generator' + | } + | + | openApiValidate { + | inputSpec = file("spec.yaml").absolutePath + | } + """.trimMargin(), projectFiles + ) + + // Act + val result = getGradleRunner(gradleVersion) + .withProjectDir(temp) + .withArguments("openApiValidate") + .withPluginClasspath() + .build() + + // Assert + assertTrue( + result.output.contains("Spec is valid."), + "Unexpected/no message presented to the user for a valid spec." + ) + assertTrue( + result.output.contains("Spec has issues or recommendations."), + "Unexpected/no recommendations message presented to the user for a valid spec." + ) + assertEquals( + SUCCESS, result.task(":openApiValidate")?.outcome, + "Expected a successful run, but found ${result.task(":openApiValidate")?.outcome}" + ) + } + + @Test(dataProvider = "gradle_version_provider") + fun `openApiValidate should succeed without recommendations on valid spec`(gradleVersion: String?) { + // Arrange + val projectFiles = mapOf( + "spec.yaml" to javaClass.classLoader.getResourceAsStream("specs/petstore-v3.0-recommend.yaml") + ) + + withProject( + """ + | plugins { + | id 'org.openapi.generator' + | } + | + | openApiValidate { + | inputSpec = file("spec.yaml").absolutePath + | recommend = false + | } + """.trimMargin(), projectFiles + ) + + // Act + val result = getGradleRunner(gradleVersion) + .withProjectDir(temp) + .withArguments("openApiValidate") + .withPluginClasspath() + .build() + + // Assert + assertTrue( + result.output.contains("Spec is valid."), + "Unexpected/no message presented to the user for a valid spec." + ) + assertTrue( + result.output.contains("Spec has issues or recommendations.").not(), + "Unexpected/recommendations message presented to the user for a valid spec" + ) + assertEquals( + SUCCESS, result.task(":openApiValidate")?.outcome, + "Expected a successful run, but found ${result.task(":openApiValidate")?.outcome}" + ) + } } diff --git a/modules/openapi-generator-gradle-plugin/src/test/resources/specs/petstore-v3.0-recommend.yaml b/modules/openapi-generator-gradle-plugin/src/test/resources/specs/petstore-v3.0-recommend.yaml new file mode 100644 index 000000000000..2319a08b2597 --- /dev/null +++ b/modules/openapi-generator-gradle-plugin/src/test/resources/specs/petstore-v3.0-recommend.yaml @@ -0,0 +1,114 @@ +openapi: "3.0.0" +info: + version: 1.0.0 + title: Swagger Petstore + license: + name: MIT +servers: + - url: http://petstore.swagger.io/v1 +paths: + /pets: + get: + summary: List all pets + operationId: listPets + tags: + - pets + parameters: + - name: limit + in: query + description: How many items to return at one time (max 100) + required: false + schema: + type: integer + format: int32 + requestBody: # warning `API GET/HEAD defined with request body` + content: + application/json: + schema: + $ref: "#/components/schemas/Pets" + responses: + '200': + description: A paged array of pets + headers: + x-next: + description: A link to the next page of responses + schema: + type: string + content: + application/json: + schema: + $ref: "#/components/schemas/Pets" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + post: + summary: Create a pet + operationId: createPets + tags: + - pets + responses: + '201': + description: Null response + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /pets/{petId}: + get: + summary: Info for a specific pet + operationId: showPetById + tags: + - pets + parameters: + - name: petId + in: path + required: true + description: The id of the pet to retrieve + schema: + type: string + responses: + '200': + description: Expected response to a valid request + content: + application/json: + schema: + $ref: "#/components/schemas/Pets" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" +components: + schemas: + Pet: + required: + - id + - name + properties: + id: + type: integer + format: int64 + name: + type: string + tag: + type: string + Pets: + type: array + items: + $ref: "#/components/schemas/Pet" + Error: + required: + - code + - message + properties: + code: + type: integer + format: int32 + message: + type: string From e75e5a2c571a31cb6eb784b163e0581b16221976 Mon Sep 17 00:00:00 2001 From: Barczi Date: Thu, 14 Sep 2023 11:36:01 +0100 Subject: [PATCH 19/59] [swift] remove unavailable property to fix Xcode 15 compiler error (#16504) --- .../urlsession/URLSessionImplementations.mustache | 9 --------- .../Classes/OpenAPIs/URLSessionImplementations.swift | 9 --------- .../Classes/OpenAPIs/URLSessionImplementations.swift | 9 --------- .../Classes/OpenAPIs/URLSessionImplementations.swift | 9 --------- .../Classes/OpenAPIs/URLSessionImplementations.swift | 9 --------- .../Classes/OpenAPIs/URLSessionImplementations.swift | 9 --------- .../Classes/OpenAPIs/URLSessionImplementations.swift | 9 --------- .../Classes/OpenAPIs/URLSessionImplementations.swift | 9 --------- .../Classes/OpenAPIs/URLSessionImplementations.swift | 9 --------- .../Classes/OpenAPIs/URLSessionImplementations.swift | 9 --------- .../Classes/OpenAPIs/URLSessionImplementations.swift | 9 --------- .../Classes/OpenAPIs/URLSessionImplementations.swift | 9 --------- .../Classes/OpenAPIs/URLSessionImplementations.swift | 9 --------- .../Classes/OpenAPIs/URLSessionImplementations.swift | 9 --------- .../PetstoreClient/URLSessionImplementations.swift | 9 --------- .../Classes/OpenAPIs/URLSessionImplementations.swift | 9 --------- .../Classes/OpenAPIs/URLSessionImplementations.swift | 9 --------- 17 files changed, 153 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache b/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache index a6e7fe0b3fb8..60cda3243d8b 100644 --- a/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache @@ -46,15 +46,6 @@ private var credentialStore = SynchronizedDictionary() */ {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var taskDidReceiveChallenge: {{projectName}}APIChallengeHandler? - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, unavailable, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - required {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) } diff --git a/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6315677bcdfc..5d75bbfecb7d 100644 --- a/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/anycodableLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -46,15 +46,6 @@ open class URLSessionRequestBuilder: RequestBuilder { */ public var taskDidReceiveChallenge: PetstoreClientAPIChallengeHandler? - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, unavailable, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) } diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6315677bcdfc..5d75bbfecb7d 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -46,15 +46,6 @@ open class URLSessionRequestBuilder: RequestBuilder { */ public var taskDidReceiveChallenge: PetstoreClientAPIChallengeHandler? - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, unavailable, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) } diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6315677bcdfc..5d75bbfecb7d 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -46,15 +46,6 @@ open class URLSessionRequestBuilder: RequestBuilder { */ public var taskDidReceiveChallenge: PetstoreClientAPIChallengeHandler? - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, unavailable, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) } diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6315677bcdfc..5d75bbfecb7d 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -46,15 +46,6 @@ open class URLSessionRequestBuilder: RequestBuilder { */ public var taskDidReceiveChallenge: PetstoreClientAPIChallengeHandler? - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, unavailable, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) } diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6315677bcdfc..5d75bbfecb7d 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -46,15 +46,6 @@ open class URLSessionRequestBuilder: RequestBuilder { */ public var taskDidReceiveChallenge: PetstoreClientAPIChallengeHandler? - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, unavailable, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) } diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6315677bcdfc..5d75bbfecb7d 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -46,15 +46,6 @@ open class URLSessionRequestBuilder: RequestBuilder { */ public var taskDidReceiveChallenge: PetstoreClientAPIChallengeHandler? - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, unavailable, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) } diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 0a81c0ec9354..bb1f168079ea 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -46,15 +46,6 @@ internal class URLSessionRequestBuilder: RequestBuilder { */ internal var taskDidReceiveChallenge: PetstoreClientAPIChallengeHandler? - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, unavailable, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - internal var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - required internal init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6315677bcdfc..5d75bbfecb7d 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -46,15 +46,6 @@ open class URLSessionRequestBuilder: RequestBuilder { */ public var taskDidReceiveChallenge: PetstoreClientAPIChallengeHandler? - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, unavailable, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) } diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6315677bcdfc..5d75bbfecb7d 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -46,15 +46,6 @@ open class URLSessionRequestBuilder: RequestBuilder { */ public var taskDidReceiveChallenge: PetstoreClientAPIChallengeHandler? - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, unavailable, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) } diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6315677bcdfc..5d75bbfecb7d 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -46,15 +46,6 @@ open class URLSessionRequestBuilder: RequestBuilder { */ public var taskDidReceiveChallenge: PetstoreClientAPIChallengeHandler? - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, unavailable, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) } diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6315677bcdfc..5d75bbfecb7d 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -46,15 +46,6 @@ open class URLSessionRequestBuilder: RequestBuilder { */ public var taskDidReceiveChallenge: PetstoreClientAPIChallengeHandler? - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, unavailable, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) } diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6315677bcdfc..5d75bbfecb7d 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -46,15 +46,6 @@ open class URLSessionRequestBuilder: RequestBuilder { */ public var taskDidReceiveChallenge: PetstoreClientAPIChallengeHandler? - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, unavailable, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6315677bcdfc..5d75bbfecb7d 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -46,15 +46,6 @@ open class URLSessionRequestBuilder: RequestBuilder { */ public var taskDidReceiveChallenge: PetstoreClientAPIChallengeHandler? - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, unavailable, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift index 6315677bcdfc..5d75bbfecb7d 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift @@ -46,15 +46,6 @@ open class URLSessionRequestBuilder: RequestBuilder { */ public var taskDidReceiveChallenge: PetstoreClientAPIChallengeHandler? - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, unavailable, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) } diff --git a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6315677bcdfc..5d75bbfecb7d 100644 --- a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -46,15 +46,6 @@ open class URLSessionRequestBuilder: RequestBuilder { */ public var taskDidReceiveChallenge: PetstoreClientAPIChallengeHandler? - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, unavailable, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) } diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 6315677bcdfc..5d75bbfecb7d 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -46,15 +46,6 @@ open class URLSessionRequestBuilder: RequestBuilder { */ public var taskDidReceiveChallenge: PetstoreClientAPIChallengeHandler? - /** - May be assigned if you want to do any of those things: - - control the task completion - - intercept and handle errors like authorization - - retry the request. - */ - @available(*, unavailable, message: "Please override execute() method to intercept and handle errors like authorization or retry the request. Check the Wiki for more info. https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-do-i-implement-bearer-token-authentication-with-urlsession-on-the-swift-api-client") - public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - required public init(method: String, URLString: String, parameters: [String: Any]?, headers: [String: String] = [:], requiresAuthentication: Bool) { super.init(method: method, URLString: URLString, parameters: parameters, headers: headers, requiresAuthentication: requiresAuthentication) } From d671fe24eeb124856cf3990a79ffd2c647ed64e2 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 15 Sep 2023 13:42:11 +0800 Subject: [PATCH 20/59] better null check to avoid NPE (#16588) --- .../openapitools/codegen/DefaultCodegen.java | 9 ++++ .../codegen/DefaultGenerator.java | 6 ++- .../codegen/InlineModelResolver.java | 51 ++++++++++++------- .../codegen/utils/ModelUtils.java | 20 +++++++- 4 files changed, 65 insertions(+), 21 deletions(-) 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 3c58a95deeae..e0e409926dd1 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 @@ -478,6 +478,11 @@ public Map postProcessAllModels(Map objs) for (Map.Entry entry : objs.entrySet()) { CodegenModel model = ModelUtils.getModelByName(entry.getKey(), objs); + if (model == null) { + LOGGER.warn("Null model found in postProcessAllModels: {}", entry.getKey()); + continue; + } + // add the model to the discriminator's mapping so templates have access to more than just the string to string mapping if (model.discriminator != null && model.discriminator.getMappedModels() != null) { for (CodegenDiscriminator.MappedModel mappedModel : model.discriminator.getMappedModels()) { @@ -5977,6 +5982,10 @@ Map getAllAliases(Map schemas) { } private static Boolean isAliasOfSimpleTypes(Schema schema) { + if (schema == null) { + return false; + } + return (!ModelUtils.isObjectSchema(schema) && !ModelUtils.isArraySchema(schema) && !ModelUtils.isMapSchema(schema) 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 471b0364fe0c..be8aeeae5472 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 @@ -1334,8 +1334,10 @@ private ModelsMap processModels(CodegenConfig config, Map defini for (Map.Entry definitionsEntry : definitions.entrySet()) { String key = definitionsEntry.getKey(); Schema schema = definitionsEntry.getValue(); - if (schema == null) - throw new RuntimeException("schema cannot be null in processModels"); + if (schema == null) { + LOGGER.warn("Schema {} cannot be null in processModels", key); + continue; + } CodegenModel cm = config.fromModel(key, schema); ModelMap mo = new ModelMap(); mo.setModel(cm); 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 e395be243324..20ce9f3ad403 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 @@ -286,6 +286,11 @@ private void gatherInlineModels(Schema schema, String modelPrefix) { if (props != null) { for (String propName : props.keySet()) { Schema prop = props.get(propName); + + if (prop == null) { + continue; + } + String schemaName = resolveModelName(prop.getTitle(), modelPrefix + "_" + propName); // Recurse to create $refs for inner models gatherInlineModels(prop, schemaName); @@ -308,13 +313,15 @@ private void gatherInlineModels(Schema schema, String modelPrefix) { if (schema.getAdditionalProperties() != null) { if (schema.getAdditionalProperties() instanceof Schema) { Schema inner = (Schema) schema.getAdditionalProperties(); - String schemaName = resolveModelName(schema.getTitle(), modelPrefix + this.inlineSchemaOptions.get("MAP_ITEM_SUFFIX")); - // Recurse to create $refs for inner models - gatherInlineModels(inner, schemaName); - if (isModelNeeded(inner)) { - // If this schema should be split into its own model, do so - Schema refSchema = this.makeSchemaInComponents(schemaName, inner); - schema.setAdditionalProperties(refSchema); + if (inner != null) { + String schemaName = resolveModelName(schema.getTitle(), modelPrefix + this.inlineSchemaOptions.get("MAP_ITEM_SUFFIX")); + // Recurse to create $refs for inner models + gatherInlineModels(inner, schemaName); + if (isModelNeeded(inner)) { + // If this schema should be split into its own model, do so + Schema refSchema = this.makeSchemaInComponents(schemaName, inner); + schema.setAdditionalProperties(refSchema); + } } } } @@ -334,10 +341,6 @@ private void gatherInlineModels(Schema schema, String modelPrefix) { if (schema instanceof ArraySchema) { ArraySchema array = (ArraySchema) schema; Schema items = array.getItems(); - /*if (items.getTitle() != null) { - LOGGER.info("schema title {}", items); - throw new RuntimeException("getTitle for array item is not null"); - }*/ if (items == null) { LOGGER.error("Illegal schema found with array type but no items," + " items must be defined for array schemas:\n " + schema.toString()); @@ -360,6 +363,9 @@ private void gatherInlineModels(Schema schema, String modelPrefix) { List newAllOf = new ArrayList(); boolean atLeastOneModel = false; for (Object inner : schema.getAllOf()) { + if (inner == null) { + continue; + } String schemaName = resolveModelName(((Schema) inner).getTitle(), modelPrefix + "_allOf"); // Recurse to create $refs for inner models gatherInlineModels((Schema) inner, schemaName); @@ -392,6 +398,9 @@ private void gatherInlineModels(Schema schema, String modelPrefix) { if (schema.getAnyOf() != null) { List newAnyOf = new ArrayList(); for (Object inner : schema.getAnyOf()) { + if (inner == null) { + continue; + } String schemaName = resolveModelName(((Schema) inner).getTitle(), modelPrefix + "_anyOf"); // Recurse to create $refs for inner models gatherInlineModels((Schema) inner, schemaName); @@ -407,6 +416,9 @@ private void gatherInlineModels(Schema schema, String modelPrefix) { if (schema.getOneOf() != null) { List newOneOf = new ArrayList(); for (Object inner : schema.getOneOf()) { + if (inner == null) { + continue; + } String schemaName = resolveModelName(((Schema) inner).getTitle(), modelPrefix + "_oneOf"); // Recurse to create $refs for inner models gatherInlineModels((Schema) inner, schemaName); @@ -423,12 +435,14 @@ private void gatherInlineModels(Schema schema, String modelPrefix) { // Check not schema if (schema.getNot() != null) { Schema not = schema.getNot(); - String schemaName = resolveModelName(schema.getTitle(), modelPrefix + "_not"); - // Recurse to create $refs for inner models - gatherInlineModels(not, schemaName); - if (isModelNeeded(not)) { - Schema refSchema = this.makeSchemaInComponents(schemaName, not); - schema.setNot(refSchema); + if (not != null) { + String schemaName = resolveModelName(schema.getTitle(), modelPrefix + "_not"); + // Recurse to create $refs for inner models + gatherInlineModels(not, schemaName); + if (isModelNeeded(not)) { + Schema refSchema = this.makeSchemaInComponents(schemaName, not); + schema.setNot(refSchema); + } } } } @@ -629,6 +643,9 @@ private void flattenComponents() { List modelNames = new ArrayList(models.keySet()); for (String modelName : modelNames) { Schema model = models.get(modelName); + if (model == null) { + continue; + } if (ModelUtils.isAnyOf(model)) { // contains anyOf only gatherInlineModels(model, modelName); } else if (ModelUtils.isOneOf(model)) { // contains oneOf only 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 e3edb79ff39b..838df6ce5e09 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 @@ -438,6 +438,10 @@ public static boolean isTypeObjectSchema(Schema schema) { * @return true if the specified schema is an Object schema. */ public static boolean isObjectSchema(Schema schema) { + if (schema == null) { + return false; + } + return (schema instanceof ObjectSchema) || // must not be a map (SchemaTypeUtil.OBJECT_TYPE.equals(schema.getType()) && !(schema instanceof MapSchema)) || @@ -549,6 +553,10 @@ public static boolean isComplexComposedSchema(Schema schema) { * @return true if the specified schema is a Map schema. */ public static boolean isMapSchema(Schema schema) { + if (schema == null) { + return false; + } + // additionalProperties explicitly set to false if (schema.getAdditionalProperties() instanceof Boolean && Boolean.FALSE.equals(schema.getAdditionalProperties())) { return false; @@ -1858,6 +1866,10 @@ public static boolean isAllOfWithProperties(Schema schema) { * @return true if the schema contains oneOf but no properties/allOf/anyOf defined. */ public static boolean isOneOf(Schema schema) { + if (schema == null) { + return false; + } + if (hasOneOf(schema) && (schema.getProperties() == null || schema.getProperties().isEmpty()) && (schema.getAllOf() == null || schema.getAllOf().isEmpty()) && (schema.getAnyOf() == null || schema.getAnyOf().isEmpty())) { @@ -1875,7 +1887,7 @@ public static boolean isOneOf(Schema schema) { * @return true if allOf is not empty */ public static boolean hasOneOf(Schema schema) { - if (schema.getOneOf() != null && !schema.getOneOf().isEmpty()) { + if (schema != null && schema.getOneOf() != null && !schema.getOneOf().isEmpty()) { return true; } @@ -1890,6 +1902,10 @@ public static boolean hasOneOf(Schema schema) { * @return true if the schema contains oneOf but no properties/allOf/anyOf defined. */ public static boolean isAnyOf(Schema schema) { + if (schema == null) { + return false; + } + if (hasAnyOf(schema) && (schema.getProperties() == null || schema.getProperties().isEmpty()) && (schema.getAllOf() == null || schema.getAllOf().isEmpty()) && (schema.getOneOf() == null || schema.getOneOf().isEmpty())) { @@ -1907,7 +1923,7 @@ public static boolean isAnyOf(Schema schema) { * @return true if anyOf is not empty */ public static boolean hasAnyOf(Schema schema) { - if (schema.getAnyOf() != null && !schema.getAnyOf().isEmpty()) { + if (schema != null && schema.getAnyOf() != null && !schema.getAnyOf().isEmpty()) { return true; } From 4b8760666563062917d36e3712767461a36326f2 Mon Sep 17 00:00:00 2001 From: prashant-pant Date: Fri, 15 Sep 2023 12:11:17 +0530 Subject: [PATCH 21/59] Autoset constants (Required fields having single valid enum value) Java (OkHttp) Implementation of #16547 (#16550) * Autosets the parameters with the only value specified as enum if the parameter is also marked as required * Autosets the parameters with the only value specified as enum if the parameter is also marked as required * Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client. * Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client. * Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client. * Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client. --- docs/generators/groovy.md | 1 + docs/generators/java-camel.md | 1 + docs/generators/java-helidon-client.md | 1 + docs/generators/java-helidon-server.md | 1 + docs/generators/java-inflector.md | 1 + docs/generators/java-micronaut-client.md | 1 + docs/generators/java-micronaut-server.md | 1 + docs/generators/java-msf4j.md | 1 + docs/generators/java-pkmst.md | 1 + docs/generators/java-play-framework.md | 1 + docs/generators/java-undertow-server.md | 1 + docs/generators/java-vertx-web.md | 1 + docs/generators/java-vertx.md | 1 + docs/generators/java.md | 1 + docs/generators/jaxrs-cxf-cdi.md | 1 + docs/generators/jaxrs-cxf-client.md | 1 + docs/generators/jaxrs-cxf-extended.md | 1 + docs/generators/jaxrs-cxf.md | 1 + docs/generators/jaxrs-jersey.md | 1 + docs/generators/jaxrs-resteasy-eap.md | 1 + docs/generators/jaxrs-resteasy.md | 1 + docs/generators/jaxrs-spec.md | 1 + docs/generators/spring.md | 1 + .../codegen/CodegenOperation.java | 9 +- .../languages/AbstractJavaCodegen.java | 51 + .../Java/libraries/okhttp-gson/api.mustache | 21 + .../codegen/java/JavaClientCodegenTest.java | 1021 +++++++++++------ .../resources/3_0/java/autoset_constant.yaml | 42 + 28 files changed, 798 insertions(+), 369 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/java/autoset_constant.yaml diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index ef327d98124f..8a0bd7ad207b 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -25,6 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |apiPackage|package for generated api classes| |org.openapitools.api| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-groovy| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index 84a85a253a23..0f6a369f7af2 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -30,6 +30,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| |async|use async Callable controllers| |false| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |basePackage|base package (invokerPackage) for generated code| |org.openapitools| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| diff --git a/docs/generators/java-helidon-client.md b/docs/generators/java-helidon-client.md index e7c4f63d0b57..79440feabcd5 100644 --- a/docs/generators/java-helidon-client.md +++ b/docs/generators/java-helidon-client.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-client| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/java-helidon-server.md b/docs/generators/java-helidon-server.md index a027e1cee38d..0360cad75fe6 100644 --- a/docs/generators/java-helidon-server.md +++ b/docs/generators/java-helidon-server.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index c91aa73e31bd..68d8c1414ac8 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-inflector-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md index 76e90328b3f7..0395914cec57 100644 --- a/docs/generators/java-micronaut-client.md +++ b/docs/generators/java-micronaut-client.md @@ -30,6 +30,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| |authorizationFilterPattern|Configure the authorization filter pattern for the client. Generally defined when generating clients from multiple specification files| |null| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |basePathSeparator|Configure the separator to use between the application name and base path when referencing the property| |-| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| diff --git a/docs/generators/java-micronaut-server.md b/docs/generators/java-micronaut-server.md index 2366e962c65b..057fb2da564a 100644 --- a/docs/generators/java-micronaut-server.md +++ b/docs/generators/java-micronaut-server.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-micronaut| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |build|Specify for which build tool to generate files|
**gradle**
Gradle configuration is generated for the project
**all**
Both Gradle and Maven configurations are generated
**maven**
Maven configuration is generated for the project
|all| diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index d656e20a81da..9daa84171f3b 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index 56f49ef7d2f1..6ea10a27ac54 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |pkmst-microservice| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |basePackage|base package for java source code| |null| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index b0205e0a4b3a..86750639ddc7 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-playframework| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |basePackage|base package for generated code| |org.openapitools| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index 7342fd046e8f..1aa234dd3169 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-undertow-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index 2057fefafc98..bee4c2e63309 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-vertx-web-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0-SNAPSHOT| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 57b3b487f73d..fef6af1b6441 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-vertx-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0-SNAPSHOT| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/java.md b/docs/generators/java.md index 0eb95e0ef8f1..ea5310688bc7 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -29,6 +29,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| |asyncNative|If true, async handlers will be used, instead of the sync version| |false| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index 3c470946b303..b7d670e8dbb9 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-cxf-cdi-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index d2501c27ed7b..bbbc265ebb7a 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-client| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index b5e40fddf862..bd16ea9cd02d 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -28,6 +28,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-cxf-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index 19cbe9aaa0ac..47a667c2e9c2 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -28,6 +28,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-cxf-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index e25a01acaf0b..2e79c39409fb 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index f78b67963026..bf198db901f1 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-resteasy-eap-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index 55bb4e75cefb..59c2f3f3516d 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-resteasy-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 8c5c3e899c8c..85477ef87855 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -27,6 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 3b5f5f5f4d0a..cbf36af54e25 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -30,6 +30,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| |async|use async Callable controllers| |false| +|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |basePackage|base package (invokerPackage) for generated code| |org.openapitools| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java index d928016ce94e..ab9382911872 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java @@ -30,7 +30,7 @@ public class CodegenOperation { hasVersionHeaders = false, hasVersionQueryParams = false, isResponseBinary = false, isResponseFile = false, isResponseOptional = false, hasReference = false, defaultReturnType = false, isRestfulIndex, isRestfulShow, isRestfulCreate, isRestfulUpdate, isRestfulDestroy, - isRestful, isDeprecated, isCallbackRequest, uniqueItems, hasDefaultResponse = false, + isRestful, isDeprecated, isCallbackRequest, uniqueItems, hasDefaultResponse = false, hasConstantParams = false, hasErrorResponseObject; // if 4xx, 5xx responses have at least one error object defined public CodegenProperty returnProperty; public String path, operationId, returnType, returnFormat, httpMethod, returnBaseType, @@ -45,6 +45,7 @@ public class CodegenOperation { public List queryParams = new ArrayList(); public List headerParams = new ArrayList(); public List implicitHeadersParams = new ArrayList(); + public List constantParams = new ArrayList(); public List formParams = new ArrayList(); public List cookieParams = new ArrayList(); public List requiredParams = new ArrayList(); @@ -392,6 +393,7 @@ public String toString() { sb.append(", operationIdLowerCase='").append(operationIdLowerCase).append('\''); sb.append(", operationIdCamelCase='").append(operationIdCamelCase).append('\''); sb.append(", operationIdSnakeCase='").append(operationIdSnakeCase).append('\''); + sb.append(", constantParams='").append(constantParams).append('\''); sb.append('}'); return sb.toString(); } @@ -472,7 +474,8 @@ public boolean equals(Object o) { Objects.equals(operationIdOriginal, that.operationIdOriginal) && Objects.equals(operationIdLowerCase, that.operationIdLowerCase) && Objects.equals(operationIdCamelCase, that.operationIdCamelCase) && - Objects.equals(operationIdSnakeCase, that.operationIdSnakeCase); + Objects.equals(operationIdSnakeCase, that.operationIdSnakeCase) && + Objects.equals(constantParams, that.constantParams); } @Override @@ -488,6 +491,6 @@ public int hashCode() { pathParams, queryParams, headerParams, formParams, cookieParams, requiredParams, returnProperty, optionalParams, authMethods, tags, responses, callbacks, imports, examples, requestBodyExamples, externalDocs, vendorExtensions, nickname, operationIdOriginal, operationIdLowerCase, operationIdCamelCase, - operationIdSnakeCase, hasErrorResponseObject, requiredAndNotNullableParams, notNullableParams); + operationIdSnakeCase, hasErrorResponseObject, requiredAndNotNullableParams, notNullableParams, constantParams); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index bd4007d1b3fc..4d74bb3cdad0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -83,6 +83,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code public static final String TEST_OUTPUT = "testOutput"; public static final String IMPLICIT_HEADERS = "implicitHeaders"; public static final String IMPLICIT_HEADERS_REGEX = "implicitHeadersRegex"; + public static final String AUTOSET_CONSTANTS = "autosetConstants"; public static final String JAVAX_PACKAGE = "javaxPackage"; public static final String USE_JAKARTA_EE = "useJakartaEe"; public static final String CONTAINER_DEFAULT_TO_NULL = "containerDefaultToNull"; @@ -137,6 +138,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code protected AnnotationLibrary annotationLibrary; protected boolean implicitHeaders = false; protected String implicitHeadersRegex = null; + protected boolean autosetConstants = false; protected boolean camelCaseDollarSign = false; protected boolean useJakartaEe = false; protected boolean containerDefaultToNull = false; @@ -277,6 +279,7 @@ public AbstractJavaCodegen() { cliOptions.add(CliOption.newBoolean(OPENAPI_NULLABLE, "Enable OpenAPI Jackson Nullable library", this.openApiNullable)); cliOptions.add(CliOption.newBoolean(IMPLICIT_HEADERS, "Skip header parameters in the generated API methods using @ApiImplicitParams annotation.", implicitHeaders)); cliOptions.add(CliOption.newString(IMPLICIT_HEADERS_REGEX, "Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true")); + cliOptions.add(CliOption.newBoolean(AUTOSET_CONSTANTS, "Automatically set Required Params having a Single enum value i.e. Constants in generated code", autosetConstants)); cliOptions.add(CliOption.newBoolean(CAMEL_CASE_DOLLAR_SIGN, "Fix camelCase when starting with $ sign. when true : $Value when false : $value")); cliOptions.add(CliOption.newBoolean(USE_JAKARTA_EE, "whether to use Jakarta EE namespace instead of javax")); cliOptions.add(CliOption.newBoolean(CONTAINER_DEFAULT_TO_NULL, "Set containers (array, set, map) default to null")); @@ -563,6 +566,10 @@ public void processOpts() { this.setImplicitHeadersRegex(additionalProperties.get(IMPLICIT_HEADERS_REGEX).toString()); } + if (additionalProperties.containsKey(AUTOSET_CONSTANTS)) { + this.setAutosetConstants(Boolean.parseBoolean(additionalProperties.get(AUTOSET_CONSTANTS).toString())); + } + if (additionalProperties.containsKey(CAMEL_CASE_DOLLAR_SIGN)) { this.setCamelCaseDollarSign(Boolean.parseBoolean(additionalProperties.get(CAMEL_CASE_DOLLAR_SIGN).toString())); } @@ -1578,6 +1585,7 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List copy = new ArrayList<>(operation.allParams); + // Remove all params from Params, Non constant params will be added back later. + operation.allParams.clear(); + + // Finds all constant params, removes them from allParams and adds them to constant params. + // Also, adds back non constant params to allParams. + for (CodegenParameter p : copy) { + if (p.isEnum && p.required && p._enum != null && p._enum.size() == 1) { + // Add to constantParams for use in the code generation templates. + operation.constantParams.add(p); + if(p.isQueryParam) { + operation.queryParams.removeIf(param -> param.baseName.equals(p.baseName)); + } + if(p.isHeaderParam) { + operation.headerParams.removeIf(param -> param.baseName.equals(p.baseName)); + } + if(p.isCookieParam) { + operation.cookieParams.removeIf(param -> param.baseName.equals(p.baseName)); + } + LOGGER.info("Update operation [{}]. Remove parameter [{}] because it can only have a fixed value of [{}]", operation.operationId, p.baseName, p._enum.get(0)); + } else { + // Add back to allParams as the param is not a constant. + operation.allParams.add(p); + } + } + operation.hasParams = !operation.allParams.isEmpty(); + } + private boolean shouldBeImplicitHeader(CodegenParameter parameter) { return StringUtils.isNotBlank(implicitHeadersRegex) && parameter.baseName.matches(implicitHeadersRegex); } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache index ad8af005c159..b52a1cbd5cb0 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache @@ -172,18 +172,39 @@ public class {{classname}} { } {{/queryParams}} + {{#constantParams}} + {{#isQueryParam}} + // Set client side default value of Query Param "{{baseName}}". + localVarCollectionQueryParams.add(new Pair("{{baseName}}", {{#_enum}}"{{{.}}}"{{/_enum}})); + + {{/isQueryParam}} + {{/constantParams}} {{#headerParams}} if ({{paramName}} != null) { localVarHeaderParams.put("{{baseName}}", localVarApiClient.parameterToString({{paramName}})); } {{/headerParams}} + {{#constantParams}} + {{#isHeaderParam}} + // Set client side default value of Header Param "{{baseName}}". + localVarHeaderParams.put("{{baseName}}", {{#_enum}}"{{{.}}}"{{/_enum}}); + + {{/isHeaderParam}} + {{/constantParams}} {{#cookieParams}} if ({{paramName}} != null) { localVarCookieParams.put("{{baseName}}", localVarApiClient.parameterToString({{paramName}})); } {{/cookieParams}} + {{#constantParams}} + {{#isCookieParam}} + // Set client side default value of Cookie Param "{{baseName}}". + localVarCookieParams.put("{{baseName}}", {{#_enum}}"{{{.}}}"{{/_enum}}); + + {{/isCookieParam}} + {{/constantParams}} {{/dynamicOperations}} {{#dynamicOperations}} localVarPath = localVarApiClient.fillParametersFromOperation(operation, paramMap, localVarPath, localVarQueryParams, localVarCollectionQueryParams, localVarHeaderParams, localVarCookieParams); 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 f5519605badc..ba56a03eefdb 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 @@ -17,6 +17,15 @@ package org.openapitools.codegen.java; +import static org.junit.Assert.assertNotNull; +import static org.openapitools.codegen.TestUtils.assertFileContains; +import static org.openapitools.codegen.TestUtils.assertFileNotContains; +import static org.openapitools.codegen.TestUtils.validateJavaSourceFiles; +import static org.openapitools.codegen.languages.JavaClientCodegen.USE_ENUM_CASE_INSENSITIVE; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; + import com.google.common.collect.ImmutableMap; import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.OpenAPI; @@ -33,6 +42,27 @@ import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.parser.core.models.ParseOptions; import io.swagger.v3.parser.util.SchemaTypeUtil; +import java.io.File; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Optional; +import java.util.function.Function; +import java.util.function.Predicate; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; import lombok.SneakyThrows; import org.openapitools.codegen.ClientOptInput; import org.openapitools.codegen.CodegenConstants; @@ -58,36 +88,6 @@ import org.testng.annotations.Ignore; import org.testng.annotations.Test; -import java.io.File; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Optional; -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Collectors; - -import static org.openapitools.codegen.TestUtils.assertFileContains; -import static org.openapitools.codegen.TestUtils.assertFileNotContains; -import static org.openapitools.codegen.TestUtils.validateJavaSourceFiles; -import static org.openapitools.codegen.languages.JavaClientCodegen.USE_ENUM_CASE_INSENSITIVE; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.fail; - public class JavaClientCodegenTest { @Test @@ -98,7 +98,11 @@ public void arraysInRequestBody() { RequestBody body1 = new RequestBody(); body1.setDescription("A list of ids"); - body1.setContent(new Content().addMediaType("application/json", new MediaType().schema(new ArraySchema().items(new StringSchema())))); + body1.setContent( + new Content() + .addMediaType( + "application/json", + new MediaType().schema(new ArraySchema().items(new StringSchema())))); CodegenParameter codegenParameter1 = codegen.fromRequestBody(body1, new HashSet(), null); Assert.assertEquals(codegenParameter1.description, "A list of ids"); Assert.assertEquals(codegenParameter1.dataType, "List"); @@ -106,7 +110,13 @@ public void arraysInRequestBody() { RequestBody body2 = new RequestBody(); body2.setDescription("A list of list of values"); - body2.setContent(new Content().addMediaType("application/json", new MediaType().schema(new ArraySchema().items(new ArraySchema().items(new IntegerSchema()))))); + body2.setContent( + new Content() + .addMediaType( + "application/json", + new MediaType() + .schema( + new ArraySchema().items(new ArraySchema().items(new IntegerSchema()))))); CodegenParameter codegenParameter2 = codegen.fromRequestBody(body2, new HashSet(), null); Assert.assertEquals(codegenParameter2.description, "A list of list of values"); Assert.assertEquals(codegenParameter2.dataType, "List>"); @@ -114,7 +124,14 @@ public void arraysInRequestBody() { RequestBody body3 = new RequestBody(); body3.setDescription("A list of points"); - body3.setContent(new Content().addMediaType("application/json", new MediaType().schema(new ArraySchema().items(new ObjectSchema().$ref("#/components/schemas/Point"))))); + body3.setContent( + new Content() + .addMediaType( + "application/json", + new MediaType() + .schema( + new ArraySchema() + .items(new ObjectSchema().$ref("#/components/schemas/Point"))))); ObjectSchema point = new ObjectSchema(); point.addProperty("message", new StringSchema()); point.addProperty("x", new IntegerSchema().format(SchemaTypeUtil.INTEGER32_FORMAT)); @@ -167,11 +184,17 @@ public void testInitialConfigValues() throws Exception { Assert.assertFalse(codegen.isHideGenerationTimestamp()); Assert.assertEquals(codegen.modelPackage(), "org.openapitools.client.model"); - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), "org.openapitools.client.model"); + Assert.assertEquals( + codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), + "org.openapitools.client.model"); Assert.assertEquals(codegen.apiPackage(), "org.openapitools.client.api"); - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "org.openapitools.client.api"); + Assert.assertEquals( + codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), + "org.openapitools.client.api"); Assert.assertEquals(codegen.getInvokerPackage(), "org.openapitools.client"); - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "org.openapitools.client"); + Assert.assertEquals( + codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), + "org.openapitools.client"); Assert.assertEquals(codegen.getSerializationLibrary(), JavaClientCodegen.SERIALIZATION_LIBRARY_GSON); } @@ -188,11 +211,16 @@ public void testSettersForConfigValues() throws Exception { Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.TRUE); Assert.assertTrue(codegen.isHideGenerationTimestamp()); Assert.assertEquals(codegen.modelPackage(), "xyz.yyyyy.zzzzzzz.model"); - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), "xyz.yyyyy.zzzzzzz.model"); + Assert.assertEquals( + codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), + "xyz.yyyyy.zzzzzzz.model"); Assert.assertEquals(codegen.apiPackage(), "xyz.yyyyy.zzzzzzz.api"); - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "xyz.yyyyy.zzzzzzz.api"); + Assert.assertEquals( + codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "xyz.yyyyy.zzzzzzz.api"); Assert.assertEquals(codegen.getInvokerPackage(), "xyz.yyyyy.zzzzzzz.invoker"); - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "xyz.yyyyy.zzzzzzz.invoker"); + Assert.assertEquals( + codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), + "xyz.yyyyy.zzzzzzz.invoker"); Assert.assertEquals(codegen.getSerializationLibrary(), JavaClientCodegen.SERIALIZATION_LIBRARY_GSON); // the library JavaClientCodegen.OKHTTP_GSON only supports GSON } @@ -200,9 +228,13 @@ public void testSettersForConfigValues() throws Exception { public void testAdditionalPropertiesPutForConfigValues() throws Exception { final JavaClientCodegen codegen = new JavaClientCodegen(); codegen.additionalProperties().put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "true"); - codegen.additionalProperties().put(CodegenConstants.MODEL_PACKAGE, "xyz.yyyyy.zzzzzzz.mmmmm.model"); - codegen.additionalProperties().put(CodegenConstants.API_PACKAGE, "xyz.yyyyy.zzzzzzz.aaaaa.api"); - codegen.additionalProperties().put(CodegenConstants.INVOKER_PACKAGE, "xyz.yyyyy.zzzzzzz.iiii.invoker"); + codegen + .additionalProperties() + .put(CodegenConstants.MODEL_PACKAGE, "xyz.yyyyy.zzzzzzz.mmmmm.model"); + codegen.additionalProperties().put(CodegenConstants.API_PACKAGE, "xyz.yyyyy.zzzzzzz.aaaaa.api"); + codegen + .additionalProperties() + .put(CodegenConstants.INVOKER_PACKAGE, "xyz.yyyyy.zzzzzzz.iiii.invoker"); codegen.additionalProperties().put(CodegenConstants.SERIALIZATION_LIBRARY, "JACKSON"); codegen.additionalProperties().put(CodegenConstants.LIBRARY, JavaClientCodegen.JERSEY2); codegen.processOpts(); @@ -210,11 +242,17 @@ public void testAdditionalPropertiesPutForConfigValues() throws Exception { Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.TRUE); Assert.assertTrue(codegen.isHideGenerationTimestamp()); Assert.assertEquals(codegen.modelPackage(), "xyz.yyyyy.zzzzzzz.mmmmm.model"); - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), "xyz.yyyyy.zzzzzzz.mmmmm.model"); + Assert.assertEquals( + codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), + "xyz.yyyyy.zzzzzzz.mmmmm.model"); Assert.assertEquals(codegen.apiPackage(), "xyz.yyyyy.zzzzzzz.aaaaa.api"); - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "xyz.yyyyy.zzzzzzz.aaaaa.api"); + Assert.assertEquals( + codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), + "xyz.yyyyy.zzzzzzz.aaaaa.api"); Assert.assertEquals(codegen.getInvokerPackage(), "xyz.yyyyy.zzzzzzz.iiii.invoker"); - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "xyz.yyyyy.zzzzzzz.iiii.invoker"); + Assert.assertEquals( + codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), + "xyz.yyyyy.zzzzzzz.iiii.invoker"); Assert.assertEquals(codegen.getSerializationLibrary(), JavaClientCodegen.SERIALIZATION_LIBRARY_JACKSON); } @@ -225,12 +263,14 @@ public void testGeneratedAuthClassesJersey() throws IOException { File output = Files.createTempDirectory("test").toFile(); - final CodegenConfigurator configurator = new CodegenConfigurator() - .setGeneratorName("java") - .setLibrary(JavaClientCodegen.JERSEY3) - .setAdditionalProperties(properties) - .setInputSpec("src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml") - .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + final CodegenConfigurator configurator = + new CodegenConfigurator() + .setGeneratorName("java") + .setLibrary(JavaClientCodegen.JERSEY3) + .setAdditionalProperties(properties) + .setInputSpec( + "src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); final ClientOptInput clientOptInput = configurator.toClientOptInput(); @@ -238,11 +278,14 @@ public void testGeneratedAuthClassesJersey() throws IOException { List files = generator.opts(clientOptInput).generate(); - TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/auth/ApiKeyAuth.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/auth/Authentication.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/auth/HttpBasicAuth.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/auth/HttpBearerAuth.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/auth/HttpSignatureAuth.java"); + TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/auth/ApiKeyAuth.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/xyz/abcdef/auth/Authentication.java"); + TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/auth/HttpBasicAuth.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/xyz/abcdef/auth/HttpBearerAuth.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/xyz/abcdef/auth/HttpSignatureAuth.java"); } @Test @@ -262,7 +305,9 @@ public void testImportMappingResult() throws IOException { List files = generator.opts(clientOptInput).generate(); - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/org/openapitools/client/api/QueryApi.java"), "import java.time.Instant;"); + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/org/openapitools/client/api/QueryApi.java"), + "import java.time.Instant;"); } @Test @@ -277,35 +322,52 @@ public void testSupportedSecuritySchemesJersey() throws Exception { @Test public void testPackageNamesSetInvokerDerivedFromApi() { final JavaClientCodegen codegen = new JavaClientCodegen(); - codegen.additionalProperties().put(CodegenConstants.MODEL_PACKAGE, "xyz.yyyyy.zzzzzzz.mmmmm.model"); - codegen.additionalProperties().put(CodegenConstants.API_PACKAGE, "xyz.yyyyy.zzzzzzz.aaaaa.api"); + codegen + .additionalProperties() + .put(CodegenConstants.MODEL_PACKAGE, "xyz.yyyyy.zzzzzzz.mmmmm.model"); + codegen.additionalProperties().put(CodegenConstants.API_PACKAGE, "xyz.yyyyy.zzzzzzz.aaaaa.api"); codegen.processOpts(); Assert.assertEquals(codegen.modelPackage(), "xyz.yyyyy.zzzzzzz.mmmmm.model"); - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), "xyz.yyyyy.zzzzzzz.mmmmm.model"); + Assert.assertEquals( + codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), + "xyz.yyyyy.zzzzzzz.mmmmm.model"); Assert.assertEquals(codegen.apiPackage(), "xyz.yyyyy.zzzzzzz.aaaaa.api"); - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "xyz.yyyyy.zzzzzzz.aaaaa.api"); + Assert.assertEquals( + codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), + "xyz.yyyyy.zzzzzzz.aaaaa.api"); Assert.assertEquals(codegen.getInvokerPackage(), "xyz.yyyyy.zzzzzzz.aaaaa"); - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "xyz.yyyyy.zzzzzzz.aaaaa"); + Assert.assertEquals( + codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), + "xyz.yyyyy.zzzzzzz.aaaaa"); } @Test public void testPackageNamesSetInvokerDerivedFromModel() { final JavaClientCodegen codegen = new JavaClientCodegen(); - codegen.additionalProperties().put(CodegenConstants.MODEL_PACKAGE, "xyz.yyyyy.zzzzzzz.mmmmm.model"); + codegen + .additionalProperties() + .put(CodegenConstants.MODEL_PACKAGE, "xyz.yyyyy.zzzzzzz.mmmmm.model"); codegen.processOpts(); Assert.assertEquals(codegen.modelPackage(), "xyz.yyyyy.zzzzzzz.mmmmm.model"); - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), "xyz.yyyyy.zzzzzzz.mmmmm.model"); + Assert.assertEquals( + codegen.additionalProperties().get(CodegenConstants.MODEL_PACKAGE), + "xyz.yyyyy.zzzzzzz.mmmmm.model"); Assert.assertEquals(codegen.apiPackage(), "org.openapitools.client.api"); - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), "org.openapitools.client.api"); + Assert.assertEquals( + codegen.additionalProperties().get(CodegenConstants.API_PACKAGE), + "org.openapitools.client.api"); Assert.assertEquals(codegen.getInvokerPackage(), "xyz.yyyyy.zzzzzzz.mmmmm"); - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "xyz.yyyyy.zzzzzzz.mmmmm"); + Assert.assertEquals( + codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), + "xyz.yyyyy.zzzzzzz.mmmmm"); } @Test public void testGetSchemaTypeWithComposedSchemaWithAllOf() { - final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/2_0/composed-allof.yaml"); + final OpenAPI openAPI = + TestUtils.parseFlattenSpec("src/test/resources/2_0/composed-allof.yaml"); final JavaClientCodegen codegen = new JavaClientCodegen(); Operation operation = openAPI.getPaths().get("/ping").getPost(); @@ -321,7 +383,8 @@ public void updateCodegenPropertyEnum() { codegen.updateCodegenPropertyEnum(array); - List> enumVars = (List>) array.getItems().getAllowableValues().get("enumVars"); + List> enumVars = + (List>) array.getItems().getAllowableValues().get("enumVars"); Assert.assertNotNull(enumVars); Map testedEnumVar = enumVars.get(0); Assert.assertNotNull(testedEnumVar); @@ -333,11 +396,15 @@ public void updateCodegenPropertyEnum() { public void updateCodegenPropertyEnumWithCustomNames() { final JavaClientCodegen codegen = new JavaClientCodegen(); CodegenProperty array = codegenPropertyWithArrayOfIntegerValues(); - array.getItems().setVendorExtensions(Collections.singletonMap("x-enum-varnames", Collections.singletonList("ONE"))); + array + .getItems() + .setVendorExtensions( + Collections.singletonMap("x-enum-varnames", Collections.singletonList("ONE"))); codegen.updateCodegenPropertyEnum(array); - List> enumVars = (List>) array.getItems().getAllowableValues().get("enumVars"); + List> enumVars = + (List>) array.getItems().getAllowableValues().get("enumVars"); Assert.assertNotNull(enumVars); Map testedEnumVar = enumVars.get(0); Assert.assertNotNull(testedEnumVar); @@ -388,24 +455,32 @@ public void testGeneratePing() throws Exception { TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/ApiClient.java"); TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/ApiException.java"); TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/ApiResponse.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/ServerConfiguration.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/xyz/abcdef/ServerConfiguration.java"); TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/ServerVariable.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/auth/ApiKeyAuth.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/auth/Authentication.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/auth/HttpBasicAuth.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/auth/HttpBearerAuth.java"); + TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/auth/ApiKeyAuth.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/xyz/abcdef/auth/Authentication.java"); + TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/auth/HttpBasicAuth.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/xyz/abcdef/auth/HttpBearerAuth.java"); TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/Configuration.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/GzipRequestInterceptor.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/xyz/abcdef/GzipRequestInterceptor.java"); TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/JSON.java"); TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/Pair.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/ProgressRequestBody.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/ProgressResponseBody.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/xyz/abcdef/ProgressRequestBody.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/xyz/abcdef/ProgressResponseBody.java"); TestUtils.ensureContainsFile(files, output, "src/main/java/xyz/abcdef/StringUtil.java"); - TestUtils.ensureContainsFile(files, output, "src/test/java/xyz/abcdef/api/DefaultApiTest.java"); + TestUtils.ensureContainsFile(files, output, "src/test/java/xyz/abcdef/api/DefaultApiTest.java"); validateJavaSourceFiles(files); - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/api/DefaultApi.java"), "public class DefaultApi"); + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/xyz/abcdef/api/DefaultApi.java"), + "public class DefaultApi"); output.deleteOnExit(); } @@ -453,32 +528,49 @@ public void testGeneratePingSomeObj() throws Exception { TestUtils.ensureContainsFile(files, output, "api/openapi.yaml"); TestUtils.ensureContainsFile(files, output, "src/main/AndroidManifest.xml"); TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/api/xxxx/PingApi.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/invoker/xxxx/ApiCallback.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/invoker/xxxx/ApiClient.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/invoker/xxxx/ApiException.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/invoker/xxxx/ApiResponse.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/invoker/xxxx/ServerConfiguration.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/invoker/xxxx/ServerVariable.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/invoker/xxxx/auth/ApiKeyAuth.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/invoker/xxxx/auth/Authentication.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/invoker/xxxx/auth/HttpBasicAuth.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/invoker/xxxx/auth/HttpBearerAuth.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/invoker/xxxx/Configuration.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/invoker/xxxx/GzipRequestInterceptor.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/zz/yyyy/invoker/xxxx/ApiCallback.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/zz/yyyy/invoker/xxxx/ApiClient.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/zz/yyyy/invoker/xxxx/ApiException.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/zz/yyyy/invoker/xxxx/ApiResponse.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/zz/yyyy/invoker/xxxx/ServerConfiguration.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/zz/yyyy/invoker/xxxx/ServerVariable.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/zz/yyyy/invoker/xxxx/auth/ApiKeyAuth.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/zz/yyyy/invoker/xxxx/auth/Authentication.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/zz/yyyy/invoker/xxxx/auth/HttpBasicAuth.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/zz/yyyy/invoker/xxxx/auth/HttpBearerAuth.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/zz/yyyy/invoker/xxxx/Configuration.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/zz/yyyy/invoker/xxxx/GzipRequestInterceptor.java"); TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/invoker/xxxx/JSON.java"); TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/invoker/xxxx/Pair.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/invoker/xxxx/ProgressRequestBody.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/invoker/xxxx/ProgressResponseBody.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/invoker/xxxx/StringUtil.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/model/xxxx/SomeObj.java"); - TestUtils.ensureContainsFile(files, output, "src/test/java/zz/yyyy/api/xxxx/PingApiTest.java"); - TestUtils.ensureContainsFile(files, output, "src/test/java/zz/yyyy/model/xxxx/SomeObjTest.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/zz/yyyy/invoker/xxxx/ProgressRequestBody.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/zz/yyyy/invoker/xxxx/ProgressResponseBody.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/zz/yyyy/invoker/xxxx/StringUtil.java"); + TestUtils.ensureContainsFile(files, output, "src/main/java/zz/yyyy/model/xxxx/SomeObj.java"); + TestUtils.ensureContainsFile(files, output, "src/test/java/zz/yyyy/api/xxxx/PingApiTest.java"); + TestUtils.ensureContainsFile( + files, output, "src/test/java/zz/yyyy/model/xxxx/SomeObjTest.java"); validateJavaSourceFiles(files); - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/zz/yyyy/model/xxxx/SomeObj.java"), - "public class SomeObj", - "Boolean isActive()"); + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/zz/yyyy/model/xxxx/SomeObj.java"), + "public class SomeObj", + "Boolean isActive()"); output.deleteOnExit(); } @@ -505,11 +597,12 @@ public void testJdkHttpClient() throws Exception { Assert.assertEquals(files.size(), 32); validateJavaSourceFiles(files); - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/api/DefaultApi.java"), - "public class DefaultApi", - "import java.net.http.HttpClient;", - "import java.net.http.HttpRequest;", - "import java.net.http.HttpResponse;"); + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/xyz/abcdef/api/DefaultApi.java"), + "public class DefaultApi", + "import java.net.http.HttpClient;", + "import java.net.http.HttpRequest;", + "import java.net.http.HttpResponse;"); TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/ApiClient.java"), "public class ApiClient", @@ -527,12 +620,14 @@ public void testJdkHttpClientWithAndWithoutDiscriminator() throws Exception { File output = Files.createTempDirectory("test").toFile(); output.deleteOnExit(); - final CodegenConfigurator configurator = new CodegenConfigurator() - .setGeneratorName("java") - .setLibrary(JavaClientCodegen.NATIVE) - .setAdditionalProperties(properties) - .setInputSpec("src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml") - .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + final CodegenConfigurator configurator = + new CodegenConfigurator() + .setGeneratorName("java") + .setLibrary(JavaClientCodegen.NATIVE) + .setAdditionalProperties(properties) + .setInputSpec( + "src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); final ClientOptInput clientOptInput = configurator.toClientOptInput(); DefaultGenerator generator = new DefaultGenerator(); @@ -611,17 +706,26 @@ public void testAuthorizationScopeValues_Issue392() { clientOptInput.config(new JavaClientCodegen()); defaultGenerator.opts(clientOptInput); - final List codegenOperations = defaultGenerator.processPaths(openAPI.getPaths()).get("Pet"); - - // Verify GET only has 'read' scope - final CodegenOperation getCodegenOperation = codegenOperations.stream().filter(it -> it.httpMethod.equals("GET")).collect(Collectors.toList()).get(0); + final List codegenOperations = + defaultGenerator.processPaths(openAPI.getPaths()).get("Pet"); + + // Verify GET only has 'read' scope + final CodegenOperation getCodegenOperation = + codegenOperations.stream() + .filter(it -> it.httpMethod.equals("GET")) + .collect(Collectors.toList()) + .get(0); assertTrue(getCodegenOperation.hasAuthMethods); assertEquals(getCodegenOperation.authMethods.size(), 1); final List> getScopes = getCodegenOperation.authMethods.get(0).scopes; assertEquals(getScopes.size(), 1, "GET scopes don't match. actual::" + getScopes); - // POST operation should have both 'read' and 'write' scope on it - final CodegenOperation postCodegenOperation = codegenOperations.stream().filter(it -> it.httpMethod.equals("POST")).collect(Collectors.toList()).get(0); + // POST operation should have both 'read' and 'write' scope on it + final CodegenOperation postCodegenOperation = + codegenOperations.stream() + .filter(it -> it.httpMethod.equals("POST")) + .collect(Collectors.toList()) + .get(0); assertTrue(postCodegenOperation.hasAuthMethods); assertEquals(postCodegenOperation.authMethods.size(), 1); final List> postScopes = postCodegenOperation.authMethods.get(0).scopes; @@ -669,9 +773,14 @@ public void testAuthorizationsMethodsSizeWhenFiltered() { clientOptInput.config(new JavaClientCodegen()); defaultGenerator.opts(clientOptInput); - final List codegenOperations = defaultGenerator.processPaths(openAPI.getPaths()).get("Pet"); - - final CodegenOperation getCodegenOperation = codegenOperations.stream().filter(it -> it.httpMethod.equals("GET")).collect(Collectors.toList()).get(0); + final List codegenOperations = + defaultGenerator.processPaths(openAPI.getPaths()).get("Pet"); + + final CodegenOperation getCodegenOperation = + codegenOperations.stream() + .filter(it -> it.httpMethod.equals("GET")) + .collect(Collectors.toList()) + .get(0); assertTrue(getCodegenOperation.hasAuthMethods); assertEquals(getCodegenOperation.authMethods.size(), 2); } @@ -734,7 +843,8 @@ public void testSchemaMapping() throws IOException { .setOutputDir(output.getAbsolutePath().replace("\\", "/")); final ClientOptInput clientOptInput = configurator.toClientOptInput(); - Assert.assertEquals(clientOptInput.getConfig().schemaMapping().get("TypeAlias"), "foo.bar.TypeAlias"); + Assert.assertEquals( + clientOptInput.getConfig().schemaMapping().get("TypeAlias"), "foo.bar.TypeAlias"); DefaultGenerator generator = new DefaultGenerator(); generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "true"); @@ -749,17 +859,19 @@ public void testSchemaMapping() throws IOException { validateJavaSourceFiles(files); Assert.assertEquals(files.size(), 1); - TestUtils.ensureContainsFile(files, output, "src/main/java/org/openapitools/client/model/ParentType.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/org/openapitools/client/model/ParentType.java"); String parentTypeContents = ""; try { - File file = files.stream().filter(f -> f.getName().endsWith("ParentType.java")).findFirst().get(); + File file = + files.stream().filter(f -> f.getName().endsWith("ParentType.java")).findFirst().get(); parentTypeContents = new String(Files.readAllBytes(file.toPath()), StandardCharsets.UTF_8); } catch (IOException ignored) { } - final Pattern FIELD_PATTERN = Pattern.compile(".* private (.*?) typeAlias;.*", Pattern.DOTALL); + final Pattern FIELD_PATTERN = Pattern.compile(".* private (.*?) typeAlias;.*", Pattern.DOTALL); Matcher fieldMatcher = FIELD_PATTERN.matcher(parentTypeContents); Assert.assertTrue(fieldMatcher.matches()); @@ -770,7 +882,8 @@ public void testSchemaMapping() throws IOException { @Test public void testBearerAuth() { - final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/pingBearerAuth.yaml"); + final OpenAPI openAPI = + TestUtils.parseFlattenSpec("src/test/resources/3_0/pingBearerAuth.yaml"); JavaClientCodegen codegen = new JavaClientCodegen(); List security = codegen.fromSecurity(openAPI.getComponents().getSecuritySchemes()); @@ -994,19 +1107,20 @@ public void testRestTemplateFormMultipart() throws IOException { validateJavaSourceFiles(files); Path defaultApi = Paths.get(output + "/src/main/java/xyz/abcdef/api/MultipartApi.java"); - TestUtils.assertFileContains(defaultApi, - //multiple files - "multipartArrayWithHttpInfo(List files)", - "formParams.addAll(\"files\", files.stream().map(FileSystemResource::new).collect(Collectors.toList()));", + TestUtils.assertFileContains( + defaultApi, + // multiple files + "multipartArrayWithHttpInfo(List files)", + "formParams.addAll(\"files\"," + + " files.stream().map(FileSystemResource::new).collect(Collectors.toList()));", - //mixed - "multipartMixedWithHttpInfo(File file, MultipartMixedMarker marker)", - "formParams.add(\"file\", new FileSystemResource(file));", + // mixed + "multipartMixedWithHttpInfo(File file, MultipartMixedMarker marker)", + "formParams.add(\"file\", new FileSystemResource(file));", - //single file - "multipartSingleWithHttpInfo(File file)", - "formParams.add(\"file\", new FileSystemResource(file));" - ); + // single file + "multipartSingleWithHttpInfo(File file)", + "formParams.add(\"file\", new FileSystemResource(file));"); } /** @@ -1042,19 +1156,20 @@ public void testWebClientFormMultipart() throws IOException { validateJavaSourceFiles(files); Path defaultApi = Paths.get(output + "/src/main/java/xyz/abcdef/api/MultipartApi.java"); - TestUtils.assertFileContains(defaultApi, - //multiple files - "multipartArray(List files)", - "formParams.addAll(\"files\", files.stream().map(FileSystemResource::new).collect(Collectors.toList()));", + TestUtils.assertFileContains( + defaultApi, + // multiple files + "multipartArray(List files)", + "formParams.addAll(\"files\"," + + " files.stream().map(FileSystemResource::new).collect(Collectors.toList()));", - //mixed - "multipartMixed(File file, MultipartMixedMarker marker)", - "formParams.add(\"file\", new FileSystemResource(file));", + // mixed + "multipartMixed(File file, MultipartMixedMarker marker)", + "formParams.add(\"file\", new FileSystemResource(file));", - //single file - "multipartSingle(File file)", - "formParams.add(\"file\", new FileSystemResource(file));" - ); + // single file + "multipartSingle(File file)", + "formParams.add(\"file\", new FileSystemResource(file));"); } @Test @@ -1066,24 +1181,32 @@ public void shouldGenerateBlockingAndNoBlockingOperationsForWebClient() throws I File output = Files.createTempDirectory("test").toFile(); output.deleteOnExit(); - final CodegenConfigurator configurator = new CodegenConfigurator() - .setGeneratorName("java") - .setLibrary(JavaClientCodegen.WEBCLIENT) - .setAdditionalProperties(properties) - .setInputSpec("src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml") - .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + final CodegenConfigurator configurator = + new CodegenConfigurator() + .setGeneratorName("java") + .setLibrary(JavaClientCodegen.WEBCLIENT) + .setAdditionalProperties(properties) + .setInputSpec( + "src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); DefaultGenerator generator = new DefaultGenerator(); Map files = generator.opts(configurator.toClientOptInput()).generate().stream() .collect(Collectors.toMap(File::getName, Function.identity())); - JavaFileAssert.assertThat(files.get("StoreApi.java")) - .assertMethod("getInventory").hasReturnType("Mono>") //explicit 'x-webclient-blocking: false' which overrides global config - .toFileAssert() - .assertMethod("placeOrder").hasReturnType("Order"); // use global config + JavaFileAssert.assertThat(files.get("StoreApi.java")) + .assertMethod("getInventory") + .hasReturnType( + "Mono>") // explicit 'x-webclient-blocking: false' which overrides + // global config + .toFileAssert() + .assertMethod("placeOrder") + .hasReturnType("Order"); // use global config - JavaFileAssert.assertThat(files.get("PetApi.java")) - .assertMethod("findPetsByStatus").hasReturnType("List"); // explicit 'x-webclient-blocking: true' which overrides global config + JavaFileAssert.assertThat(files.get("PetApi.java")) + .assertMethod("findPetsByStatus") + .hasReturnType( + "List"); // explicit 'x-webclient-blocking: true' which overrides global config } @Test @@ -1101,16 +1224,20 @@ public void testAllowModelWithNoProperties() throws Exception { List files = generator.opts(clientOptInput).generate(); Assert.assertEquals(files.size(), 49); - TestUtils.ensureContainsFile(files, output, "src/main/java/org/openapitools/client/model/RealCommand.java"); - TestUtils.ensureContainsFile(files, output, "src/main/java/org/openapitools/client/model/Command.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/org/openapitools/client/model/RealCommand.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/org/openapitools/client/model/Command.java"); validateJavaSourceFiles(files); - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/org/openapitools/client/model/RealCommand.java"), - "class RealCommand {"); + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/org/openapitools/client/model/RealCommand.java"), + "class RealCommand {"); - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/org/openapitools/client/model/Command.java"), - "class Command {"); + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/org/openapitools/client/model/Command.java"), + "class Command {"); output.deleteOnExit(); } @@ -1149,27 +1276,29 @@ public void testRestTemplateWithUseAbstractionForFiles() throws IOException { validateJavaSourceFiles(files); Path defaultApi = Paths.get(output + "/src/main/java/xyz/abcdef/api/MultipartApi.java"); - TestUtils.assertFileContains(defaultApi, - //multiple files - "multipartArray(java.util.Collection files)", - "multipartArrayWithHttpInfo(java.util.Collection files)", - "formParams.addAll(\"files\", files.stream().collect(Collectors.toList()));", - - //mixed - "multipartMixed(org.springframework.core.io.Resource file, MultipartMixedMarker marker)", - "multipartMixedWithHttpInfo(org.springframework.core.io.Resource file, MultipartMixedMarker marker)", - "formParams.add(\"file\", file);", - - //single file - "multipartSingle(org.springframework.core.io.Resource file)", - "multipartSingleWithHttpInfo(org.springframework.core.io.Resource file)", - "formParams.add(\"file\", file);" - ); + TestUtils.assertFileContains( + defaultApi, + // multiple files + "multipartArray(java.util.Collection files)", + "multipartArrayWithHttpInfo(java.util.Collection" + + " files)", + "formParams.addAll(\"files\", files.stream().collect(Collectors.toList()));", + + // mixed + "multipartMixed(org.springframework.core.io.Resource file, MultipartMixedMarker marker)", + "multipartMixedWithHttpInfo(org.springframework.core.io.Resource file, MultipartMixedMarker" + + " marker)", + "formParams.add(\"file\", file);", + + // single file + "multipartSingle(org.springframework.core.io.Resource file)", + "multipartSingleWithHttpInfo(org.springframework.core.io.Resource file)", + "formParams.add(\"file\", file);"); } @Test void testNotDuplicateOauth2FlowsScopes() { - final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_7614.yaml"); + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_7614.yaml"); final ClientOptInput clientOptInput = new ClientOptInput() .openAPI(openAPI) @@ -1181,7 +1310,8 @@ void testNotDuplicateOauth2FlowsScopes() { final Map> paths = defaultGenerator.processPaths(openAPI.getPaths()); final List codegenOperations = paths.values().stream().flatMap(Collection::stream).collect(Collectors.toList()); - final CodegenOperation getWithBasicAuthAndOauth = getByOperationId(codegenOperations, "getWithBasicAuthAndOauth"); + final CodegenOperation getWithBasicAuthAndOauth = + getByOperationId(codegenOperations, "getWithBasicAuthAndOauth"); assertEquals(getWithBasicAuthAndOauth.authMethods.size(), 3); assertEquals(getWithBasicAuthAndOauth.authMethods.get(0).name, "basic_auth"); final Map passwordFlowScope = getWithBasicAuthAndOauth.authMethods.get(1).scopes.get(0); @@ -1189,9 +1319,10 @@ void testNotDuplicateOauth2FlowsScopes() { assertEquals(passwordFlowScope.get("description"), "create from password flow"); final Map clientCredentialsFlow = getWithBasicAuthAndOauth.authMethods.get(2).scopes.get(0); assertEquals(clientCredentialsFlow.get("scope"), "something:create"); - assertEquals(clientCredentialsFlow.get("description"), "create from client credentials flow"); + assertEquals(clientCredentialsFlow.get("description"), "create from client credentials flow"); - final CodegenOperation getWithOauthAuth = getByOperationId(codegenOperations, "getWithOauthAuth"); + final CodegenOperation getWithOauthAuth = + getByOperationId(codegenOperations, "getWithOauthAuth"); assertEquals(getWithOauthAuth.authMethods.size(), 2); final Map passwordFlow = getWithOauthAuth.authMethods.get(0).scopes.get(0); assertEquals(passwordFlow.get("scope"), "something:create"); @@ -1199,16 +1330,22 @@ void testNotDuplicateOauth2FlowsScopes() { final Map clientCredentialsCreateFlow = getWithOauthAuth.authMethods.get(1).scopes.get(0); assertEquals(clientCredentialsCreateFlow.get("scope"), "something:create"); - assertEquals(clientCredentialsCreateFlow.get("description"), "create from client credentials flow"); + assertEquals( + clientCredentialsCreateFlow.get("description"), "create from client credentials flow"); final Map clientCredentialsProcessFlow = getWithOauthAuth.authMethods.get(1).scopes.get(1); assertEquals(clientCredentialsProcessFlow.get("scope"), "something:process"); - assertEquals(clientCredentialsProcessFlow.get("description"), "process from client credentials flow"); + assertEquals( + clientCredentialsProcessFlow.get("description"), "process from client credentials flow"); } private CodegenOperation getByOperationId(List codegenOperations, String operationId) { - return getByCriteria(codegenOperations, (co) -> co.operationId.equals(operationId)) - .orElseThrow(() -> new IllegalStateException(String.format(Locale.ROOT, "Operation with id [%s] does not exist", operationId))); + return getByCriteria(codegenOperations, (co) -> co.operationId.equals(operationId)) + .orElseThrow( + () -> + new IllegalStateException( + String.format( + Locale.ROOT, "Operation with id [%s] does not exist", operationId))); } private Optional getByCriteria(List codegenOperations, Predicate filter) { @@ -1232,18 +1369,22 @@ public void testCustomMethodParamsAreCamelizedWhenUsingFeign() throws IOExceptio DefaultGenerator generator = new DefaultGenerator(); List files = generator.opts(clientOptInput).generate(); - TestUtils.ensureContainsFile(files, output, "src/main/java/org/openapitools/client/api/DefaultApi.java"); + TestUtils.ensureContainsFile( + files, output, "src/main/java/org/openapitools/client/api/DefaultApi.java"); validateJavaSourceFiles(files); - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/org/openapitools/client/api/DefaultApi.java"), - "@RequestLine(\"POST /events/{eventId}:undelete\")"); - TestUtils.assertFileNotContains(Paths.get(output + "/src/main/java/org/openapitools/client/api/DefaultApi.java"), - "event_id"); + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/org/openapitools/client/api/DefaultApi.java"), + "@RequestLine(\"POST /events/{eventId}:undelete\")"); + TestUtils.assertFileNotContains( + Paths.get(output + "/src/main/java/org/openapitools/client/api/DefaultApi.java"), + "event_id"); - // baseName is kept for form parameters - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/org/openapitools/client/api/DefaultApi.java"), - "@Param(\"some_file\") File someFile"); + // baseName is kept for form parameters + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/org/openapitools/client/api/DefaultApi.java"), + "@Param(\"some_file\") File someFile"); output.deleteOnExit(); } @@ -1281,19 +1422,20 @@ public void testWebClientWithUseAbstractionForFiles() throws IOException { validateJavaSourceFiles(files); Path defaultApi = Paths.get(output + "/src/main/java/xyz/abcdef/api/MultipartApi.java"); - TestUtils.assertFileContains(defaultApi, - //multiple files - "multipartArray(java.util.Collection files)", - "formParams.addAll(\"files\", files.stream().collect(Collectors.toList()));", + TestUtils.assertFileContains( + defaultApi, + // multiple files + "multipartArray(java.util.Collection files)", + "formParams.addAll(\"files\", files.stream().collect(Collectors.toList()));", - //mixed - "multipartMixed(org.springframework.core.io.AbstractResource file, MultipartMixedMarker marker)", - "formParams.add(\"file\", file);", + // mixed + "multipartMixed(org.springframework.core.io.AbstractResource file, MultipartMixedMarker" + + " marker)", + "formParams.add(\"file\", file);", - //single file - "multipartSingle(org.springframework.core.io.AbstractResource file)", - "formParams.add(\"file\", file);" - ); + // single file + "multipartSingle(org.springframework.core.io.AbstractResource file)", + "formParams.add(\"file\", file);"); } /** @@ -1379,8 +1521,10 @@ public void testNativeClientWhiteSpacePathParamEncoding() throws IOException { Assert.assertEquals(files.size(), 35); validateJavaSourceFiles(files); - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/ApiClient.java"), - "public static String urlEncode(String s) { return URLEncoder.encode(s, UTF_8).replaceAll(\"\\\\+\", \"%20\"); }"); + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/xyz/abcdef/ApiClient.java"), + "public static String urlEncode(String s) { return URLEncoder.encode(s," + + " UTF_8).replaceAll(\"\\\\+\", \"%20\"); }"); } /** @@ -1408,12 +1552,16 @@ public void testNativeClientExplodedQueryParamObject() throws IOException { Assert.assertEquals(files.size(), 38); validateJavaSourceFiles(files); - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/api/DefaultApi.java"), - "localVarQueryParams.addAll(ApiClient.parameterToPairs(\"since\", queryObject.getSince()));", - "localVarQueryParams.addAll(ApiClient.parameterToPairs(\"sinceBuild\", queryObject.getSinceBuild()));", - "localVarQueryParams.addAll(ApiClient.parameterToPairs(\"maxBuilds\", queryObject.getMaxBuilds()));", - "localVarQueryParams.addAll(ApiClient.parameterToPairs(\"maxWaitSecs\", queryObject.getMaxWaitSecs()));" - ); + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/xyz/abcdef/api/DefaultApi.java"), + "localVarQueryParams.addAll(ApiClient.parameterToPairs(\"since\"," + + " queryObject.getSince()));", + "localVarQueryParams.addAll(ApiClient.parameterToPairs(\"sinceBuild\"," + + " queryObject.getSinceBuild()));", + "localVarQueryParams.addAll(ApiClient.parameterToPairs(\"maxBuilds\"," + + " queryObject.getMaxBuilds()));", + "localVarQueryParams.addAll(ApiClient.parameterToPairs(\"maxWaitSecs\"," + + " queryObject.getMaxWaitSecs()));"); } @Test @@ -1515,8 +1663,9 @@ public void testDefaultMicroprofileRestClientVersion() throws Exception { "1.2.1"); TestUtils.assertFileContains(Paths.get(output + "/pom.xml"), "1.8"); - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/org/openapitools/client/api/PetApi.java"), - "import javax."); + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/org/openapitools/client/api/PetApi.java"), + "import javax."); output.deleteOnExit(); } @@ -1543,20 +1692,26 @@ public void testMicroprofileRestClientVersion_1_4_1() throws Exception { validateJavaSourceFiles(files); - TestUtils.assertFileContains(Paths.get(output + "/pom.xml"), - "1.4.1"); + TestUtils.assertFileContains( + Paths.get(output + "/pom.xml"), + "1.4.1"); TestUtils.assertFileContains(Paths.get(output + "/pom.xml"), "1.2.1"); TestUtils.assertFileContains(Paths.get(output + "/pom.xml"), "1.8"); - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/org/openapitools/client/api/PetApi.java"), - "import javax."); + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/org/openapitools/client/api/PetApi.java"), + "import javax."); output.deleteOnExit(); } - @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "Version incorrectVersion of MicroProfile Rest Client is not supported or incorrect. Supported versions are 1.4.1, 2.0, 3.0") - public void testMicroprofileRestClientIncorrectVersion() throws Exception { + @Test( + expectedExceptions = IllegalArgumentException.class, + expectedExceptionsMessageRegExp = + "Version incorrectVersion of MicroProfile Rest Client is not supported or incorrect." + + " Supported versions are 1.4.1, 2.0, 3.0") + public void testMicroprofileRestClientIncorrectVersion() throws Exception { Map properties = new HashMap<>(); properties.put(JavaClientCodegen.MICROPROFILE_REST_CLIENT_VERSION, "incorrectVersion"); @@ -1604,8 +1759,9 @@ public void testMicroprofileRestClientVersion_3_0() throws Exception { "3.0.4"); TestUtils.assertFileContains(Paths.get(output + "/pom.xml"), "11"); - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/org/openapitools/client/api/PetApi.java"), - "import jakarta."); + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/org/openapitools/client/api/PetApi.java"), + "import jakarta."); output.deleteOnExit(); } @@ -1630,15 +1786,17 @@ public void testMicroprofileGenerateCorrectJsonbCreator_issue12622() throws Exce Map files = generator.opts(clientOptInput).generate().stream() .collect(Collectors.toMap(File::getName, Function.identity())); - JavaFileAssert.assertThat(files.get("Foo.java")) - .assertConstructor("String", "Integer") - .hasParameter("b") - .assertParameterAnnotations() - .containsWithNameAndAttributes("JsonbProperty", ImmutableMap.of("value", "\"b\"", "nillable", "true")) - .toParameter().toConstructor() - .hasParameter("c") - .assertParameterAnnotations() - .containsWithNameAndAttributes("JsonbProperty", ImmutableMap.of("value", "\"c\"")); + JavaFileAssert.assertThat(files.get("Foo.java")) + .assertConstructor("String", "Integer") + .hasParameter("b") + .assertParameterAnnotations() + .containsWithNameAndAttributes( + "JsonbProperty", ImmutableMap.of("value", "\"b\"", "nillable", "true")) + .toParameter() + .toConstructor() + .hasParameter("c") + .assertParameterAnnotations() + .containsWithNameAndAttributes("JsonbProperty", ImmutableMap.of("value", "\"c\"")); } @Test @@ -1649,12 +1807,14 @@ public void testJavaClientDefaultValues_issueNoNumber() throws Exception { File output = Files.createTempDirectory("test").toFile(); output.deleteOnExit(); - final CodegenConfigurator configurator = new CodegenConfigurator() - .setAdditionalProperties(properties) - .setGeneratorName("java") - .setLibrary(JavaClientCodegen.WEBCLIENT) - .setInputSpec("src/test/resources/bugs/java-codegen-empty-array-as-default-value/issue_wrong-default.yaml") - .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + final CodegenConfigurator configurator = + new CodegenConfigurator() + .setAdditionalProperties(properties) + .setGeneratorName("java") + .setLibrary(JavaClientCodegen.WEBCLIENT) + .setInputSpec( + "src/test/resources/bugs/java-codegen-empty-array-as-default-value/issue_wrong-default.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); final ClientOptInput clientOptInput = configurator.toClientOptInput(); DefaultGenerator generator = new DefaultGenerator(); @@ -1692,13 +1852,13 @@ public void testWebClientJsonCreatorWithNullable_issue12790() throws Exception { Map files = generator.opts(clientOptInput).generate().stream() .collect(Collectors.toMap(File::getName, Function.identity())); - JavaFileAssert.assertThat(files.get("TestObject.java")) - .printFileContent() - .assertConstructor("String", "String") - .bodyContainsLines( - "this.nullableProperty = nullableProperty == null ? JsonNullable.undefined() : JsonNullable.of(nullableProperty);", - "this.notNullableProperty = notNullableProperty;" - ); + JavaFileAssert.assertThat(files.get("TestObject.java")) + .printFileContent() + .assertConstructor("String", "String") + .bodyContainsLines( + "this.nullableProperty = nullableProperty == null ? JsonNullable.undefined() :" + + " JsonNullable.of(nullableProperty);", + "this.notNullableProperty = notNullableProperty;"); } @Test @@ -1726,11 +1886,12 @@ public void testRestTemplateResponseTypeWithUseAbstractionForFiles() throws IOEx validateJavaSourceFiles(files); Path defaultApi = Paths.get(output + "/src/main/java/xyz/abcdef/api/ResourceApi.java"); - TestUtils.assertFileContains(defaultApi, - "org.springframework.core.io.Resource resourceInResponse()", - "ResponseEntity resourceInResponseWithHttpInfo()", - "ParameterizedTypeReference localReturnType = new ParameterizedTypeReference()" - ); + TestUtils.assertFileContains( + defaultApi, + "org.springframework.core.io.Resource resourceInResponse()", + "ResponseEntity resourceInResponseWithHttpInfo()", + "ParameterizedTypeReference localReturnType = new" + + " ParameterizedTypeReference()"); } public void testExtraAnnotations(String library) throws IOException { @@ -1758,8 +1919,8 @@ public void testExtraAnnotations(String library) throws IOException { generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false"); generator.opts(clientOptInput).generate(); - TestUtils.assertExtraAnnotationFiles(outputPath + "/src/main/java/org/openapitools/client/model"); - + TestUtils.assertExtraAnnotationFiles( + outputPath + "/src/main/java/org/openapitools/client/model"); } /** @@ -1810,10 +1971,9 @@ public void testReturnTypeMapping() throws IOException { DefaultGenerator generator = new DefaultGenerator(); generator.opts(clientOptInput).generate(); - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/org/openapitools/client/api/DefaultApi.java"), - "import java.util.Stack;" - ); - + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/org/openapitools/client/api/DefaultApi.java"), + "import java.util.Stack;"); } @Test @@ -1835,9 +1995,10 @@ public void testNativeClientExplodedQueryParamWithArrayProperty() throws IOExcep DefaultGenerator generator = new DefaultGenerator(); generator.opts(clientOptInput).generate(); - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/api/DefaultApi.java"), - "localVarQueryParams.addAll(ApiClient.parameterToPairs(\"multi\", \"values\", queryObject.getValues()));" - ); + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/xyz/abcdef/api/DefaultApi.java"), + "localVarQueryParams.addAll(ApiClient.parameterToPairs(\"multi\", \"values\"," + + " queryObject.getValues()));"); } @Test @@ -1867,12 +2028,15 @@ public void testJdkHttpClientWithAndWithoutParentExtension() throws Exception { Assert.assertEquals(files.size(), 24); validateJavaSourceFiles(files); - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/model/Child.java"), - "public class Child extends Person {"); - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/model/Adult.java"), - "public class Adult extends Person {"); - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/model/AnotherChild.java"), - "public class AnotherChild {"); + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/xyz/abcdef/model/Child.java"), + "public class Child extends Person {"); + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/xyz/abcdef/model/Adult.java"), + "public class Adult extends Person {"); + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/xyz/abcdef/model/AnotherChild.java"), + "public class AnotherChild {"); } @Test @@ -1880,8 +2044,10 @@ public void testDiscriminatorWithMappingIssue14731() throws IOException { File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); output.deleteOnExit(); String outputPath = output.getAbsolutePath().replace('\\', '/'); - OpenAPI openAPI = new OpenAPIParser() - .readLocation("src/test/resources/bugs/issue_14731.yaml", null, new ParseOptions()).getOpenAPI(); + OpenAPI openAPI = + new OpenAPIParser() + .readLocation("src/test/resources/bugs/issue_14731.yaml", null, new ParseOptions()) + .getOpenAPI(); JavaClientCodegen codegen = new JavaClientCodegen(); codegen.setOutputDir(output.getAbsolutePath()); @@ -1894,8 +2060,7 @@ public void testDiscriminatorWithMappingIssue14731() throws IOException { DefaultGenerator generator = new DefaultGenerator(); generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "true"); - generator.setGeneratorPropertyDefault(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "false"); - + generator.setGeneratorPropertyDefault(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "false"); codegen.setUseOneOfInterfaces(true); codegen.setLegacyDiscriminatorBehavior(false); @@ -1909,8 +2074,14 @@ public void testDiscriminatorWithMappingIssue14731() throws IOException { generator.opts(input).generate(); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/ChildWithMappingADTO.java"), "@JsonTypeName"); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/ChildWithMappingBDTO.java"), "@JsonTypeName"); + assertFileNotContains( + Paths.get( + outputPath + "/src/main/java/org/openapitools/client/model/ChildWithMappingADTO.java"), + "@JsonTypeName"); + assertFileNotContains( + Paths.get( + outputPath + "/src/main/java/org/openapitools/client/model/ChildWithMappingBDTO.java"), + "@JsonTypeName"); } @Test @@ -1918,8 +2089,10 @@ public void testDiscriminatorWithoutMappingIssue14731() throws IOException { File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); output.deleteOnExit(); String outputPath = output.getAbsolutePath().replace('\\', '/'); - OpenAPI openAPI = new OpenAPIParser() - .readLocation("src/test/resources/bugs/issue_14731.yaml", null, new ParseOptions()).getOpenAPI(); + OpenAPI openAPI = + new OpenAPIParser() + .readLocation("src/test/resources/bugs/issue_14731.yaml", null, new ParseOptions()) + .getOpenAPI(); JavaClientCodegen codegen = new JavaClientCodegen(); codegen.setOutputDir(output.getAbsolutePath()); @@ -1932,8 +2105,7 @@ public void testDiscriminatorWithoutMappingIssue14731() throws IOException { DefaultGenerator generator = new DefaultGenerator(); generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "true"); - generator.setGeneratorPropertyDefault(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "false"); - + generator.setGeneratorPropertyDefault(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "false"); codegen.setUseOneOfInterfaces(true); codegen.setLegacyDiscriminatorBehavior(false); @@ -1949,8 +2121,16 @@ public void testDiscriminatorWithoutMappingIssue14731() throws IOException { generator.opts(input).generate(); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/ChildWithoutMappingADTO.java"), "@JsonTypeName"); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/ChildWithoutMappingBDTO.java"), "@JsonTypeName"); + assertFileContains( + Paths.get( + outputPath + + "/src/main/java/org/openapitools/client/model/ChildWithoutMappingADTO.java"), + "@JsonTypeName"); + assertFileContains( + Paths.get( + outputPath + + "/src/main/java/org/openapitools/client/model/ChildWithoutMappingBDTO.java"), + "@JsonTypeName"); } @Test @@ -1958,8 +2138,10 @@ public void testForJavaNativeJsonSubtype() throws IOException { File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); output.deleteOnExit(); String outputPath = output.getAbsolutePath().replace('\\', '/'); - OpenAPI openAPI = new OpenAPIParser() - .readLocation("src/test/resources/bugs/issue_14917.yaml", null, new ParseOptions()).getOpenAPI(); + OpenAPI openAPI = + new OpenAPIParser() + .readLocation("src/test/resources/bugs/issue_14917.yaml", null, new ParseOptions()) + .getOpenAPI(); JavaClientCodegen codegen = new JavaClientCodegen(); codegen.setOutputDir(output.getAbsolutePath()); @@ -1973,23 +2155,53 @@ public void testForJavaNativeJsonSubtype() throws IOException { generator.opts(input).generate(); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), "mappings.put(\"Cat\", Cat.class)"); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), "@JsonSubTypes"); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), "mappings.put(\"cat\", Cat.class);"); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), "mappings.put(\"dog\", Dog.class);"); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), "mappings.put(\"lizard\", Lizard.class);"); - - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), "@JsonSubTypes.Type(value = Cat.class, name = \"cat\")"); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), "@JsonSubTypes.Type(value = Dog.class, name = \"dog\")"); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), "@JsonSubTypes.Type(value = Lizard.class, name = \"lizard\")"); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), "mappings.put(\"cat\", Cat.class)"); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), "mappings.put(\"dog\", Dog.class)"); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), "mappings.put(\"lizard\", Lizard.class)"); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), "mappings.put(\"Pet\", Pet.class)"); - - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), "@JsonSubTypes.Type(value = Cat.class, name = \"Cat\")"); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), "@JsonSubTypes.Type(value = Dog.class, name = \"Dog\")"); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), "@JsonSubTypes.Type(value = Lizard.class, name = \"Lizard\")"); + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), + "mappings.put(\"Cat\", Cat.class)"); + assertFileNotContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), + "@JsonSubTypes"); + assertFileNotContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), + "mappings.put(\"cat\", Cat.class);"); + assertFileNotContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), + "mappings.put(\"dog\", Dog.class);"); + assertFileNotContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), + "mappings.put(\"lizard\", Lizard.class);"); + + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + "@JsonSubTypes.Type(value = Cat.class, name = \"cat\")"); + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + "@JsonSubTypes.Type(value = Dog.class, name = \"dog\")"); + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + "@JsonSubTypes.Type(value = Lizard.class, name = \"lizard\")"); + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + "mappings.put(\"cat\", Cat.class)"); + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + "mappings.put(\"dog\", Dog.class)"); + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + "mappings.put(\"lizard\", Lizard.class)"); + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + "mappings.put(\"Pet\", Pet.class)"); + + assertFileNotContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + "@JsonSubTypes.Type(value = Cat.class, name = \"Cat\")"); + assertFileNotContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + "@JsonSubTypes.Type(value = Dog.class, name = \"Dog\")"); + assertFileNotContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + "@JsonSubTypes.Type(value = Lizard.class, name = \"Lizard\")"); } @Test @@ -2000,14 +2212,21 @@ public void shouldProperlyExplodeRestTemplateQueryParameters_issue907() { JavaClientCodegen.RESTTEMPLATE ); - JavaFileAssert.assertThat(files.get("DefaultApi.java")) - .printFileContent() - .assertMethod("searchWithHttpInfo") - .bodyContainsLines("localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, \"regular-param\", regularParam));") - .bodyContainsLines("localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, \"someString\", objectParam.getSomeString()));") - .bodyContainsLines("localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, \"someBoolean\", objectParam.getSomeBoolean()));") - .bodyContainsLines("localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, \"someInteger\", objectParam.getSomeInteger()));") - ; + JavaFileAssert.assertThat(files.get("DefaultApi.java")) + .printFileContent() + .assertMethod("searchWithHttpInfo") + .bodyContainsLines( + "localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, \"regular-param\"," + + " regularParam));") + .bodyContainsLines( + "localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, \"someString\"," + + " objectParam.getSomeString()));") + .bodyContainsLines( + "localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, \"someBoolean\"," + + " objectParam.getSomeBoolean()));") + .bodyContainsLines( + "localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, \"someInteger\"," + + " objectParam.getSomeInteger()));"); } private static Map generateFromContract(final String pathToSpecification, final String library) { @@ -2041,8 +2260,10 @@ public void testForJavaApacheHttpClientJsonSubtype() throws IOException { File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); output.deleteOnExit(); String outputPath = output.getAbsolutePath().replace('\\', '/'); - OpenAPI openAPI = new OpenAPIParser() - .readLocation("src/test/resources/bugs/issue_14917.yaml", null, new ParseOptions()).getOpenAPI(); + OpenAPI openAPI = + new OpenAPIParser() + .readLocation("src/test/resources/bugs/issue_14917.yaml", null, new ParseOptions()) + .getOpenAPI(); JavaClientCodegen codegen = new JavaClientCodegen(); codegen.setOutputDir(output.getAbsolutePath()); @@ -2056,24 +2277,51 @@ public void testForJavaApacheHttpClientJsonSubtype() throws IOException { generator.opts(input).generate(); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), "@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = \"petType\", visible = true)"); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), "mappings.put"); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), "@JsonSubTypes.Type(value = Cat.class, name = \"cat\")"); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), "@JsonSubTypes.Type(value = Dog.class, name = \"dog\")"); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), "@JsonSubTypes.Type(value = Lizard.class, name = \"lizard\")"); - - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), "@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = \"petType\", visible = true)"); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), "@JsonSubTypes.Type(value = Cat.class, name = \"cat\")"); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), "@JsonSubTypes.Type(value = Dog.class, name = \"dog\")"); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), "@JsonSubTypes.Type(value = Lizard.class, name = \"lizard\")"); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), "@JsonSubTypes.Type(value = Cat.class, name = \"Cat\")"); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), "@JsonSubTypes.Type(value = Dog.class, name = \"Dog\")"); - assertFileNotContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), "@JsonSubTypes.Type(value = Lizard.class, name = \"Lizard\")"); + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), + "@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property =" + + " \"petType\", visible = true)"); + assertFileNotContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), + "mappings.put"); + assertFileNotContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), + "@JsonSubTypes.Type(value = Cat.class, name = \"cat\")"); + assertFileNotContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), + "@JsonSubTypes.Type(value = Dog.class, name = \"dog\")"); + assertFileNotContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), + "@JsonSubTypes.Type(value = Lizard.class, name = \"lizard\")"); + + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + "@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property =" + + " \"petType\", visible = true)"); + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + "@JsonSubTypes.Type(value = Cat.class, name = \"cat\")"); + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + "@JsonSubTypes.Type(value = Dog.class, name = \"dog\")"); + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + "@JsonSubTypes.Type(value = Lizard.class, name = \"lizard\")"); + assertFileNotContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + "@JsonSubTypes.Type(value = Cat.class, name = \"Cat\")"); + assertFileNotContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + "@JsonSubTypes.Type(value = Dog.class, name = \"Dog\")"); + assertFileNotContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + "@JsonSubTypes.Type(value = Lizard.class, name = \"Lizard\")"); } @Test public void testIsOverriddenProperty() { - final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/allOf_composition_discriminator.yaml"); + final OpenAPI openAPI = + TestUtils.parseFlattenSpec("src/test/resources/3_0/allOf_composition_discriminator.yaml"); JavaClientCodegen codegen = new JavaClientCodegen(); Schema test1 = openAPI.getComponents().getSchemas().get("Cat"); @@ -2094,8 +2342,13 @@ public void testForJavaApacheHttpClientOverrideSetter() throws IOException { File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); output.deleteOnExit(); String outputPath = output.getAbsolutePath().replace('\\', '/'); - OpenAPI openAPI = new OpenAPIParser() - .readLocation("src/test/resources/3_0/allOf_composition_discriminator.yaml", null, new ParseOptions()).getOpenAPI(); + OpenAPI openAPI = + new OpenAPIParser() + .readLocation( + "src/test/resources/3_0/allOf_composition_discriminator.yaml", + null, + new ParseOptions()) + .getOpenAPI(); JavaClientCodegen codegen = new JavaClientCodegen(); codegen.setOutputDir(output.getAbsolutePath()); @@ -2109,12 +2362,12 @@ public void testForJavaApacheHttpClientOverrideSetter() throws IOException { generator.opts(input).generate(); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), " @Override\n" + - " public Cat petType(String petType) {"); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), " }\n" + - "\n" + - " public Pet petType(String petType) {\n"); - + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), + " @Override\n" + " public Cat petType(String petType) {"); + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + " }\n" + "\n" + " public Pet petType(String petType) {\n"); } @Test @@ -2122,8 +2375,13 @@ public void testForJavaNativeClientOverrideSetter() throws IOException { File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); output.deleteOnExit(); String outputPath = output.getAbsolutePath().replace('\\', '/'); - OpenAPI openAPI = new OpenAPIParser() - .readLocation("src/test/resources/3_0/allOf_composition_discriminator.yaml", null, new ParseOptions()).getOpenAPI(); + OpenAPI openAPI = + new OpenAPIParser() + .readLocation( + "src/test/resources/3_0/allOf_composition_discriminator.yaml", + null, + new ParseOptions()) + .getOpenAPI(); JavaClientCodegen codegen = new JavaClientCodegen(); codegen.setOutputDir(output.getAbsolutePath()); @@ -2137,12 +2395,12 @@ public void testForJavaNativeClientOverrideSetter() throws IOException { generator.opts(input).generate(); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), " @Override\n" + - " public Cat petType(String petType) {"); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), " }\n" + - "\n" + - " public Pet petType(String petType) {\n"); - + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Cat.java"), + " @Override\n" + " public Cat petType(String petType) {"); + assertFileContains( + Paths.get(outputPath + "/src/main/java/org/openapitools/client/model/Pet.java"), + " }\n" + "\n" + " public Pet petType(String petType) {\n"); } @Test @@ -2161,22 +2419,22 @@ public void testDeprecatedProperty() throws Exception { validateJavaSourceFiles(files); - // deprecated builder method - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/org/openapitools/client/model/BigDog.java"), - "@Deprecated\n" + - " public BigDog declawed(Boolean declawed) {"); - - // deprecated getter - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/org/openapitools/client/model/BigDog.java"), - "@Deprecated\n" + - " @javax.annotation.Nullable\n" + - "\n" + - " public Boolean getDeclawed() {"); - // deprecated setter - TestUtils.assertFileContains(Paths.get(output + "/src/main/java/org/openapitools/client/model/BigDog.java"), - "@Deprecated\n" + - " public void setDeclawed(Boolean declawed) {"); - + // deprecated builder method + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/org/openapitools/client/model/BigDog.java"), + "@Deprecated\n" + " public BigDog declawed(Boolean declawed) {"); + + // deprecated getter + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/org/openapitools/client/model/BigDog.java"), + "@Deprecated\n" + + " @javax.annotation.Nullable\n" + + "\n" + + " public Boolean getDeclawed() {"); + // deprecated setter + TestUtils.assertFileContains( + Paths.get(output + "/src/main/java/org/openapitools/client/model/BigDog.java"), + "@Deprecated\n" + " public void setDeclawed(Boolean declawed) {"); output.deleteOnExit(); } @@ -2191,10 +2449,12 @@ public void shouldNotAddAdditionalModelAnnotationsToAbstractOpenApiSchema_issue1 File output = Files.createTempDirectory("test").toFile(); output.deleteOnExit(); - final CodegenConfigurator configurator = new CodegenConfigurator() + final CodegenConfigurator configurator = + new CodegenConfigurator() .setGeneratorName("java") .setLibrary(library) - .addAdditionalProperty(AbstractJavaCodegen.ADDITIONAL_MODEL_TYPE_ANNOTATIONS, "@annotation1;@annotation2") + .addAdditionalProperty( + AbstractJavaCodegen.ADDITIONAL_MODEL_TYPE_ANNOTATIONS, "@annotation1;@annotation2") .setInputSpec("src/test/resources/3_0/deprecated-properties.yaml") .setOutputDir(output.getAbsolutePath().replace("\\", "/")); @@ -2322,14 +2582,16 @@ public void testWebClientSupportListOfStringReturnType_issue7118() throws IOExce validateJavaSourceFiles(files); Path userApi = Paths.get(output + "/src/main/java/xyz/abcdef/api/UsersApi.java"); - TestUtils.assertFileContains(userApi, - // set of string - "ParameterizedTypeReference> localVarReturnType = new ParameterizedTypeReference>() {};", - "getUserIdSetRequestCreation().toEntity(localVarReturnType)", - // list of string - "ParameterizedTypeReference> localVarReturnType = new ParameterizedTypeReference>() {};", - "getUserIdListRequestCreation().toEntity(localVarReturnType)" - ); + TestUtils.assertFileContains( + userApi, + // set of string + "ParameterizedTypeReference> localVarReturnType = new" + + " ParameterizedTypeReference>() {};", + "getUserIdSetRequestCreation().toEntity(localVarReturnType)", + // list of string + "ParameterizedTypeReference> localVarReturnType = new" + + " ParameterizedTypeReference>() {};", + "getUserIdListRequestCreation().toEntity(localVarReturnType)"); } @Test @@ -2384,4 +2646,31 @@ public void testEnumCaseSensitive_issue8084() throws IOException { .bodyContainsLines("if (b.value.equals(value)) {"); } + @Test + public void testHandleConstantParams() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/java/autoset_constant.yaml"); + final DefaultGenerator defaultGenerator = new DefaultGenerator(); + final ClientOptInput clientOptInput = new ClientOptInput(); + clientOptInput.openAPI(openAPI); + JavaClientCodegen javaClientCodegen = new JavaClientCodegen(); + javaClientCodegen.setOutputDir(output.getAbsolutePath()); + javaClientCodegen.additionalProperties().put(JavaClientCodegen.AUTOSET_CONSTANTS, "true"); + javaClientCodegen.setAutosetConstants(true); + clientOptInput.config(javaClientCodegen); + defaultGenerator.opts(clientOptInput); + + Map files = defaultGenerator.generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + File apiFile = files.get("HelloExampleApi.java"); + + assertNotNull(apiFile); + JavaFileAssert.assertThat(apiFile) + .assertMethod("helloCall", "String", "ApiCallback") + .bodyContainsLines( + "localVarHeaderParams.put(\"X-CUSTOM_CONSTANT_HEADER\", \"CONSTANT_VALUE\")"); + } + } diff --git a/modules/openapi-generator/src/test/resources/3_0/java/autoset_constant.yaml b/modules/openapi-generator/src/test/resources/3_0/java/autoset_constant.yaml new file mode 100644 index 000000000000..d8248a85695f --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/java/autoset_constant.yaml @@ -0,0 +1,42 @@ +openapi: 3.0.3 +info: + title: Example Hello API + description: '' + version: v1 +servers: + - url: http://localhost + description: Global Endpoint +paths: + /v1/hello/{name}: + get: + tags: + - hello_example + operationId: Hello + description: Say Hello + parameters: + - name: X-CUSTOM_CONSTANT_HEADER + in: header + required: true + schema: + type: string + enum: + - CONSTANT_VALUE + - name: name + in: path + required: true + schema: + type: string + responses: + default: + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/HelloResponse' +components: + schemas: + HelloResponse: + type: object + properties: + message: + type: string \ No newline at end of file From 70bffffc5a09c5d4304be61ee17f9b1600453e58 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 15 Sep 2023 15:01:21 +0800 Subject: [PATCH 22/59] remove option, update doc (#16592) --- docs/generators/groovy.md | 1 - docs/generators/java-camel.md | 1 - docs/generators/java-helidon-client.md | 1 - docs/generators/java-helidon-server.md | 1 - docs/generators/java-inflector.md | 1 - docs/generators/java-micronaut-client.md | 1 - docs/generators/java-micronaut-server.md | 1 - docs/generators/java-msf4j.md | 1 - docs/generators/java-pkmst.md | 1 - docs/generators/java-play-framework.md | 1 - docs/generators/java-undertow-server.md | 1 - docs/generators/java-vertx-web.md | 1 - docs/generators/java-vertx.md | 1 - docs/generators/java.md | 1 - docs/generators/jaxrs-cxf-cdi.md | 1 - docs/generators/jaxrs-cxf-client.md | 1 - docs/generators/jaxrs-cxf-extended.md | 1 - docs/generators/jaxrs-cxf.md | 1 - docs/generators/jaxrs-jersey.md | 1 - docs/generators/jaxrs-resteasy-eap.md | 1 - docs/generators/jaxrs-resteasy.md | 1 - docs/generators/jaxrs-spec.md | 1 - docs/generators/spring.md | 1 - .../org/openapitools/codegen/languages/AbstractJavaCodegen.java | 1 - 24 files changed, 24 deletions(-) diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index 8a0bd7ad207b..ef327d98124f 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -25,7 +25,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |apiPackage|package for generated api classes| |org.openapitools.api| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-groovy| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index 0f6a369f7af2..84a85a253a23 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -30,7 +30,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| |async|use async Callable controllers| |false| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |basePackage|base package (invokerPackage) for generated code| |org.openapitools| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| diff --git a/docs/generators/java-helidon-client.md b/docs/generators/java-helidon-client.md index 79440feabcd5..e7c4f63d0b57 100644 --- a/docs/generators/java-helidon-client.md +++ b/docs/generators/java-helidon-client.md @@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-client| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/java-helidon-server.md b/docs/generators/java-helidon-server.md index 0360cad75fe6..a027e1cee38d 100644 --- a/docs/generators/java-helidon-server.md +++ b/docs/generators/java-helidon-server.md @@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 68d8c1414ac8..c91aa73e31bd 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-inflector-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md index 0395914cec57..76e90328b3f7 100644 --- a/docs/generators/java-micronaut-client.md +++ b/docs/generators/java-micronaut-client.md @@ -30,7 +30,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| |authorizationFilterPattern|Configure the authorization filter pattern for the client. Generally defined when generating clients from multiple specification files| |null| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |basePathSeparator|Configure the separator to use between the application name and base path when referencing the property| |-| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| diff --git a/docs/generators/java-micronaut-server.md b/docs/generators/java-micronaut-server.md index 057fb2da564a..2366e962c65b 100644 --- a/docs/generators/java-micronaut-server.md +++ b/docs/generators/java-micronaut-server.md @@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-micronaut| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |build|Specify for which build tool to generate files|
**gradle**
Gradle configuration is generated for the project
**all**
Both Gradle and Maven configurations are generated
**maven**
Maven configuration is generated for the project
|all| diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index 9daa84171f3b..d656e20a81da 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index 6ea10a27ac54..56f49ef7d2f1 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |pkmst-microservice| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |basePackage|base package for java source code| |null| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index 86750639ddc7..b0205e0a4b3a 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-playframework| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |basePackage|base package for generated code| |org.openapitools| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index 1aa234dd3169..7342fd046e8f 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-undertow-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index bee4c2e63309..2057fefafc98 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-vertx-web-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0-SNAPSHOT| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index fef6af1b6441..57b3b487f73d 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-vertx-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0-SNAPSHOT| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/java.md b/docs/generators/java.md index ea5310688bc7..0eb95e0ef8f1 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -29,7 +29,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| |asyncNative|If true, async handlers will be used, instead of the sync version| |false| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index b7d670e8dbb9..3c470946b303 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-cxf-cdi-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index bbbc265ebb7a..d2501c27ed7b 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-client| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index bd16ea9cd02d..b5e40fddf862 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -28,7 +28,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-cxf-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index 47a667c2e9c2..19cbe9aaa0ac 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -28,7 +28,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-cxf-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index 2e79c39409fb..e25a01acaf0b 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index bf198db901f1..f78b67963026 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-resteasy-eap-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index 59c2f3f3516d..55bb4e75cefb 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-resteasy-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 85477ef87855..8c5c3e899c8c 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| |camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false| diff --git a/docs/generators/spring.md b/docs/generators/spring.md index cbf36af54e25..3b5f5f5f4d0a 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -30,7 +30,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| |async|use async Callable controllers| |false| -|autosetConstants|Automatically set Required Params having a Single enum value i.e. Constants in generated code| |false| |basePackage|base package (invokerPackage) for generated code| |org.openapitools| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |booleanGetterPrefix|Set booleanGetterPrefix| |get| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 4d74bb3cdad0..d402f264754f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -279,7 +279,6 @@ public AbstractJavaCodegen() { cliOptions.add(CliOption.newBoolean(OPENAPI_NULLABLE, "Enable OpenAPI Jackson Nullable library", this.openApiNullable)); cliOptions.add(CliOption.newBoolean(IMPLICIT_HEADERS, "Skip header parameters in the generated API methods using @ApiImplicitParams annotation.", implicitHeaders)); cliOptions.add(CliOption.newString(IMPLICIT_HEADERS_REGEX, "Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true")); - cliOptions.add(CliOption.newBoolean(AUTOSET_CONSTANTS, "Automatically set Required Params having a Single enum value i.e. Constants in generated code", autosetConstants)); cliOptions.add(CliOption.newBoolean(CAMEL_CASE_DOLLAR_SIGN, "Fix camelCase when starting with $ sign. when true : $Value when false : $value")); cliOptions.add(CliOption.newBoolean(USE_JAKARTA_EE, "whether to use Jakarta EE namespace instead of javax")); cliOptions.add(CliOption.newBoolean(CONTAINER_DEFAULT_TO_NULL, "Set containers (array, set, map) default to null")); From 5f0d7053e4c18433a23cb1414d9d51a07764848d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 15 Sep 2023 15:50:25 +0800 Subject: [PATCH 23/59] Update go gin to newer version (#16593) * update go gin to newer version * update test --- .../resources/go-gin-server/go.mod.mustache | 33 ++++++++++--------- .../goginserver/GoGinServerCodegenTest.java | 2 +- .../server/petstore/go-gin-api-server/go.mod | 33 ++++++++++--------- 3 files changed, 35 insertions(+), 33 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/go-gin-server/go.mod.mustache b/modules/openapi-generator/src/main/resources/go-gin-server/go.mod.mustache index d6738edec894..b8324f83cece 100644 --- a/modules/openapi-generator/src/main/resources/go-gin-server/go.mod.mustache +++ b/modules/openapi-generator/src/main/resources/go-gin-server/go.mod.mustache @@ -2,30 +2,31 @@ module {{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}} go 1.19 -require github.com/gin-gonic/gin v1.9.0 +require github.com/gin-gonic/gin v1.9.1 require ( - github.com/bytedance/sonic v1.8.0 // indirect + github.com/bytedance/sonic v1.9.1 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect + github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.11.2 // indirect - github.com/goccy/go-json v0.10.0 // indirect + github.com/go-playground/validator/v10 v10.14.0 // indirect + github.com/goccy/go-json v0.10.2 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/cpuid/v2 v2.0.9 // indirect - github.com/leodido/go-urn v1.2.1 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect + github.com/klauspost/cpuid/v2 v2.2.4 // indirect + github.com/leodido/go-urn v1.2.4 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect + github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.2.9 // indirect - golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect - golang.org/x/crypto v0.5.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect + github.com/ugorji/go/codec v1.2.11 // indirect + golang.org/x/arch v0.3.0 // indirect + golang.org/x/crypto v0.9.0 // indirect + golang.org/x/net v0.10.0 // indirect + golang.org/x/sys v0.8.0 // indirect + golang.org/x/text v0.9.0 // indirect + google.golang.org/protobuf v1.30.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/goginserver/GoGinServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/goginserver/GoGinServerCodegenTest.java index ee207f4ddcc9..0602c2af8f24 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/goginserver/GoGinServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/goginserver/GoGinServerCodegenTest.java @@ -56,7 +56,7 @@ public void verifyGoMod() throws IOException { TestUtils.assertFileContains(Paths.get(output + "/go.mod"), "module github.com/my-user/my-repo"); TestUtils.assertFileContains(Paths.get(output + "/go.mod"), - "require github.com/gin-gonic/gin v1.9.0"); + "require github.com/gin-gonic/gin v1.9.1"); } } diff --git a/samples/server/petstore/go-gin-api-server/go.mod b/samples/server/petstore/go-gin-api-server/go.mod index 625adf098baf..054f904bb08d 100644 --- a/samples/server/petstore/go-gin-api-server/go.mod +++ b/samples/server/petstore/go-gin-api-server/go.mod @@ -2,30 +2,31 @@ module github.com/GIT_USER_ID/GIT_REPO_ID go 1.19 -require github.com/gin-gonic/gin v1.9.0 +require github.com/gin-gonic/gin v1.9.1 require ( - github.com/bytedance/sonic v1.8.0 // indirect + github.com/bytedance/sonic v1.9.1 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect + github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.11.2 // indirect - github.com/goccy/go-json v0.10.0 // indirect + github.com/go-playground/validator/v10 v10.14.0 // indirect + github.com/goccy/go-json v0.10.2 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/cpuid/v2 v2.0.9 // indirect - github.com/leodido/go-urn v1.2.1 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect + github.com/klauspost/cpuid/v2 v2.2.4 // indirect + github.com/leodido/go-urn v1.2.4 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect + github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.2.9 // indirect - golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect - golang.org/x/crypto v0.5.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect + github.com/ugorji/go/codec v1.2.11 // indirect + golang.org/x/arch v0.3.0 // indirect + golang.org/x/crypto v0.9.0 // indirect + golang.org/x/net v0.10.0 // indirect + golang.org/x/sys v0.8.0 // indirect + golang.org/x/text v0.9.0 // indirect + google.golang.org/protobuf v1.30.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) From 7d86adccc4f8f136b2cf80e76ce576449ff0d6cc Mon Sep 17 00:00:00 2001 From: Beppe Catanese <1771700+gcatanese@users.noreply.github.com> Date: Mon, 18 Sep 2023 04:38:22 +0200 Subject: [PATCH 24/59] Add postman-collection generator to list (others) (#16599) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 49efc07dc3c9..b702f0188a29 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se | **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Julia**, **Kotlin** (Spring Boot, [Ktor](https://github.com/ktorio/ktor), [Vert.x](https://vertx.io/)), **PHP** (Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) | | **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** | | **Configuration files** | [**Apache2**](https://httpd.apache.org/) | -| **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Protocol Buffer**, **WSDL** | +| **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Postman Collection**, **Protocol Buffer**, **WSDL** | ## Table of contents From 8c8be7482b9660394749a889f22c926093b98a8c Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 18 Sep 2023 11:26:33 +0800 Subject: [PATCH 25/59] Update java undertow to newer version (#16606) * update java undertow to newer version * update compiler plugin to newer version * test undertow in circleci * use 3.0 spec --- .../workflows/samples-java-server-jdk8.yaml | 5 +- ...ndertow.yaml => java-undertow-server.yaml} | 2 +- .../java-undertow-server/pom.mustache | 2 +- pom.xml | 2 + .../java-undertow/dependency-reduced-pom.xml | 2 +- samples/server/petstore/java-undertow/pom.xml | 2 +- .../handler/PathHandlerInterface.java | 60 +++- .../src/main/resources/config/openapi.json | 279 +++++++++++------- 8 files changed, 231 insertions(+), 123 deletions(-) rename bin/configs/{java-undertow-server-java-undertow.yaml => java-undertow-server.yaml} (78%) diff --git a/.github/workflows/samples-java-server-jdk8.yaml b/.github/workflows/samples-java-server-jdk8.yaml index 73e4bcfb0b84..342a624b0c79 100644 --- a/.github/workflows/samples-java-server-jdk8.yaml +++ b/.github/workflows/samples-java-server-jdk8.yaml @@ -8,6 +8,7 @@ on: - 'samples/server/petstore/java-vertx-web/**' - 'samples/server/petstore/java-inflector/**' - 'samples/server/petstore/java-pkmst/**' + # test in circleci instead - 'samples/server/petstore/java-undertow/**' pull_request: paths: @@ -15,7 +16,7 @@ on: - 'samples/server/petstore/java-vertx-web/**' - 'samples/server/petstore/java-inflector/**' - 'samples/server/petstore/java-pkmst/**' - - 'samples/server/petstore/java-undertow/**' + #- 'samples/server/petstore/java-undertow/**' jobs: build: name: Build Java Server @@ -29,7 +30,7 @@ jobs: - samples/server/petstore/java-vertx-web/ - samples/server/petstore/java-inflector/ - samples/server/petstore/java-pkmst/ - - samples/server/petstore/java-undertow/ + #- samples/server/petstore/java-undertow/ steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v3 diff --git a/bin/configs/java-undertow-server-java-undertow.yaml b/bin/configs/java-undertow-server.yaml similarity index 78% rename from bin/configs/java-undertow-server-java-undertow.yaml rename to bin/configs/java-undertow-server.yaml index 2cbb1160f171..0abaa522f85a 100644 --- a/bin/configs/java-undertow-server-java-undertow.yaml +++ b/bin/configs/java-undertow-server.yaml @@ -1,6 +1,6 @@ generatorName: java-undertow-server outputDir: samples/server/petstore/java-undertow -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/java-undertow-server additionalProperties: hideGenerationTimestamp: "true" diff --git a/modules/openapi-generator/src/main/resources/java-undertow-server/pom.mustache b/modules/openapi-generator/src/main/resources/java-undertow-server/pom.mustache index 09880bfb29e8..0c935a6ad275 100644 --- a/modules/openapi-generator/src/main/resources/java-undertow-server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/java-undertow-server/pom.mustache @@ -29,7 +29,7 @@ 1.2.0 4.13.2 2.1.0-beta.124 - 2.2.24.Final + 2.3.5.Final 2.2.0 4.5.13 4.1.2 diff --git a/pom.xml b/pom.xml index 18a60a479670..d69e6af2c801 100644 --- a/pom.xml +++ b/pom.xml @@ -1290,6 +1290,8 @@ samples/client/petstore/java/resteasy samples/client/petstore/java-micronaut-client samples/client/petstore/java/apache-httpclient + + samples/server/petstore/java-undertow diff --git a/samples/server/petstore/java-undertow/dependency-reduced-pom.xml b/samples/server/petstore/java-undertow/dependency-reduced-pom.xml index 5ed0060b336a..43d9fc19edd4 100644 --- a/samples/server/petstore/java-undertow/dependency-reduced-pom.xml +++ b/samples/server/petstore/java-undertow/dependency-reduced-pom.xml @@ -135,7 +135,7 @@ 0.1.1 2.14.1 4.1.2 - 2.2.24.Final + 2.3.5.Final 1.7.21 2.14.1 UTF-8 diff --git a/samples/server/petstore/java-undertow/pom.xml b/samples/server/petstore/java-undertow/pom.xml index 4659968f144c..d4503f49f405 100644 --- a/samples/server/petstore/java-undertow/pom.xml +++ b/samples/server/petstore/java-undertow/pom.xml @@ -29,7 +29,7 @@ 1.2.0 4.13.2 2.1.0-beta.124 - 2.2.24.Final + 2.3.5.Final 2.2.0 4.5.13 4.1.2 diff --git a/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java b/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java index e55763683cdb..24e6b8d80f48 100644 --- a/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java +++ b/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java @@ -21,6 +21,8 @@ public interface PathHandlerInterface { /** *

Add a new pet to the store

* + *

+ * *

Endpoint: {@link Methods#POST POST} "/v2/pet" (privileged: true)

* *

Request parameters:

@@ -30,9 +32,12 @@ public interface PathHandlerInterface { *

Consumes: [{isJson=true, mediaType=application/json}, {isXml=true, mediaType=application/xml}]

*

Payload: {@link Pet} (required: true)

* + *

Produces: [{isXml=true, mediaType=application/xml}, {isJson=true, mediaType=application/json}]

+ *

Returns: {@link Pet}

* *

Responses:

*
    + *
  • 200 (success): successful operation
  • *
  • 405 (client error): Invalid input
  • *
*/ @@ -42,6 +47,8 @@ public interface PathHandlerInterface { /** *

Deletes a pet

* + *

+ * *

Endpoint: {@link Methods#DELETE DELETE} "/v2/pet/{petId}" (privileged: true)

* *

Request parameters:

@@ -175,6 +182,8 @@ public interface PathHandlerInterface { /** *

Update an existing pet

* + *

+ * *

Endpoint: {@link Methods#PUT PUT} "/v2/pet" (privileged: true)

* *

Request parameters:

@@ -184,9 +193,12 @@ public interface PathHandlerInterface { *

Consumes: [{isJson=true, mediaType=application/json}, {isXml=true, mediaType=application/xml}]

*

Payload: {@link Pet} (required: true)

* + *

Produces: [{isXml=true, mediaType=application/xml}, {isJson=true, mediaType=application/json}]

+ *

Returns: {@link Pet}

* *

Responses:

*
    + *
  • 200 (success): successful operation
  • *
  • 400 (client error): Invalid ID supplied
  • *
  • 404 (client error): Pet not found
  • *
  • 405 (client error): Validation exception
  • @@ -198,6 +210,8 @@ public interface PathHandlerInterface { /** *

    Updates a pet in the store with form data

    * + *

    + * *

    Endpoint: {@link Methods#POST POST} "/v2/pet/{petId}" (privileged: true)

    * *

    Request parameters:

    @@ -245,6 +259,8 @@ public interface PathHandlerInterface { /** *

    uploads an image

    * + *

    + * *

    Endpoint: {@link Methods#POST POST} "/v2/pet/{petId}/uploadImage" (privileged: true)

    * *

    Request parameters:

    @@ -375,12 +391,17 @@ public interface PathHandlerInterface { /** *

    Place an order for a pet

    * + *

    + * *

    Endpoint: {@link Methods#POST POST} "/v2/store/order" (privileged: false)

    * *

    Request parameters:

    *
      *
    * + *

    Consumes: [{isJson=true, mediaType=application/json}]

    + *

    Payload: {@link Order} (required: true)

    + * *

    Produces: [{isXml=true, mediaType=application/xml}, {isJson=true, mediaType=application/json}]

    *

    Returns: {@link Order}

    * @@ -398,12 +419,15 @@ public interface PathHandlerInterface { * *

    This can only be done by the logged in user.

    * - *

    Endpoint: {@link Methods#POST POST} "/v2/user" (privileged: false)

    + *

    Endpoint: {@link Methods#POST POST} "/v2/user" (privileged: true)

    * *

    Request parameters:

    *
      *
    * + *

    Consumes: [{isJson=true, mediaType=application/json}]

    + *

    Payload: {@link User} (required: true)

    + * * *

    Responses:

    *
      @@ -416,12 +440,17 @@ public interface PathHandlerInterface { /** *

      Creates list of users with given input array

      * - *

      Endpoint: {@link Methods#POST POST} "/v2/user/createWithArray" (privileged: false)

      + *

      + * + *

      Endpoint: {@link Methods#POST POST} "/v2/user/createWithArray" (privileged: true)

      * *

      Request parameters:

      *
        *
      * + *

      Consumes: [{isJson=true, mediaType=application/json}]

      + *

      Payload: {@link java.util.List List} of {@link User} (required: true)

      + * * *

      Responses:

      *
        @@ -434,12 +463,17 @@ public interface PathHandlerInterface { /** *

        Creates list of users with given input array

        * - *

        Endpoint: {@link Methods#POST POST} "/v2/user/createWithList" (privileged: false)

        + *

        + * + *

        Endpoint: {@link Methods#POST POST} "/v2/user/createWithList" (privileged: true)

        * *

        Request parameters:

        *
          *
        * + *

        Consumes: [{isJson=true, mediaType=application/json}]

        + *

        Payload: {@link java.util.List List} of {@link User} (required: true)

        + * * *

        Responses:

        *
          @@ -454,7 +488,7 @@ public interface PathHandlerInterface { * *

          This can only be done by the logged in user.

          * - *

          Endpoint: {@link Methods#DELETE DELETE} "/v2/user/{username}" (privileged: false)

          + *

          Endpoint: {@link Methods#DELETE DELETE} "/v2/user/{username}" (privileged: true)

          * *

          Request parameters:

          *
            @@ -482,6 +516,8 @@ public interface PathHandlerInterface { /** *

            Get user by user name

            * + *

            + * *

            Endpoint: {@link Methods#GET GET} "/v2/user/{username}" (privileged: false)

            * *

            Request parameters:

            @@ -513,6 +549,8 @@ public interface PathHandlerInterface { /** *

            Logs user into the system

            * + *

            + * *

            Endpoint: {@link Methods#GET GET} "/v2/user/login" (privileged: false)

            * *

            Request parameters:

            @@ -536,7 +574,10 @@ public interface PathHandlerInterface { *

            * *
          - *

          Response headers: [CodegenProperty{openApiType='integer', baseName='X-Rate-Limit', complexType='null', getter='getxRateLimit', setter='setxRateLimit', description='calls per hour allowed by the user', dataType='Integer', datatypeWithEnum='Integer', dataFormat='int32', name='xRateLimit', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Rate-Limit;', baseType='Integer', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='calls per hour allowed by the user', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{ + *

          Response headers: [CodegenProperty{openApiType='string', baseName='Set-Cookie', complexType='null', getter='getSetCookie', setter='setSetCookie', description='Cookie authentication key for use with the `api_key` apiKey authentication.', dataType='String', datatypeWithEnum='String', dataFormat='null', name='setCookie', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.Set-Cookie;', baseType='String', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='Cookie authentication key for use with the `api_key` apiKey authentication.', maxLength=null, minLength=null, pattern='null', example='AUTH_KEY=abcde12345; Path=/; HttpOnly', jsonSchema='{ + "type" : "string", + "example" : "AUTH_KEY=abcde12345; Path=/; HttpOnly" +}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=true, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='SetCookie', nameInSnakeCase='SET_COOKIE', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, CodegenProperty{openApiType='integer', baseName='X-Rate-Limit', complexType='null', getter='getxRateLimit', setter='setxRateLimit', description='calls per hour allowed by the user', dataType='Integer', datatypeWithEnum='Integer', dataFormat='int32', name='xRateLimit', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Rate-Limit;', baseType='Integer', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='calls per hour allowed by the user', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{ "type" : "integer", "format" : "int32" }', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=false, isNumeric=true, isInteger=true, isShort=true, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XRateLimit', nameInSnakeCase='X_RATE_LIMIT', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=int32, dependentRequired=null, contains=null}, CodegenProperty{openApiType='string', baseName='X-Expires-After', complexType='Date', getter='getxExpiresAfter', setter='setxExpiresAfter', description='date in UTC when token expires', dataType='Date', datatypeWithEnum='Date', dataFormat='date-time', name='xExpiresAfter', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Expires-After;', baseType='Date', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='date in UTC when token expires', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{ @@ -559,7 +600,9 @@ public interface PathHandlerInterface { /** *

          Logs out current logged in user session

          * - *

          Endpoint: {@link Methods#GET GET} "/v2/user/logout" (privileged: false)

          + *

          + * + *

          Endpoint: {@link Methods#GET GET} "/v2/user/logout" (privileged: true)

          * * *

          Responses:

          @@ -575,7 +618,7 @@ public interface PathHandlerInterface { * *

          This can only be done by the logged in user.

          * - *

          Endpoint: {@link Methods#PUT PUT} "/v2/user/{username}" (privileged: false)

          + *

          Endpoint: {@link Methods#PUT PUT} "/v2/user/{username}" (privileged: true)

          * *

          Request parameters:

          *
            @@ -590,6 +633,9 @@ public interface PathHandlerInterface { * *
          * + *

          Consumes: [{isJson=true, mediaType=application/json}]

          + *

          Payload: {@link User} (required: true)

          + * * *

          Responses:

          *
            diff --git a/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json b/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json index 8b12859e6477..04da14326f84 100644 --- a/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json +++ b/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json @@ -1,5 +1,5 @@ { - "openapi" : "3.0.1", + "openapi" : "3.0.0", "info" : { "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", "license" : { @@ -9,6 +9,10 @@ "title" : "OpenAPI Petstore", "version" : "1.0.0" }, + "externalDocs" : { + "description" : "Find out more about Swagger", + "url" : "http://swagger.io" + }, "servers" : [ { "url" : "http://petstore.swagger.io/v2" } ], @@ -25,26 +29,28 @@ "paths" : { "/pet" : { "post" : { + "description" : "", "operationId" : "addPet", "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" + "$ref" : "#/components/requestBodies/Pet" + }, + "responses" : { + "200" : { + "content" : { + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + }, + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } } }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } + "description" : "successful operation" }, - "description" : "Pet object that needs to be added to the store", - "required" : true - }, - "responses" : { "405" : { - "content" : { }, "description" : "Invalid input" } }, @@ -53,39 +59,42 @@ } ], "summary" : "Add a new pet to the store", "tags" : [ "pet" ], - "x-codegen-request-body-name" : "body", "x-content-type" : "application/json", "x-accepts" : "application/json" }, "put" : { + "description" : "", + "externalDocs" : { + "description" : "API documentation for the updatePet operation", + "url" : "http://petstore.swagger.io/v2/doc/updatePet" + }, "operationId" : "updatePet", "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" + "$ref" : "#/components/requestBodies/Pet" + }, + "responses" : { + "200" : { + "content" : { + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + }, + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } } }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } + "description" : "successful operation" }, - "description" : "Pet object that needs to be added to the store", - "required" : true - }, - "responses" : { "400" : { - "content" : { }, "description" : "Invalid ID supplied" }, "404" : { - "content" : { }, "description" : "Pet not found" }, "405" : { - "content" : { }, "description" : "Validation exception" } }, @@ -94,7 +103,6 @@ } ], "summary" : "Update an existing pet", "tags" : [ "pet" ], - "x-codegen-request-body-name" : "body", "x-content-type" : "application/json", "x-accepts" : "application/json" } @@ -104,6 +112,7 @@ "description" : "Multiple status values can be provided with comma separated strings", "operationId" : "findPetsByStatus", "parameters" : [ { + "deprecated" : true, "description" : "Status values that need to be considered for filter", "explode" : false, "in" : "query", @@ -142,12 +151,11 @@ "description" : "successful operation" }, "400" : { - "content" : { }, "description" : "Invalid status value" } }, "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] + "petstore_auth" : [ "read:pets" ] } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], @@ -196,12 +204,11 @@ "description" : "successful operation" }, "400" : { - "content" : { }, "description" : "Invalid tag value" } }, "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] + "petstore_auth" : [ "read:pets" ] } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], @@ -210,26 +217,31 @@ }, "/pet/{petId}" : { "delete" : { + "description" : "", "operationId" : "deletePet", "parameters" : [ { + "explode" : false, "in" : "header", "name" : "api_key", + "required" : false, "schema" : { "type" : "string" - } + }, + "style" : "simple" }, { "description" : "Pet id to delete", + "explode" : false, "in" : "path", "name" : "petId", "required" : true, "schema" : { "format" : "int64", "type" : "integer" - } + }, + "style" : "simple" } ], "responses" : { "400" : { - "content" : { }, "description" : "Invalid pet value" } }, @@ -245,13 +257,15 @@ "operationId" : "getPetById", "parameters" : [ { "description" : "ID of pet to return", + "explode" : false, "in" : "path", "name" : "petId", "required" : true, "schema" : { "format" : "int64", "type" : "integer" - } + }, + "style" : "simple" } ], "responses" : { "200" : { @@ -270,11 +284,9 @@ "description" : "successful operation" }, "400" : { - "content" : { }, "description" : "Invalid ID supplied" }, "404" : { - "content" : { }, "description" : "Pet not found" } }, @@ -286,16 +298,19 @@ "x-accepts" : "application/json" }, "post" : { + "description" : "", "operationId" : "updatePetWithForm", "parameters" : [ { "description" : "ID of pet that needs to be updated", + "explode" : false, "in" : "path", "name" : "petId", "required" : true, "schema" : { "format" : "int64", "type" : "integer" - } + }, + "style" : "simple" } ], "requestBody" : { "content" : { @@ -308,7 +323,6 @@ }, "responses" : { "405" : { - "content" : { }, "description" : "Invalid input" } }, @@ -323,16 +337,19 @@ }, "/pet/{petId}/uploadImage" : { "post" : { + "description" : "", "operationId" : "uploadFile", "parameters" : [ { "description" : "ID of pet to update", + "explode" : false, "in" : "path", "name" : "petId", "required" : true, "schema" : { "format" : "int64", "type" : "integer" - } + }, + "style" : "simple" } ], "requestBody" : { "content" : { @@ -394,10 +411,11 @@ }, "/store/order" : { "post" : { + "description" : "", "operationId" : "placeOrder", "requestBody" : { "content" : { - "*/*" : { + "application/json" : { "schema" : { "$ref" : "#/components/schemas/Order" } @@ -423,14 +441,12 @@ "description" : "successful operation" }, "400" : { - "content" : { }, "description" : "Invalid Order" } }, "summary" : "Place an order for a pet", "tags" : [ "store" ], - "x-codegen-request-body-name" : "body", - "x-content-type" : "*/*", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, @@ -440,20 +456,20 @@ "operationId" : "deleteOrder", "parameters" : [ { "description" : "ID of the order that needs to be deleted", + "explode" : false, "in" : "path", "name" : "orderId", "required" : true, "schema" : { "type" : "string" - } + }, + "style" : "simple" } ], "responses" : { "400" : { - "content" : { }, "description" : "Invalid ID supplied" }, "404" : { - "content" : { }, "description" : "Order not found" } }, @@ -466,6 +482,7 @@ "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", + "explode" : false, "in" : "path", "name" : "orderId", "required" : true, @@ -474,7 +491,8 @@ "maximum" : 5, "minimum" : 1, "type" : "integer" - } + }, + "style" : "simple" } ], "responses" : { "200" : { @@ -493,11 +511,9 @@ "description" : "successful operation" }, "400" : { - "content" : { }, "description" : "Invalid ID supplied" }, "404" : { - "content" : { }, "description" : "Order not found" } }, @@ -512,7 +528,7 @@ "operationId" : "createUser", "requestBody" : { "content" : { - "*/*" : { + "application/json" : { "schema" : { "$ref" : "#/components/schemas/User" } @@ -523,96 +539,85 @@ }, "responses" : { "default" : { - "content" : { }, "description" : "successful operation" } }, + "security" : [ { + "api_key" : [ ] + } ], "summary" : "Create user", "tags" : [ "user" ], - "x-codegen-request-body-name" : "body", - "x-content-type" : "*/*", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, "/user/createWithArray" : { "post" : { + "description" : "", "operationId" : "createUsersWithArrayInput", "requestBody" : { - "content" : { - "*/*" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/User" - }, - "type" : "array" - } - } - }, - "description" : "List of user object", - "required" : true + "$ref" : "#/components/requestBodies/UserArray" }, "responses" : { "default" : { - "content" : { }, "description" : "successful operation" } }, + "security" : [ { + "api_key" : [ ] + } ], "summary" : "Creates list of users with given input array", "tags" : [ "user" ], - "x-codegen-request-body-name" : "body", - "x-content-type" : "*/*", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, "/user/createWithList" : { "post" : { + "description" : "", "operationId" : "createUsersWithListInput", "requestBody" : { - "content" : { - "*/*" : { - "schema" : { - "items" : { - "$ref" : "#/components/schemas/User" - }, - "type" : "array" - } - } - }, - "description" : "List of user object", - "required" : true + "$ref" : "#/components/requestBodies/UserArray" }, "responses" : { "default" : { - "content" : { }, "description" : "successful operation" } }, + "security" : [ { + "api_key" : [ ] + } ], "summary" : "Creates list of users with given input array", "tags" : [ "user" ], - "x-codegen-request-body-name" : "body", - "x-content-type" : "*/*", + "x-content-type" : "application/json", "x-accepts" : "application/json" } }, "/user/login" : { "get" : { + "description" : "", "operationId" : "loginUser", "parameters" : [ { "description" : "The user name for login", + "explode" : true, "in" : "query", "name" : "username", "required" : true, "schema" : { + "pattern" : "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$", "type" : "string" - } + }, + "style" : "form" }, { "description" : "The password for login in clear text", + "explode" : true, "in" : "query", "name" : "password", "required" : true, "schema" : { "type" : "string" - } + }, + "style" : "form" } ], "responses" : { "200" : { @@ -630,24 +635,36 @@ }, "description" : "successful operation", "headers" : { + "Set-Cookie" : { + "description" : "Cookie authentication key for use with the `api_key` apiKey authentication.", + "explode" : false, + "schema" : { + "example" : "AUTH_KEY=abcde12345; Path=/; HttpOnly", + "type" : "string" + }, + "style" : "simple" + }, "X-Rate-Limit" : { "description" : "calls per hour allowed by the user", + "explode" : false, "schema" : { "format" : "int32", "type" : "integer" - } + }, + "style" : "simple" }, "X-Expires-After" : { "description" : "date in UTC when token expires", + "explode" : false, "schema" : { "format" : "date-time", "type" : "string" - } + }, + "style" : "simple" } } }, "400" : { - "content" : { }, "description" : "Invalid username/password supplied" } }, @@ -658,13 +675,16 @@ }, "/user/logout" : { "get" : { + "description" : "", "operationId" : "logoutUser", "responses" : { "default" : { - "content" : { }, "description" : "successful operation" } }, + "security" : [ { + "api_key" : [ ] + } ], "summary" : "Logs out current logged in user session", "tags" : [ "user" ], "x-accepts" : "application/json" @@ -676,37 +696,43 @@ "operationId" : "deleteUser", "parameters" : [ { "description" : "The name that needs to be deleted", + "explode" : false, "in" : "path", "name" : "username", "required" : true, "schema" : { "type" : "string" - } + }, + "style" : "simple" } ], "responses" : { "400" : { - "content" : { }, "description" : "Invalid username supplied" }, "404" : { - "content" : { }, "description" : "User not found" } }, + "security" : [ { + "api_key" : [ ] + } ], "summary" : "Delete user", "tags" : [ "user" ], "x-accepts" : "application/json" }, "get" : { + "description" : "", "operationId" : "getUserByName", "parameters" : [ { "description" : "The name that needs to be fetched. Use user1 for testing.", + "explode" : false, "in" : "path", "name" : "username", "required" : true, "schema" : { "type" : "string" - } + }, + "style" : "simple" } ], "responses" : { "200" : { @@ -725,11 +751,9 @@ "description" : "successful operation" }, "400" : { - "content" : { }, "description" : "Invalid username supplied" }, "404" : { - "content" : { }, "description" : "User not found" } }, @@ -742,16 +766,18 @@ "operationId" : "updateUser", "parameters" : [ { "description" : "name that need to be deleted", + "explode" : false, "in" : "path", "name" : "username", "required" : true, "schema" : { "type" : "string" - } + }, + "style" : "simple" } ], "requestBody" : { "content" : { - "*/*" : { + "application/json" : { "schema" : { "$ref" : "#/components/schemas/User" } @@ -762,23 +788,55 @@ }, "responses" : { "400" : { - "content" : { }, "description" : "Invalid user supplied" }, "404" : { - "content" : { }, "description" : "User not found" } }, + "security" : [ { + "api_key" : [ ] + } ], "summary" : "Updated user", "tags" : [ "user" ], - "x-codegen-request-body-name" : "body", - "x-content-type" : "*/*", + "x-content-type" : "application/json", "x-accepts" : "application/json" } } }, "components" : { + "requestBodies" : { + "UserArray" : { + "content" : { + "application/json" : { + "schema" : { + "items" : { + "$ref" : "#/components/schemas/User" + }, + "type" : "array" + } + } + }, + "description" : "List of user object", + "required" : true + }, + "Pet" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + } + }, + "description" : "Pet object that needs to be added to the store", + "required" : true + } + }, "schemas" : { "Order" : { "description" : "An order for a pets from the pet store", @@ -835,6 +893,7 @@ "type" : "integer" }, "name" : { + "pattern" : "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$", "type" : "string" } }, @@ -964,6 +1023,7 @@ } }, "status" : { + "deprecated" : true, "description" : "pet status in the store", "enum" : [ "available", "pending", "sold" ], "type" : "string" @@ -1045,6 +1105,5 @@ "type" : "apiKey" } } - }, - "x-original-swagger-version" : "2.0" + } } \ No newline at end of file From 352182a7b9cc036d0d8cbe12520ebc545ce01d5f Mon Sep 17 00:00:00 2001 From: Alex Kucksdorf Date: Mon, 18 Sep 2023 07:59:28 +0200 Subject: [PATCH 26/59] fix(go-server): Allow optional request bodies (#16579) * fix(go-server): Allow optional request bodies Closes #16578 * chore: Run scripts * chore: Remove unnecessary whitespace change * fix: Use correct error --- .../src/main/resources/go-server/controller-api.mustache | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache b/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache index 5a26f587d662..00fec257d6e8 100644 --- a/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/controller-api.mustache @@ -3,6 +3,12 @@ package {{packageName}} import ( "encoding/json" + {{#isBodyParam}} + {{^required}} + "errors" + "io" + {{/required}} + {{/isBodyParam}} "net/http" "strings" @@ -403,7 +409,7 @@ func (c *{{classname}}Controller) {{nickname}}(w http.ResponseWriter, r *http.Re {{^isAdditionalPropertiesTrue}} d.DisallowUnknownFields() {{/isAdditionalPropertiesTrue}} - if err := d.Decode(&{{paramName}}Param); err != nil { + if err := d.Decode(&{{paramName}}Param); err != nil {{^required}}&& !errors.Is(err, io.EOF) {{/required}}{ c.errorHandler(w, r, &ParsingError{Err: err}, nil) return } From 875c3ecd3ccf980723fe3a79a89977bf8c244962 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 18 Sep 2023 14:57:09 +0800 Subject: [PATCH 27/59] 7.0.1 release (#16607) * v7.0.1 release * update readme * update template * update readme --- .github/PULL_REQUEST_TEMPLATE.md | 9 ++------ README.md | 22 +++++++++---------- modules/openapi-generator-cli/pom.xml | 2 +- modules/openapi-generator-core/pom.xml | 2 +- .../gradle.properties | 2 +- .../openapi-generator-gradle-plugin/pom.xml | 2 +- .../samples/local-spec/gradle.properties | 2 +- .../examples/java-client.xml | 2 +- .../examples/kotlin.xml | 2 +- .../examples/multi-module/java-client/pom.xml | 2 +- .../examples/non-java-invalid-spec.xml | 2 +- .../examples/non-java.xml | 2 +- .../examples/spring.xml | 2 +- .../openapi-generator-maven-plugin/pom.xml | 2 +- modules/openapi-generator-online/pom.xml | 2 +- modules/openapi-generator/pom.xml | 2 +- pom.xml | 2 +- 17 files changed, 27 insertions(+), 34 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 852af4f85a12..e88ba6dda640 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,7 +8,7 @@ - [ ] Run the following to [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) and update samples: ``` ./mvnw clean package - ./bin/generate-samples.sh + ./bin/generate-samples.sh ./bin/configs/*.yaml ./bin/utils/export_docs_generators.sh ``` Commit all changed files. @@ -16,10 +16,5 @@ These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`. For Windows users, please run the script in [Git BASH](https://gitforwindows.org/). -- [ ] In case you are adding a new generator, run the following additional script : - ``` - ./bin/utils/ensure-up-to-date - ``` - Commit all changed files. -- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (7.0.1 - patch release), `7.1.x` (minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks) +- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (upcoming 7.1.0 minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks) - [ ] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request. diff --git a/README.md b/README.md index b702f0188a29..690162f479af 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@
            -[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.0.1`): +[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.1.0`): [![Build Status](https://api.travis-ci.com/OpenAPITools/openapi-generator.svg?branch=master&status=passed)](https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds) [![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator) [![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator) @@ -115,13 +115,13 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20 | OpenAPI Generator Version | Release Date | Notes | | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- | -| 7.0.1 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.0.1-SNAPSHOT/) | 08.09.2023 | Patch release (enhancements, bug fixes, etc) | -| [7.0.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.0.0) (latest stable release) | 25.08.2023 | Major release with breaking changes (no fallback) | +| 7.1.0 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.1.0-SNAPSHOT/) | 18.10.2023 | Minor release with breaking changes (with fallback) | +| [7.0.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.0.1) (latest stable release) | 18.09.2023 | Patch release (enhancements, bug fixes, etc) | | [6.6.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.6.0) | 11.05.2023 | Minor release with breaking changes (with fallback) | | [5.4.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.4.0) | 31.01.2022 | Minor release with breaking changes (with fallback) | | [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) | -OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0 +OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0, 3.1 (beta support) (We do not publish daily/nightly build. Please use SNAPSHOT instead) @@ -179,16 +179,16 @@ See the different versions of the [openapi-generator-cli](https://search.maven.o If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 11 runtime at a minimum): -JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.0/openapi-generator-cli-7.0.0.jar` +JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.1/openapi-generator-cli-7.0.1.jar` For **Mac/Linux** users: ```sh -wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.0/openapi-generator-cli-7.0.0.jar -O openapi-generator-cli.jar +wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.1/openapi-generator-cli-7.0.1.jar -O openapi-generator-cli.jar ``` For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g. ``` -Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.0/openapi-generator-cli-7.0.0.jar +Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.1/openapi-generator-cli-7.0.1.jar ``` After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage. @@ -423,7 +423,7 @@ openapi-generator-cli version To use a specific version of "openapi-generator-cli" ```sh -openapi-generator-cli version-manager set 7.0.0 +openapi-generator-cli version-manager set 7.0.1 ``` Or install it as dev-dependency: @@ -447,7 +447,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat (if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php -o c:\temp\php_api_client`) -You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.0/openapi-generator-cli-7.0.0.jar) +You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.1/openapi-generator-cli-7.0.1.jar) To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate` @@ -928,12 +928,9 @@ OpenAPI Generator core team members are contributors who have been making signif * [@cbornet](https://github.com/cbornet) (2016/05) * [@jmini](https://github.com/jmini) (2018/04) [:heart:](https://www.patreon.com/jmini) * [@etherealjoy](https://github.com/etherealjoy) (2019/06) -* [@spacether](https://github.com/spacether) (2020/05) [:heart:][spacether sponsorship] :heart: = Link to support the contributor directly -[spacether sponsorship]: https://github.com/sponsors/spacether/ - #### Template Creator **NOTE**: Embedded templates are only supported in _Mustache_ format. Support for all other formats is experimental and subject to change at any time. @@ -1004,6 +1001,7 @@ Here is a list of template creators: * PowerShell (refactored in 5.0.0): @wing328 * Python: @spacether [:heart:][spacether sponsorship] * Python-Experimental: @spacether [:heart:][spacether sponsorship] + * Python (refactored in 7.0.0): @wing328 * R: @ramnov * Ruby (Faraday): @meganemura @dkliban * Rust: @farcaller diff --git a/modules/openapi-generator-cli/pom.xml b/modules/openapi-generator-cli/pom.xml index f179a970f1b3..c264adf32ee5 100644 --- a/modules/openapi-generator-cli/pom.xml +++ b/modules/openapi-generator-cli/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 7.0.1-SNAPSHOT + 7.0.1 ../.. diff --git a/modules/openapi-generator-core/pom.xml b/modules/openapi-generator-core/pom.xml index f6676d9dbfe3..13f8a0db08dc 100644 --- a/modules/openapi-generator-core/pom.xml +++ b/modules/openapi-generator-core/pom.xml @@ -6,7 +6,7 @@ openapi-generator-project org.openapitools - 7.0.1-SNAPSHOT + 7.0.1 ../.. diff --git a/modules/openapi-generator-gradle-plugin/gradle.properties b/modules/openapi-generator-gradle-plugin/gradle.properties index 0d986727f196..7edb04f216ee 100644 --- a/modules/openapi-generator-gradle-plugin/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/gradle.properties @@ -1,5 +1,5 @@ # RELEASE_VERSION -openApiGeneratorVersion=7.0.1-SNAPSHOT +openApiGeneratorVersion=7.0.1 # /RELEASE_VERSION # BEGIN placeholders diff --git a/modules/openapi-generator-gradle-plugin/pom.xml b/modules/openapi-generator-gradle-plugin/pom.xml index 9c6b1b66a5b4..ee40e297a222 100644 --- a/modules/openapi-generator-gradle-plugin/pom.xml +++ b/modules/openapi-generator-gradle-plugin/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 7.0.1-SNAPSHOT + 7.0.1 ../.. diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties index 8a909e1256b8..258c95b06485 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties @@ -1,3 +1,3 @@ # RELEASE_VERSION -openApiGeneratorVersion=7.0.1-SNAPSHOT +openApiGeneratorVersion=7.0.1 # /RELEASE_VERSION diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml index 0f89e35fe52b..d3f80ab2b314 100644 --- a/modules/openapi-generator-maven-plugin/examples/java-client.xml +++ b/modules/openapi-generator-maven-plugin/examples/java-client.xml @@ -13,7 +13,7 @@ org.openapitools openapi-generator-maven-plugin - 7.0.1-SNAPSHOT + 7.0.1 diff --git a/modules/openapi-generator-maven-plugin/examples/kotlin.xml b/modules/openapi-generator-maven-plugin/examples/kotlin.xml index db860e1b5584..e070be9c487a 100644 --- a/modules/openapi-generator-maven-plugin/examples/kotlin.xml +++ b/modules/openapi-generator-maven-plugin/examples/kotlin.xml @@ -15,7 +15,7 @@ org.openapitools openapi-generator-maven-plugin - 7.0.1-SNAPSHOT + 7.0.1 diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml index e05b09c61f3c..8eb87caab71d 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml @@ -19,7 +19,7 @@ org.openapitools openapi-generator-maven-plugin - 7.0.1-SNAPSHOT + 7.0.1 diff --git a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml index 0149d34293ee..ff73ee764770 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml @@ -13,7 +13,7 @@ org.openapitools openapi-generator-maven-plugin - 7.0.1-SNAPSHOT + 7.0.1 diff --git a/modules/openapi-generator-maven-plugin/examples/non-java.xml b/modules/openapi-generator-maven-plugin/examples/non-java.xml index 1472f5f28443..e9931563b517 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java.xml @@ -13,7 +13,7 @@ org.openapitools openapi-generator-maven-plugin - 7.0.1-SNAPSHOT + 7.0.1 diff --git a/modules/openapi-generator-maven-plugin/examples/spring.xml b/modules/openapi-generator-maven-plugin/examples/spring.xml index b11bfa500d68..028841521b48 100644 --- a/modules/openapi-generator-maven-plugin/examples/spring.xml +++ b/modules/openapi-generator-maven-plugin/examples/spring.xml @@ -20,7 +20,7 @@ org.openapitools openapi-generator-maven-plugin - 7.0.1-SNAPSHOT + 7.0.1 diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml index 6abc9e0689d6..625b40a163d6 100644 --- a/modules/openapi-generator-maven-plugin/pom.xml +++ b/modules/openapi-generator-maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.openapitools openapi-generator-project - 7.0.1-SNAPSHOT + 7.0.1 ../.. diff --git a/modules/openapi-generator-online/pom.xml b/modules/openapi-generator-online/pom.xml index 15a967b927ad..23aab3644b65 100644 --- a/modules/openapi-generator-online/pom.xml +++ b/modules/openapi-generator-online/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 7.0.1-SNAPSHOT + 7.0.1 ../.. diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index 1ae15739d0d7..c284e40ee2d2 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 7.0.1-SNAPSHOT + 7.0.1 ../.. diff --git a/pom.xml b/pom.xml index d69e6af2c801..70ed4f42e26b 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ pom openapi-generator-project - 7.0.1-SNAPSHOT + 7.0.1 https://github.com/openapitools/openapi-generator From 5b720ded0c96a34113b662af35134d2d9613bbaa Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 18 Sep 2023 16:51:54 +0800 Subject: [PATCH 28/59] trigger build --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 690162f479af..485c20162f05 100644 --- a/README.md +++ b/README.md @@ -1260,3 +1260,4 @@ limitations under the License. --- + From 5e8e2d7f6d3168c2d14e6f5870e090a7acd2136f Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 18 Sep 2023 17:37:36 +0800 Subject: [PATCH 29/59] Prepare v7.1.0 in master (#16608) * prepare v7.1.0 in master * update --- modules/openapi-generator-cli/pom.xml | 2 +- modules/openapi-generator-core/pom.xml | 2 +- modules/openapi-generator-gradle-plugin/gradle.properties | 2 +- modules/openapi-generator-gradle-plugin/pom.xml | 2 +- .../samples/local-spec/gradle.properties | 2 +- modules/openapi-generator-maven-plugin/examples/java-client.xml | 2 +- modules/openapi-generator-maven-plugin/examples/kotlin.xml | 2 +- .../examples/multi-module/java-client/pom.xml | 2 +- .../examples/non-java-invalid-spec.xml | 2 +- modules/openapi-generator-maven-plugin/examples/non-java.xml | 2 +- modules/openapi-generator-maven-plugin/examples/spring.xml | 2 +- modules/openapi-generator-maven-plugin/pom.xml | 2 +- modules/openapi-generator-online/pom.xml | 2 +- modules/openapi-generator/pom.xml | 2 +- pom.xml | 2 +- .../client/echo_api/csharp-restsharp/.openapi-generator/VERSION | 2 +- samples/client/echo_api/go/.openapi-generator/VERSION | 2 +- .../echo_api/java/apache-httpclient/.openapi-generator/VERSION | 2 +- .../client/echo_api/java/feign-gson/.openapi-generator/VERSION | 2 +- samples/client/echo_api/java/native/.openapi-generator/VERSION | 2 +- .../client/echo_api/java/okhttp-gson/.openapi-generator/VERSION | 2 +- samples/client/echo_api/php-nextgen/.openapi-generator/VERSION | 2 +- samples/client/echo_api/php-nextgen/src/Api/AuthApi.php | 2 +- samples/client/echo_api/php-nextgen/src/Api/BodyApi.php | 2 +- samples/client/echo_api/php-nextgen/src/Api/FormApi.php | 2 +- samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php | 2 +- samples/client/echo_api/php-nextgen/src/Api/PathApi.php | 2 +- samples/client/echo_api/php-nextgen/src/Api/QueryApi.php | 2 +- samples/client/echo_api/php-nextgen/src/ApiException.php | 2 +- samples/client/echo_api/php-nextgen/src/Configuration.php | 2 +- samples/client/echo_api/php-nextgen/src/HeaderSelector.php | 2 +- samples/client/echo_api/php-nextgen/src/Model/Bird.php | 2 +- samples/client/echo_api/php-nextgen/src/Model/Category.php | 2 +- samples/client/echo_api/php-nextgen/src/Model/DataQuery.php | 2 +- samples/client/echo_api/php-nextgen/src/Model/DefaultValue.php | 2 +- .../client/echo_api/php-nextgen/src/Model/ModelInterface.php | 2 +- .../echo_api/php-nextgen/src/Model/NumberPropertiesOnly.php | 2 +- samples/client/echo_api/php-nextgen/src/Model/Pet.php | 2 +- samples/client/echo_api/php-nextgen/src/Model/Query.php | 2 +- samples/client/echo_api/php-nextgen/src/Model/StringEnumRef.php | 2 +- samples/client/echo_api/php-nextgen/src/Model/Tag.php | 2 +- ...tyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php | 2 +- ...QueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php | 2 +- samples/client/echo_api/php-nextgen/src/ObjectSerializer.php | 2 +- samples/client/echo_api/python/.openapi-generator/VERSION | 2 +- .../others/csharp-complex-files/.openapi-generator/VERSION | 2 +- .../java/okhttp-gson-streaming/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../rust/reqwest-regression-16119/.openapi-generator/VERSION | 2 +- .../composed-schemas-tagged-unions/.openapi-generator/VERSION | 2 +- .../builds/composed-schemas/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../allOf-composition/.openapi-generator/VERSION | 2 +- .../builds/with-unique-items/.openapi-generator/VERSION | 2 +- .../client/petstore/R-httr2-wrapper/.openapi-generator/VERSION | 2 +- samples/client/petstore/R-httr2/.openapi-generator/VERSION | 2 +- samples/client/petstore/R/.openapi-generator/VERSION | 2 +- samples/client/petstore/ada/.openapi-generator/VERSION | 2 +- .../client/petstore/ada/src/client/samples-petstore-clients.adb | 2 +- .../client/petstore/ada/src/client/samples-petstore-clients.ads | 2 +- .../client/petstore/ada/src/model/samples-petstore-models.adb | 2 +- .../client/petstore/ada/src/model/samples-petstore-models.ads | 2 +- samples/client/petstore/apex/.openapi-generator/VERSION | 2 +- samples/client/petstore/bash/.openapi-generator/VERSION | 2 +- samples/client/petstore/c/.openapi-generator/VERSION | 2 +- samples/client/petstore/cpp-qt/.openapi-generator/VERSION | 2 +- .../petstore/cpp-restsdk/client/.openapi-generator/VERSION | 2 +- .../client/include/CppRestPetstoreClient/ApiClient.h | 2 +- .../client/include/CppRestPetstoreClient/ApiConfiguration.h | 2 +- .../client/include/CppRestPetstoreClient/ApiException.h | 2 +- .../client/include/CppRestPetstoreClient/HttpContent.h | 2 +- .../client/include/CppRestPetstoreClient/IHttpBody.h | 2 +- .../cpp-restsdk/client/include/CppRestPetstoreClient/JsonBody.h | 2 +- .../client/include/CppRestPetstoreClient/ModelBase.h | 2 +- .../client/include/CppRestPetstoreClient/MultipartFormData.h | 2 +- .../cpp-restsdk/client/include/CppRestPetstoreClient/Object.h | 2 +- .../client/include/CppRestPetstoreClient/api/PetApi.h | 2 +- .../client/include/CppRestPetstoreClient/api/StoreApi.h | 2 +- .../client/include/CppRestPetstoreClient/api/UserApi.h | 2 +- .../client/include/CppRestPetstoreClient/model/ApiResponse.h | 2 +- .../client/include/CppRestPetstoreClient/model/Category.h | 2 +- .../client/include/CppRestPetstoreClient/model/Order.h | 2 +- .../client/include/CppRestPetstoreClient/model/Pet.h | 2 +- .../client/include/CppRestPetstoreClient/model/Tag.h | 2 +- .../client/include/CppRestPetstoreClient/model/User.h | 2 +- samples/client/petstore/cpp-restsdk/client/src/ApiClient.cpp | 2 +- .../client/petstore/cpp-restsdk/client/src/ApiConfiguration.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/src/ApiException.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/src/HttpContent.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/src/JsonBody.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/src/ModelBase.cpp | 2 +- .../petstore/cpp-restsdk/client/src/MultipartFormData.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/src/Object.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/src/api/PetApi.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/src/api/StoreApi.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/src/api/UserApi.cpp | 2 +- .../petstore/cpp-restsdk/client/src/model/ApiResponse.cpp | 2 +- .../client/petstore/cpp-restsdk/client/src/model/Category.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/src/model/Order.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/src/model/Pet.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/src/model/Tag.cpp | 2 +- samples/client/petstore/cpp-restsdk/client/src/model/User.cpp | 2 +- samples/client/petstore/cpp-tiny/.openapi-generator/VERSION | 2 +- samples/client/petstore/cpp-ue4/.openapi-generator/VERSION | 2 +- samples/client/petstore/crystal/.openapi-generator/VERSION | 2 +- samples/client/petstore/crystal/.travis.yml | 2 +- samples/client/petstore/crystal/spec/spec_helper.cr | 2 +- samples/client/petstore/crystal/src/petstore.cr | 2 +- samples/client/petstore/crystal/src/petstore/api/fake_api.cr | 2 +- samples/client/petstore/crystal/src/petstore/api/pet_api.cr | 2 +- samples/client/petstore/crystal/src/petstore/api/store_api.cr | 2 +- samples/client/petstore/crystal/src/petstore/api/user_api.cr | 2 +- samples/client/petstore/crystal/src/petstore/api_client.cr | 2 +- samples/client/petstore/crystal/src/petstore/api_error.cr | 2 +- samples/client/petstore/crystal/src/petstore/configuration.cr | 2 +- .../src/petstore/models/another_property_name_mapping.cr | 2 +- .../client/petstore/crystal/src/petstore/models/api_response.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/category.cr | 2 +- .../client/petstore/crystal/src/petstore/models/format_test.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/order.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/pet.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/tag.cr | 2 +- samples/client/petstore/crystal/src/petstore/models/user.cr | 2 +- .../client/petstore/csharp-functions/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../OpenAPIClient-generichost-net6.0/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClient-httpclient/.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClient-net47/.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClient-net48/.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClient-net5.0/.openapi-generator/VERSION | 2 +- .../OpenAPIClient-unityWebRequest/.openapi-generator/VERSION | 2 +- .../petstore/csharp/OpenAPIClient/.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClientCore/.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION | 2 +- samples/client/petstore/elixir/.openapi-generator/VERSION | 2 +- .../petstore/elixir/lib/openapi_petstore/api/another_fake.ex | 2 +- .../client/petstore/elixir/lib/openapi_petstore/api/default.ex | 2 +- samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex | 2 +- .../elixir/lib/openapi_petstore/api/fake_classname_tags123.ex | 2 +- samples/client/petstore/elixir/lib/openapi_petstore/api/pet.ex | 2 +- .../client/petstore/elixir/lib/openapi_petstore/api/store.ex | 2 +- samples/client/petstore/elixir/lib/openapi_petstore/api/user.ex | 2 +- .../client/petstore/elixir/lib/openapi_petstore/connection.ex | 2 +- .../client/petstore/elixir/lib/openapi_petstore/deserializer.ex | 2 +- .../lib/openapi_petstore/model/_foo_get_default_response.ex | 2 +- .../elixir/lib/openapi_petstore/model/_special_model_name_.ex | 2 +- .../lib/openapi_petstore/model/additional_properties_class.ex | 2 +- .../elixir/lib/openapi_petstore/model/all_of_with_single_ref.ex | 2 +- .../client/petstore/elixir/lib/openapi_petstore/model/animal.ex | 2 +- .../petstore/elixir/lib/openapi_petstore/model/api_response.ex | 2 +- .../lib/openapi_petstore/model/array_of_array_of_number_only.ex | 2 +- .../elixir/lib/openapi_petstore/model/array_of_number_only.ex | 2 +- .../petstore/elixir/lib/openapi_petstore/model/array_test.ex | 2 +- .../elixir/lib/openapi_petstore/model/capitalization.ex | 2 +- .../client/petstore/elixir/lib/openapi_petstore/model/cat.ex | 2 +- .../petstore/elixir/lib/openapi_petstore/model/category.ex | 2 +- .../elixir/lib/openapi_petstore/model/child_with_nullable.ex | 2 +- .../petstore/elixir/lib/openapi_petstore/model/class_model.ex | 2 +- .../client/petstore/elixir/lib/openapi_petstore/model/client.ex | 2 +- .../elixir/lib/openapi_petstore/model/deprecated_model.ex | 2 +- .../client/petstore/elixir/lib/openapi_petstore/model/dog.ex | 2 +- .../petstore/elixir/lib/openapi_petstore/model/enum_arrays.ex | 2 +- .../petstore/elixir/lib/openapi_petstore/model/enum_class.ex | 2 +- .../petstore/elixir/lib/openapi_petstore/model/enum_test.ex | 2 +- .../openapi_petstore/model/fake_big_decimal_map_200_response.ex | 2 +- .../client/petstore/elixir/lib/openapi_petstore/model/file.ex | 2 +- .../elixir/lib/openapi_petstore/model/file_schema_test_class.ex | 2 +- .../client/petstore/elixir/lib/openapi_petstore/model/foo.ex | 2 +- .../petstore/elixir/lib/openapi_petstore/model/format_test.ex | 2 +- .../elixir/lib/openapi_petstore/model/has_only_read_only.ex | 2 +- .../elixir/lib/openapi_petstore/model/health_check_result.ex | 2 +- .../client/petstore/elixir/lib/openapi_petstore/model/list.ex | 2 +- .../petstore/elixir/lib/openapi_petstore/model/map_test.ex | 2 +- .../model/mixed_properties_and_additional_properties_class.ex | 2 +- .../elixir/lib/openapi_petstore/model/model_200_response.ex | 2 +- .../client/petstore/elixir/lib/openapi_petstore/model/name.ex | 2 +- .../elixir/lib/openapi_petstore/model/nullable_class.ex | 2 +- .../petstore/elixir/lib/openapi_petstore/model/number_only.ex | 2 +- .../lib/openapi_petstore/model/object_with_deprecated_fields.ex | 2 +- .../client/petstore/elixir/lib/openapi_petstore/model/order.ex | 2 +- .../elixir/lib/openapi_petstore/model/outer_composite.ex | 2 +- .../petstore/elixir/lib/openapi_petstore/model/outer_enum.ex | 2 +- .../lib/openapi_petstore/model/outer_enum_default_value.ex | 2 +- .../elixir/lib/openapi_petstore/model/outer_enum_integer.ex | 2 +- .../openapi_petstore/model/outer_enum_integer_default_value.ex | 2 +- .../openapi_petstore/model/outer_object_with_enum_property.ex | 2 +- .../elixir/lib/openapi_petstore/model/parent_with_nullable.ex | 2 +- .../client/petstore/elixir/lib/openapi_petstore/model/pet.ex | 2 +- .../elixir/lib/openapi_petstore/model/read_only_first.ex | 2 +- .../client/petstore/elixir/lib/openapi_petstore/model/return.ex | 2 +- .../elixir/lib/openapi_petstore/model/single_ref_type.ex | 2 +- .../client/petstore/elixir/lib/openapi_petstore/model/tag.ex | 2 +- .../client/petstore/elixir/lib/openapi_petstore/model/user.ex | 2 +- .../petstore/elixir/lib/openapi_petstore/request_builder.ex | 2 +- samples/client/petstore/elm/.openapi-generator/VERSION | 2 +- .../client/petstore/erlang-client/.openapi-generator/VERSION | 2 +- .../client/petstore/erlang-proper/.openapi-generator/VERSION | 2 +- .../client/petstore/go/go-petstore/.openapi-generator/VERSION | 2 +- samples/client/petstore/groovy/.openapi-generator/VERSION | 2 +- .../petstore/haskell-http-client/.openapi-generator/VERSION | 2 +- .../petstore/java-helidon-client/mp/.openapi-generator/VERSION | 2 +- .../petstore/java-helidon-client/se/.openapi-generator/VERSION | 2 +- .../petstore/java-micronaut-client/.openapi-generator/VERSION | 2 +- .../petstore/java/apache-httpclient/.openapi-generator/VERSION | 2 +- .../petstore/java/feign-no-nullable/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/feign/.openapi-generator/VERSION | 2 +- .../petstore/java/google-api-client/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/jersey1/.openapi-generator/VERSION | 2 +- .../java/jersey2-java8-localdatetime/.openapi-generator/VERSION | 2 +- .../petstore/java/jersey2-java8/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/jersey3/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../microprofile-rest-client-3.0/.openapi-generator/VERSION | 2 +- .../java/microprofile-rest-client/.openapi-generator/VERSION | 2 +- .../petstore/java/native-async/.openapi-generator/VERSION | 2 +- .../petstore/java/native-jakarta/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/native/.openapi-generator/VERSION | 2 +- .../petstore/java/okhttp-gson-3.1/.openapi-generator/VERSION | 2 +- .../java/okhttp-gson-awsv4signature/.openapi-generator/VERSION | 2 +- .../okhttp-gson-dynamicOperations/.openapi-generator/VERSION | 2 +- .../java/okhttp-gson-group-parameter/.openapi-generator/VERSION | 2 +- .../okhttp-gson-nullable-required/.openapi-generator/VERSION | 2 +- .../java/okhttp-gson-parcelableModel/.openapi-generator/VERSION | 2 +- .../java/okhttp-gson-swagger1/.openapi-generator/VERSION | 2 +- .../java/okhttp-gson-swagger2/.openapi-generator/VERSION | 2 +- .../client/petstore/java/okhttp-gson/.openapi-generator/VERSION | 2 +- .../java/rest-assured-jackson/.openapi-generator/VERSION | 2 +- .../petstore/java/rest-assured/.openapi-generator/VERSION | 2 +- .../client/petstore/java/resteasy/.openapi-generator/VERSION | 2 +- .../java/resttemplate-jakarta/.openapi-generator/VERSION | 2 +- .../java/resttemplate-swagger1/.openapi-generator/VERSION | 2 +- .../java/resttemplate-swagger2/.openapi-generator/VERSION | 2 +- .../java/resttemplate-withXml/.openapi-generator/VERSION | 2 +- .../petstore/java/resttemplate/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2-play26/.openapi-generator/VERSION | 2 +- .../client/petstore/java/retrofit2/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2rx2/.openapi-generator/VERSION | 2 +- .../petstore/java/retrofit2rx3/.openapi-generator/VERSION | 2 +- .../petstore/java/vertx-no-nullable/.openapi-generator/VERSION | 2 +- samples/client/petstore/java/vertx/.openapi-generator/VERSION | 2 +- .../petstore/java/webclient-jakarta/.openapi-generator/VERSION | 2 +- .../java/webclient-nullable-arrays/.openapi-generator/VERSION | 2 +- .../petstore/java/webclient-swagger2/.openapi-generator/VERSION | 2 +- .../client/petstore/java/webclient/.openapi-generator/VERSION | 2 +- .../petstore/javascript-apollo/.openapi-generator/VERSION | 2 +- .../client/petstore/javascript-es6/.openapi-generator/VERSION | 2 +- .../petstore/javascript-promise-es6/.openapi-generator/VERSION | 2 +- .../petstore/jetbrains/http/client/.openapi-generator/VERSION | 2 +- samples/client/petstore/julia/.openapi-generator/VERSION | 2 +- samples/client/petstore/k6/.openapi-generator/VERSION | 2 +- samples/client/petstore/k6/script.js | 2 +- .../kotlin-allOff-discriminator/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin-default-values-jvm-volley/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin-enum-default-value/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin-gson/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-jackson/.openapi-generator/VERSION | 2 +- .../kotlin-json-request-string/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-jvm-jackson/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-jvm-ktor-gson/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-jvm-ktor-jackson/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION | 2 +- .../kotlin-jvm-spring-2-webclient/.openapi-generator/VERSION | 2 +- .../kotlin-jvm-spring-3-webclient/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-jvm-vertx-gson/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin-jvm-vertx-jackson/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-jvm-vertx-moshi/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-jvm-volley/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-modelMutable/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-moshi-codegen/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-multiplatform/.openapi-generator/VERSION | 2 +- .../kotlin-name-parameter-mappings/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-nonpublic/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-nullable/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-okhttp3/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION | 2 +- .../client/petstore/kotlin-retrofit2/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-spring-cloud/.openapi-generator/VERSION | 2 +- .../src/main/kotlin/org/openapitools/api/PetApi.kt | 2 +- .../src/main/kotlin/org/openapitools/api/StoreApi.kt | 2 +- .../src/main/kotlin/org/openapitools/api/UserApi.kt | 2 +- .../client/petstore/kotlin-string/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-threetenbp/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-uppercase-enum/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin/.openapi-generator/VERSION | 2 +- samples/client/petstore/lua/.openapi-generator/VERSION | 2 +- samples/client/petstore/n4js/.openapi-generator/VERSION | 2 +- samples/client/petstore/nim/.openapi-generator/VERSION | 2 +- .../client/petstore/objc/core-data/.openapi-generator/VERSION | 2 +- samples/client/petstore/objc/default/.openapi-generator/VERSION | 2 +- samples/client/petstore/perl/.openapi-generator/VERSION | 2 +- .../client/petstore/php-dt-modern/.openapi-generator/VERSION | 2 +- samples/client/petstore/php-dt/.openapi-generator/VERSION | 2 +- .../php-nextgen/OpenAPIClient-php/.openapi-generator/VERSION | 2 +- .../php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php | 2 +- .../OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/ApiException.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Configuration.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/HeaderSelector.php | 2 +- .../OpenAPIClient-php/src/Model/AdditionalPropertiesClass.php | 2 +- .../OpenAPIClient-php/src/Model/AllOfWithSingleRef.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Model/Animal.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/ApiResponse.php | 2 +- .../OpenAPIClient-php/src/Model/ArrayOfArrayOfNumberOnly.php | 2 +- .../OpenAPIClient-php/src/Model/ArrayOfNumberOnly.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/ArrayTest.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/Capitalization.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Model/Cat.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/Category.php | 2 +- .../OpenAPIClient-php/src/Model/ChildWithNullable.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/ClassModel.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Model/Client.php | 2 +- .../OpenAPIClient-php/src/Model/DeprecatedObject.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Model/Dog.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/EnumArrays.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/EnumClass.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/EnumTest.php | 2 +- .../src/Model/FakeBigDecimalMap200Response.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Model/File.php | 2 +- .../OpenAPIClient-php/src/Model/FileSchemaTestClass.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Model/Foo.php | 2 +- .../OpenAPIClient-php/src/Model/FooGetDefaultResponse.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/FormatTest.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/HasOnlyReadOnly.php | 2 +- .../OpenAPIClient-php/src/Model/HealthCheckResult.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/MapTest.php | 2 +- .../src/Model/MixedPropertiesAndAdditionalPropertiesClass.php | 2 +- .../OpenAPIClient-php/src/Model/Model200Response.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/ModelInterface.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/ModelList.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/ModelReturn.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Model/Name.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/NullableClass.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/NumberOnly.php | 2 +- .../OpenAPIClient-php/src/Model/ObjectWithDeprecatedFields.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Model/Order.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/OuterComposite.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/OuterEnum.php | 2 +- .../OpenAPIClient-php/src/Model/OuterEnumDefaultValue.php | 2 +- .../OpenAPIClient-php/src/Model/OuterEnumInteger.php | 2 +- .../src/Model/OuterEnumIntegerDefaultValue.php | 2 +- .../OpenAPIClient-php/src/Model/OuterObjectWithEnumProperty.php | 2 +- .../OpenAPIClient-php/src/Model/ParentWithNullable.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Model/Pet.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/ReadOnlyFirst.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Model/SingleRefType.php | 2 +- .../OpenAPIClient-php/src/Model/SpecialModelName.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Model/Tag.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Model/User.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php | 2 +- .../petstore/php/OpenAPIClient-php/.openapi-generator/VERSION | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php | 2 +- .../php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/ApiException.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Configuration.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/HeaderSelector.php | 2 +- .../OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php | 2 +- .../php/OpenAPIClient-php/lib/Model/AllOfWithSingleRef.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php | 2 +- .../OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/Category.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Client.php | 2 +- .../php/OpenAPIClient-php/lib/Model/DeprecatedObject.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php | 2 +- .../lib/Model/FakeBigDecimalMap200Response.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/File.php | 2 +- .../php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php | 2 +- .../php/OpenAPIClient-php/lib/Model/FooGetDefaultResponse.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php | 2 +- .../php/OpenAPIClient-php/lib/Model/HealthCheckResult.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php | 2 +- .../lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php | 2 +- .../php/OpenAPIClient-php/lib/Model/Model200Response.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ModelList.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Name.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php | 2 +- .../OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/Order.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php | 2 +- .../php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php | 2 +- .../lib/Model/OuterEnumIntegerDefaultValue.php | 2 +- .../OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php | 2 +- .../php/OpenAPIClient-php/lib/Model/PropertyNameMapping.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/Model/SingleRefType.php | 2 +- .../php/OpenAPIClient-php/lib/Model/SpecialModelName.php | 2 +- samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Model/User.php | 2 +- .../petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php | 2 +- samples/client/petstore/php/psr-18/.openapi-generator/VERSION | 2 +- samples/client/petstore/php/psr-18/lib/Api/AnotherFakeApi.php | 2 +- samples/client/petstore/php/psr-18/lib/Api/DefaultApi.php | 2 +- samples/client/petstore/php/psr-18/lib/Api/FakeApi.php | 2 +- .../petstore/php/psr-18/lib/Api/FakeClassnameTags123Api.php | 2 +- samples/client/petstore/php/psr-18/lib/Api/PetApi.php | 2 +- samples/client/petstore/php/psr-18/lib/Api/StoreApi.php | 2 +- samples/client/petstore/php/psr-18/lib/Api/UserApi.php | 2 +- samples/client/petstore/php/psr-18/lib/ApiException.php | 2 +- samples/client/petstore/php/psr-18/lib/Configuration.php | 2 +- samples/client/petstore/php/psr-18/lib/DebugPlugin.php | 2 +- samples/client/petstore/php/psr-18/lib/HeaderSelector.php | 2 +- .../petstore/php/psr-18/lib/Model/AdditionalPropertiesClass.php | 2 +- .../client/petstore/php/psr-18/lib/Model/AllOfWithSingleRef.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Animal.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/ApiResponse.php | 2 +- .../petstore/php/psr-18/lib/Model/ArrayOfArrayOfNumberOnly.php | 2 +- .../client/petstore/php/psr-18/lib/Model/ArrayOfNumberOnly.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/ArrayTest.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Capitalization.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Cat.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Category.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/ClassModel.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Client.php | 2 +- .../client/petstore/php/psr-18/lib/Model/DeprecatedObject.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Dog.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/EnumArrays.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/EnumClass.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/EnumTest.php | 2 +- .../php/psr-18/lib/Model/FakeBigDecimalMap200Response.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/File.php | 2 +- .../petstore/php/psr-18/lib/Model/FileSchemaTestClass.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Foo.php | 2 +- .../petstore/php/psr-18/lib/Model/FooGetDefaultResponse.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/FormatTest.php | 2 +- .../client/petstore/php/psr-18/lib/Model/HasOnlyReadOnly.php | 2 +- .../client/petstore/php/psr-18/lib/Model/HealthCheckResult.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/MapTest.php | 2 +- .../lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php | 2 +- .../client/petstore/php/psr-18/lib/Model/Model200Response.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/ModelInterface.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/ModelList.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/ModelReturn.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Name.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/NullableClass.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/NumberOnly.php | 2 +- .../php/psr-18/lib/Model/ObjectWithDeprecatedFields.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Order.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/OuterComposite.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/OuterEnum.php | 2 +- .../petstore/php/psr-18/lib/Model/OuterEnumDefaultValue.php | 2 +- .../client/petstore/php/psr-18/lib/Model/OuterEnumInteger.php | 2 +- .../php/psr-18/lib/Model/OuterEnumIntegerDefaultValue.php | 2 +- .../php/psr-18/lib/Model/OuterObjectWithEnumProperty.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Pet.php | 2 +- .../petstore/php/psr-18/lib/Model/PropertyNameMapping.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/ReadOnlyFirst.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/SingleRefType.php | 2 +- .../client/petstore/php/psr-18/lib/Model/SpecialModelName.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/Tag.php | 2 +- samples/client/petstore/php/psr-18/lib/Model/User.php | 2 +- samples/client/petstore/php/psr-18/lib/ObjectSerializer.php | 2 +- samples/client/petstore/powershell/.openapi-generator/VERSION | 2 +- .../client/petstore/ruby-autoload/.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby-autoload/lib/petstore.rb | 2 +- .../petstore/ruby-autoload/lib/petstore/api/another_fake_api.rb | 2 +- .../petstore/ruby-autoload/lib/petstore/api/default_api.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb | 2 +- .../lib/petstore/api/fake_classname_tags123_api.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/api/pet_api.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/api/store_api.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/api/user_api.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/api_client.rb | 2 +- samples/client/petstore/ruby-autoload/lib/petstore/api_error.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/configuration.rb | 2 +- .../lib/petstore/models/additional_properties_class.rb | 2 +- .../ruby-autoload/lib/petstore/models/all_of_with_single_ref.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/models/animal.rb | 2 +- .../petstore/ruby-autoload/lib/petstore/models/api_response.rb | 2 +- .../lib/petstore/models/array_of_array_of_number_only.rb | 2 +- .../ruby-autoload/lib/petstore/models/array_of_number_only.rb | 2 +- .../petstore/ruby-autoload/lib/petstore/models/array_test.rb | 2 +- .../ruby-autoload/lib/petstore/models/capitalization.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/models/cat.rb | 2 +- .../petstore/ruby-autoload/lib/petstore/models/category.rb | 2 +- .../ruby-autoload/lib/petstore/models/child_with_nullable.rb | 2 +- .../petstore/ruby-autoload/lib/petstore/models/class_model.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/models/client.rb | 2 +- .../ruby-autoload/lib/petstore/models/deprecated_object.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/models/dog.rb | 2 +- .../petstore/ruby-autoload/lib/petstore/models/enum_arrays.rb | 2 +- .../petstore/ruby-autoload/lib/petstore/models/enum_class.rb | 2 +- .../petstore/ruby-autoload/lib/petstore/models/enum_test.rb | 2 +- .../lib/petstore/models/fake_big_decimal_map200_response.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/models/file.rb | 2 +- .../ruby-autoload/lib/petstore/models/file_schema_test_class.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/models/foo.rb | 2 +- .../lib/petstore/models/foo_get_default_response.rb | 2 +- .../petstore/ruby-autoload/lib/petstore/models/format_test.rb | 2 +- .../ruby-autoload/lib/petstore/models/has_only_read_only.rb | 2 +- .../ruby-autoload/lib/petstore/models/health_check_result.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/models/list.rb | 2 +- .../petstore/ruby-autoload/lib/petstore/models/map_test.rb | 2 +- .../models/mixed_properties_and_additional_properties_class.rb | 2 +- .../ruby-autoload/lib/petstore/models/model200_response.rb | 2 +- .../petstore/ruby-autoload/lib/petstore/models/model_return.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/models/name.rb | 2 +- .../ruby-autoload/lib/petstore/models/nullable_class.rb | 2 +- .../petstore/ruby-autoload/lib/petstore/models/number_only.rb | 2 +- .../lib/petstore/models/object_with_deprecated_fields.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/models/order.rb | 2 +- .../ruby-autoload/lib/petstore/models/outer_composite.rb | 2 +- .../petstore/ruby-autoload/lib/petstore/models/outer_enum.rb | 2 +- .../lib/petstore/models/outer_enum_default_value.rb | 2 +- .../ruby-autoload/lib/petstore/models/outer_enum_integer.rb | 2 +- .../lib/petstore/models/outer_enum_integer_default_value.rb | 2 +- .../lib/petstore/models/outer_object_with_enum_property.rb | 2 +- .../ruby-autoload/lib/petstore/models/parent_with_nullable.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/models/pet.rb | 2 +- .../ruby-autoload/lib/petstore/models/read_only_first.rb | 2 +- .../ruby-autoload/lib/petstore/models/single_ref_type.rb | 2 +- .../ruby-autoload/lib/petstore/models/special_model_name.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/models/tag.rb | 2 +- .../client/petstore/ruby-autoload/lib/petstore/models/user.rb | 2 +- samples/client/petstore/ruby-autoload/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby-autoload/petstore.gemspec | 2 +- samples/client/petstore/ruby-autoload/spec/api_client_spec.rb | 2 +- .../client/petstore/ruby-autoload/spec/configuration_spec.rb | 2 +- samples/client/petstore/ruby-autoload/spec/spec_helper.rb | 2 +- samples/client/petstore/ruby-faraday/.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby-faraday/lib/petstore.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/api/default_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb | 2 +- .../ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/store_api.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/api/user_api.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/configuration.rb | 2 +- .../lib/petstore/models/additional_properties_class.rb | 2 +- .../ruby-faraday/lib/petstore/models/all_of_with_single_ref.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/animal.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/api_response.rb | 2 +- .../lib/petstore/models/array_of_array_of_number_only.rb | 2 +- .../ruby-faraday/lib/petstore/models/array_of_number_only.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/array_test.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/capitalization.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/category.rb | 2 +- .../ruby-faraday/lib/petstore/models/child_with_nullable.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/class_model.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/client.rb | 2 +- .../ruby-faraday/lib/petstore/models/deprecated_object.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/enum_class.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/enum_test.rb | 2 +- .../lib/petstore/models/fake_big_decimal_map200_response.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/file.rb | 2 +- .../ruby-faraday/lib/petstore/models/file_schema_test_class.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb | 2 +- .../lib/petstore/models/foo_get_default_response.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/format_test.rb | 2 +- .../ruby-faraday/lib/petstore/models/has_only_read_only.rb | 2 +- .../ruby-faraday/lib/petstore/models/health_check_result.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/list.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/map_test.rb | 2 +- .../models/mixed_properties_and_additional_properties_class.rb | 2 +- .../ruby-faraday/lib/petstore/models/model200_response.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/model_return.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/name.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/nullable_class.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/number_only.rb | 2 +- .../lib/petstore/models/object_with_deprecated_fields.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/order.rb | 2 +- .../ruby-faraday/lib/petstore/models/outer_composite.rb | 2 +- .../petstore/ruby-faraday/lib/petstore/models/outer_enum.rb | 2 +- .../lib/petstore/models/outer_enum_default_value.rb | 2 +- .../ruby-faraday/lib/petstore/models/outer_enum_integer.rb | 2 +- .../lib/petstore/models/outer_enum_integer_default_value.rb | 2 +- .../lib/petstore/models/outer_object_with_enum_property.rb | 2 +- .../ruby-faraday/lib/petstore/models/parent_with_nullable.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb | 2 +- .../ruby-faraday/lib/petstore/models/read_only_first.rb | 2 +- .../ruby-faraday/lib/petstore/models/single_ref_type.rb | 2 +- .../ruby-faraday/lib/petstore/models/special_model_name.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb | 2 +- .../client/petstore/ruby-faraday/lib/petstore/models/user.rb | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby-faraday/petstore.gemspec | 2 +- samples/client/petstore/ruby-faraday/spec/api_client_spec.rb | 2 +- samples/client/petstore/ruby-faraday/spec/configuration_spec.rb | 2 +- samples/client/petstore/ruby-faraday/spec/spec_helper.rb | 2 +- samples/client/petstore/ruby/.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby/lib/petstore.rb | 2 +- .../client/petstore/ruby/lib/petstore/api/another_fake_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/default_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/fake_api.rb | 2 +- .../ruby/lib/petstore/api/fake_classname_tags123_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/pet_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/store_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api/user_api.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api_client.rb | 2 +- samples/client/petstore/ruby/lib/petstore/api_error.rb | 2 +- samples/client/petstore/ruby/lib/petstore/configuration.rb | 2 +- .../ruby/lib/petstore/models/additional_properties_class.rb | 2 +- .../petstore/ruby/lib/petstore/models/all_of_with_single_ref.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/animal.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/api_response.rb | 2 +- .../ruby/lib/petstore/models/array_of_array_of_number_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/array_of_number_only.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/array_test.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/capitalization.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/cat.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/category.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/class_model.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/client.rb | 2 +- .../petstore/ruby/lib/petstore/models/deprecated_object.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/dog.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/enum_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/enum_test.rb | 2 +- .../lib/petstore/models/fake_big_decimal_map200_response.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/file.rb | 2 +- .../petstore/ruby/lib/petstore/models/file_schema_test_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/foo.rb | 2 +- .../ruby/lib/petstore/models/foo_get_default_response.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/format_test.rb | 2 +- .../petstore/ruby/lib/petstore/models/has_only_read_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/health_check_result.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/list.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/mammal.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/mammal_anyof.rb | 2 +- .../ruby/lib/petstore/models/mammal_without_discriminator.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/map_test.rb | 2 +- .../models/mixed_properties_and_additional_properties_class.rb | 2 +- .../petstore/ruby/lib/petstore/models/model200_response.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/model_return.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/name.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/nullable_class.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/number_only.rb | 2 +- .../ruby/lib/petstore/models/object_with_deprecated_fields.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/order.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/outer_composite.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb | 2 +- .../ruby/lib/petstore/models/outer_enum_default_value.rb | 2 +- .../petstore/ruby/lib/petstore/models/outer_enum_integer.rb | 2 +- .../lib/petstore/models/outer_enum_integer_default_value.rb | 2 +- .../ruby/lib/petstore/models/outer_object_with_enum_property.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/pet.rb | 2 +- .../petstore/ruby/lib/petstore/models/property_name_mapping.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/read_only_first.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/single_ref_type.rb | 2 +- .../petstore/ruby/lib/petstore/models/special_model_name.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/tag.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/user.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/whale.rb | 2 +- samples/client/petstore/ruby/lib/petstore/models/zebra.rb | 2 +- samples/client/petstore/ruby/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby/petstore.gemspec | 2 +- samples/client/petstore/ruby/spec/api_client_spec.rb | 2 +- samples/client/petstore/ruby/spec/configuration_spec.rb | 2 +- samples/client/petstore/ruby/spec/spec_helper.rb | 2 +- .../petstore/rust/hyper/petstore/.openapi-generator/VERSION | 2 +- .../rust/reqwest/name-mapping/.openapi-generator/VERSION | 2 +- .../petstore-async-middleware/.openapi-generator/VERSION | 2 +- .../rust/reqwest/petstore-async/.openapi-generator/VERSION | 2 +- .../reqwest/petstore-awsv4signature/.openapi-generator/VERSION | 2 +- .../petstore/rust/reqwest/petstore/.openapi-generator/VERSION | 2 +- samples/client/petstore/scala-akka/.openapi-generator/VERSION | 2 +- samples/client/petstore/scala-sttp/.openapi-generator/VERSION | 2 +- samples/client/petstore/scala-sttp4/.openapi-generator/VERSION | 2 +- .../petstore/spring-cloud-date-time/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/DefaultApi.java | 2 +- .../petstore/spring-cloud-deprecated/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-cloud-feign-without-url/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/spring-cloud-tags/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetController.java | 2 +- .../src/main/java/org/openapitools/api/StoreController.java | 2 +- .../src/main/java/org/openapitools/api/UserController.java | 2 +- samples/client/petstore/spring-cloud/.openapi-generator/VERSION | 2 +- .../spring-cloud/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-http-interface-reactive/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTags123Api.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../configuration/HttpInterfacesAbstractConfigurator.java | 2 +- .../petstore/spring-http-interface/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTags123Api.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../configuration/HttpInterfacesAbstractConfigurator.java | 2 +- .../petstore/swift-combine/client/.openapi-generator/VERSION | 2 +- .../petstore/swift5/alamofireLibrary/.openapi-generator/VERSION | 2 +- .../swift5/anycodableLibrary/.openapi-generator/VERSION | 2 +- .../swift5/asyncAwaitLibrary/.openapi-generator/VERSION | 2 +- .../petstore/swift5/combineLibrary/.openapi-generator/VERSION | 2 +- .../client/petstore/swift5/default/.openapi-generator/VERSION | 2 +- .../petstore/swift5/deprecated/.openapi-generator/VERSION | 2 +- .../petstore/swift5/frozenEnums/.openapi-generator/VERSION | 2 +- .../petstore/swift5/nonPublicApi/.openapi-generator/VERSION | 2 +- .../petstore/swift5/objcCompatible/.openapi-generator/VERSION | 2 +- samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION | 2 +- .../swift5/promisekitLibrary/.openapi-generator/VERSION | 2 +- .../swift5/readonlyProperties/.openapi-generator/VERSION | 2 +- .../petstore/swift5/resultLibrary/.openapi-generator/VERSION | 2 +- .../petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION | 2 +- .../swift5/urlsessionLibrary/.openapi-generator/VERSION | 2 +- .../petstore/swift5/validation/.openapi-generator/VERSION | 2 +- .../petstore/swift5/vaporLibrary/.openapi-generator/VERSION | 2 +- .../petstore/swift5/x-swift-hashable/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/with-npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../typescript-aurelia/default/.openapi-generator/VERSION | 2 +- .../builds/composed-schemas/.openapi-generator/VERSION | 2 +- .../typescript-axios/builds/default/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/test-petstore/.openapi-generator/VERSION | 2 +- .../builds/with-complex-headers/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/with-interfaces/.openapi-generator/VERSION | 2 +- .../builds/with-node-imports/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../with-single-request-parameters/.openapi-generator/VERSION | 2 +- .../builds/with-string-enums/.openapi-generator/VERSION | 2 +- .../builds/allOf-nullable/.openapi-generator/VERSION | 2 +- .../builds/allOf-readonly/.openapi-generator/VERSION | 2 +- .../builds/default-v3.0/.openapi-generator/VERSION | 2 +- .../typescript-fetch/builds/default/.openapi-generator/VERSION | 2 +- .../typescript-fetch/builds/enum/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/multiple-parameters/.openapi-generator/VERSION | 2 +- .../prefix-parameter-interfaces/.openapi-generator/VERSION | 2 +- .../builds/sagas-and-records/.openapi-generator/VERSION | 2 +- .../builds/snakecase-discriminator/.openapi-generator/VERSION | 2 +- .../builds/with-interfaces/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../builds/with-string-enums/.openapi-generator/VERSION | 2 +- .../builds/without-runtime-checks/.openapi-generator/VERSION | 2 +- .../petstore/typescript-inversify/.openapi-generator/VERSION | 2 +- .../typescript-jquery/default/.openapi-generator/VERSION | 2 +- .../petstore/typescript-jquery/npm/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../builds/default/.openapi-generator/VERSION | 2 +- .../petstore/typescript-node/default/.openapi-generator/VERSION | 2 +- .../petstore/typescript-node/npm/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../typescript-rxjs/builds/default/.openapi-generator/VERSION | 2 +- .../builds/es6-target/.openapi-generator/VERSION | 2 +- .../builds/with-npm-version/.openapi-generator/VERSION | 2 +- .../builds/with-progress-subscriber/.openapi-generator/VERSION | 2 +- .../petstore/xojo/client-synchronous/.openapi-generator/VERSION | 2 +- samples/client/petstore/xojo/client/.openapi-generator/VERSION | 2 +- samples/client/petstore/zapier/.openapi-generator/VERSION | 2 +- .../config/petstore/protobuf-schema/.openapi-generator/VERSION | 2 +- samples/meta-codegen/lib/pom.xml | 2 +- samples/meta-codegen/usage/.openapi-generator/VERSION | 2 +- samples/openapi3/client/elm/.openapi-generator/VERSION | 2 +- .../x-auth-id-alias/go-experimental/.openapi-generator/VERSION | 2 +- .../java/jersey2-java8/.openapi-generator/VERSION | 2 +- .../x-auth-id-alias/ruby-client/.openapi-generator/VERSION | 2 +- .../x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/api/usage_api.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/api_client.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/api_error.rb | 2 +- .../ruby-client/lib/x_auth_id_alias/configuration.rb | 2 +- .../x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb | 2 +- .../x-auth-id-alias/ruby-client/spec/api_client_spec.rb | 2 +- .../x-auth-id-alias/ruby-client/spec/configuration_spec.rb | 2 +- .../extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb | 2 +- .../x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec | 2 +- .../features/dynamic-servers/ruby/.openapi-generator/VERSION | 2 +- .../features/dynamic-servers/ruby/dynamic_servers.gemspec | 2 +- .../client/features/dynamic-servers/ruby/lib/dynamic_servers.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/api_client.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/api_error.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/configuration.rb | 2 +- .../dynamic-servers/ruby/lib/dynamic_servers/version.rb | 2 +- .../features/dynamic-servers/ruby/spec/api_client_spec.rb | 2 +- .../features/dynamic-servers/ruby/spec/configuration_spec.rb | 2 +- .../client/features/dynamic-servers/ruby/spec/spec_helper.rb | 2 +- .../ruby-client/.openapi-generator/VERSION | 2 +- .../generate-alias-as-model/ruby-client/lib/petstore.rb | 2 +- .../ruby-client/lib/petstore/api/usage_api.rb | 2 +- .../ruby-client/lib/petstore/api_client.rb | 2 +- .../ruby-client/lib/petstore/api_error.rb | 2 +- .../ruby-client/lib/petstore/configuration.rb | 2 +- .../ruby-client/lib/petstore/models/array_alias.rb | 2 +- .../ruby-client/lib/petstore/models/map_alias.rb | 2 +- .../generate-alias-as-model/ruby-client/lib/petstore/version.rb | 2 +- .../generate-alias-as-model/ruby-client/petstore.gemspec | 2 +- .../generate-alias-as-model/ruby-client/spec/api_client_spec.rb | 2 +- .../ruby-client/spec/configuration_spec.rb | 2 +- .../generate-alias-as-model/ruby-client/spec/spec_helper.rb | 2 +- .../client/petstore/dart-dio/oneof/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../dart-dio/oneof_primitive/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore_client_lib_fake/.openapi-generator/VERSION | 2 +- .../dart2/petstore_client_lib/.openapi-generator/VERSION | 2 +- .../dart2/petstore_client_lib_fake/.openapi-generator/VERSION | 2 +- .../client/petstore/go/go-petstore/.openapi-generator/VERSION | 2 +- .../jersey2-java8-special-characters/.openapi-generator/VERSION | 2 +- .../java/jersey2-java8-swagger1/.openapi-generator/VERSION | 2 +- .../java/jersey2-java8-swagger2/.openapi-generator/VERSION | 2 +- .../petstore/java/jersey2-java8/.openapi-generator/VERSION | 2 +- .../client/petstore/python-aiohttp/.openapi-generator/VERSION | 2 +- .../openapi3/client/petstore/python/.openapi-generator/VERSION | 2 +- .../spring-cloud-3-with-optional/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../client/petstore/spring-cloud-3/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/spring-cloud-async/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/spring-cloud-date-time/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/DefaultApi.java | 2 +- .../spring-cloud-oas3-fakeapi/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTags123Api.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-cloud-spring-pageable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../client/petstore/spring-cloud/.openapi-generator/VERSION | 2 +- .../spring-cloud/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../client/petstore/spring-stubs/.openapi-generator/VERSION | 2 +- .../spring-stubs/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../typescript/builds/browser/.openapi-generator/VERSION | 2 +- .../builds/composed-schemas/.openapi-generator/VERSION | 2 +- .../typescript/builds/default/.openapi-generator/VERSION | 2 +- .../petstore/typescript/builds/deno/.openapi-generator/VERSION | 2 +- .../typescript/builds/inversify/.openapi-generator/VERSION | 2 +- .../typescript/builds/jquery/.openapi-generator/VERSION | 2 +- .../typescript/builds/object_params/.openapi-generator/VERSION | 2 +- .../schema/petstore/avro-schema/.openapi-generator/VERSION | 2 +- .../server/petstore/go/go-petstore/.openapi-generator/VERSION | 2 +- .../petstore/spring-boot-oneof/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/BarApi.java | 2 +- .../src/main/java/org/openapitools/api/FooApi.java | 2 +- .../petstore/spring-boot-springdoc/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../server/petstore/springboot-3/.openapi-generator/VERSION | 2 +- .../springboot-3/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-delegate/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-implicitHeaders/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-source/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../server/petstore/springboot/.openapi-generator/VERSION | 2 +- .../springboot/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/ktorm-modelMutable/.openapi-generator/VERSION | 2 +- samples/schema/petstore/ktorm/.openapi-generator/VERSION | 2 +- samples/schema/petstore/mysql/.openapi-generator/VERSION | 2 +- samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION | 2 +- samples/schema/postman-collection/.openapi-generator/VERSION | 2 +- .../others/kotlin-server/jaxrs-spec/.openapi-generator/VERSION | 2 +- .../server/petstore/aspnetcore-3.0/.openapi-generator/VERSION | 2 +- .../server/petstore/aspnetcore-3.1/.openapi-generator/VERSION | 2 +- .../server/petstore/aspnetcore-5.0/.openapi-generator/VERSION | 2 +- .../aspnetcore-6.0-NewtonsoftFalse/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../aspnetcore-6.0-pocoModels/.openapi-generator/VERSION | 2 +- .../aspnetcore-6.0-project4Models/.openapi-generator/VERSION | 2 +- .../aspnetcore-6.0-useSwashBuckle/.openapi-generator/VERSION | 2 +- .../server/petstore/aspnetcore-6.0/.openapi-generator/VERSION | 2 +- samples/server/petstore/aspnetcore/.openapi-generator/VERSION | 2 +- samples/server/petstore/cpp-pistache/.openapi-generator/VERSION | 2 +- .../cpp-qt-qhttpengine-server/.openapi-generator/VERSION | 2 +- .../cpp-restbed/generated/3_0/.openapi-generator/VERSION | 2 +- .../petstore/cpp-restbed/generated/3_0/api/AnotherFakeApi.cpp | 2 +- .../petstore/cpp-restbed/generated/3_0/api/AnotherFakeApi.h | 2 +- .../petstore/cpp-restbed/generated/3_0/api/DefaultApi.cpp | 2 +- .../server/petstore/cpp-restbed/generated/3_0/api/DefaultApi.h | 2 +- .../server/petstore/cpp-restbed/generated/3_0/api/FakeApi.cpp | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.h | 2 +- .../cpp-restbed/generated/3_0/api/FakeClassnameTags123Api.cpp | 2 +- .../cpp-restbed/generated/3_0/api/FakeClassnameTags123Api.h | 2 +- .../server/petstore/cpp-restbed/generated/3_0/api/PetApi.cpp | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/api/PetApi.h | 2 +- .../server/petstore/cpp-restbed/generated/3_0/api/StoreApi.cpp | 2 +- .../server/petstore/cpp-restbed/generated/3_0/api/StoreApi.h | 2 +- .../server/petstore/cpp-restbed/generated/3_0/api/UserApi.cpp | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/api/UserApi.h | 2 +- .../generated/3_0/model/AdditionalPropertiesClass.cpp | 2 +- .../cpp-restbed/generated/3_0/model/AdditionalPropertiesClass.h | 2 +- .../cpp-restbed/generated/3_0/model/AllOfWithSingleRef.cpp | 2 +- .../cpp-restbed/generated/3_0/model/AllOfWithSingleRef.h | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/Animal.cpp | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/Animal.h | 2 +- .../petstore/cpp-restbed/generated/3_0/model/ApiResponse.cpp | 2 +- .../petstore/cpp-restbed/generated/3_0/model/ApiResponse.h | 2 +- .../generated/3_0/model/ArrayOfArrayOfNumberOnly.cpp | 2 +- .../cpp-restbed/generated/3_0/model/ArrayOfArrayOfNumberOnly.h | 2 +- .../cpp-restbed/generated/3_0/model/ArrayOfNumberOnly.cpp | 2 +- .../cpp-restbed/generated/3_0/model/ArrayOfNumberOnly.h | 2 +- .../petstore/cpp-restbed/generated/3_0/model/ArrayTest.cpp | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/ArrayTest.h | 2 +- .../petstore/cpp-restbed/generated/3_0/model/Capitalization.cpp | 2 +- .../petstore/cpp-restbed/generated/3_0/model/Capitalization.h | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/model/Cat.cpp | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/model/Cat.h | 2 +- .../petstore/cpp-restbed/generated/3_0/model/Category.cpp | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/Category.h | 2 +- .../cpp-restbed/generated/3_0/model/ChildWithNullable.cpp | 2 +- .../cpp-restbed/generated/3_0/model/ChildWithNullable.h | 2 +- .../petstore/cpp-restbed/generated/3_0/model/ClassModel.cpp | 2 +- .../petstore/cpp-restbed/generated/3_0/model/ClassModel.h | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/Client.cpp | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/Client.h | 2 +- .../cpp-restbed/generated/3_0/model/DeprecatedObject.cpp | 2 +- .../petstore/cpp-restbed/generated/3_0/model/DeprecatedObject.h | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/model/Dog.cpp | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/model/Dog.h | 2 +- .../petstore/cpp-restbed/generated/3_0/model/EnumArrays.cpp | 2 +- .../petstore/cpp-restbed/generated/3_0/model/EnumArrays.h | 2 +- .../petstore/cpp-restbed/generated/3_0/model/EnumClass.cpp | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/EnumClass.h | 2 +- .../petstore/cpp-restbed/generated/3_0/model/Enum_Test.cpp | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/Enum_Test.h | 2 +- .../generated/3_0/model/FakeBigDecimalMap_200_response.cpp | 2 +- .../generated/3_0/model/FakeBigDecimalMap_200_response.h | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/File.cpp | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/model/File.h | 2 +- .../cpp-restbed/generated/3_0/model/FileSchemaTestClass.cpp | 2 +- .../cpp-restbed/generated/3_0/model/FileSchemaTestClass.h | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/model/Foo.cpp | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/model/Foo.h | 2 +- .../petstore/cpp-restbed/generated/3_0/model/Format_test.cpp | 2 +- .../petstore/cpp-restbed/generated/3_0/model/Format_test.h | 2 +- .../cpp-restbed/generated/3_0/model/HasOnlyReadOnly.cpp | 2 +- .../petstore/cpp-restbed/generated/3_0/model/HasOnlyReadOnly.h | 2 +- .../cpp-restbed/generated/3_0/model/HealthCheckResult.cpp | 2 +- .../cpp-restbed/generated/3_0/model/HealthCheckResult.h | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/List.cpp | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/model/List.h | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/MapTest.cpp | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/MapTest.h | 2 +- .../3_0/model/MixedPropertiesAndAdditionalPropertiesClass.cpp | 2 +- .../3_0/model/MixedPropertiesAndAdditionalPropertiesClass.h | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/Name.cpp | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/model/Name.h | 2 +- .../petstore/cpp-restbed/generated/3_0/model/NullableClass.cpp | 2 +- .../petstore/cpp-restbed/generated/3_0/model/NullableClass.h | 2 +- .../petstore/cpp-restbed/generated/3_0/model/NumberOnly.cpp | 2 +- .../petstore/cpp-restbed/generated/3_0/model/NumberOnly.h | 2 +- .../generated/3_0/model/ObjectWithDeprecatedFields.cpp | 2 +- .../generated/3_0/model/ObjectWithDeprecatedFields.h | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/Order.cpp | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/model/Order.h | 2 +- .../petstore/cpp-restbed/generated/3_0/model/OuterComposite.cpp | 2 +- .../petstore/cpp-restbed/generated/3_0/model/OuterComposite.h | 2 +- .../petstore/cpp-restbed/generated/3_0/model/OuterEnum.cpp | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/OuterEnum.h | 2 +- .../cpp-restbed/generated/3_0/model/OuterEnumDefaultValue.cpp | 2 +- .../cpp-restbed/generated/3_0/model/OuterEnumDefaultValue.h | 2 +- .../cpp-restbed/generated/3_0/model/OuterEnumInteger.cpp | 2 +- .../petstore/cpp-restbed/generated/3_0/model/OuterEnumInteger.h | 2 +- .../generated/3_0/model/OuterEnumIntegerDefaultValue.cpp | 2 +- .../generated/3_0/model/OuterEnumIntegerDefaultValue.h | 2 +- .../generated/3_0/model/OuterObjectWithEnumProperty.cpp | 2 +- .../generated/3_0/model/OuterObjectWithEnumProperty.h | 2 +- .../cpp-restbed/generated/3_0/model/ParentWithNullable.cpp | 2 +- .../cpp-restbed/generated/3_0/model/ParentWithNullable.h | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/model/Pet.cpp | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/model/Pet.h | 2 +- .../petstore/cpp-restbed/generated/3_0/model/ReadOnlyFirst.cpp | 2 +- .../petstore/cpp-restbed/generated/3_0/model/ReadOnlyFirst.h | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/Return.cpp | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/Return.h | 2 +- .../petstore/cpp-restbed/generated/3_0/model/SingleRefType.cpp | 2 +- .../petstore/cpp-restbed/generated/3_0/model/SingleRefType.h | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/model/Tag.cpp | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/model/Tag.h | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/User.cpp | 2 +- samples/server/petstore/cpp-restbed/generated/3_0/model/User.h | 2 +- .../generated/3_0/model/_foo_get_default_response.cpp | 2 +- .../cpp-restbed/generated/3_0/model/_foo_get_default_response.h | 2 +- .../cpp-restbed/generated/3_0/model/_special_model_name_.cpp | 2 +- .../cpp-restbed/generated/3_0/model/_special_model_name_.h | 2 +- .../server/petstore/cpp-restbed/generated/3_0/model/helpers.h | 2 +- .../petstore/cpp-restbed/generated/3_0/model/r_200_response.cpp | 2 +- .../petstore/cpp-restbed/generated/3_0/model/r_200_response.h | 2 +- .../server/petstore/erlang-server/.openapi-generator/VERSION | 2 +- .../server/petstore/go-api-server/.openapi-generator/VERSION | 2 +- .../server/petstore/go-chi-server/.openapi-generator/VERSION | 2 +- .../server/petstore/go-echo-server/.openapi-generator/VERSION | 2 +- .../petstore/go-gin-api-server/.openapi-generator/VERSION | 2 +- .../server/petstore/haskell-servant/.openapi-generator/VERSION | 2 +- .../server/petstore/haskell-yesod/.openapi-generator/VERSION | 2 +- samples/server/petstore/java-camel/.openapi-generator/VERSION | 2 +- samples/server/petstore/java-camel/pom.xml | 2 +- .../src/main/java/org/openapitools/RestConfiguration.java | 2 +- .../main/java/org/openapitools/ValidationErrorProcessor.java | 2 +- .../java-camel/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApiRoutesImpl.java | 2 +- .../src/main/java/org/openapitools/api/PetApiValidator.java | 2 +- .../java-camel/src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApiRoutesImpl.java | 2 +- .../src/main/java/org/openapitools/api/StoreApiValidator.java | 2 +- .../java-camel/src/main/java/org/openapitools/api/UserApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApiRoutesImpl.java | 2 +- .../src/main/java/org/openapitools/api/UserApiValidator.java | 2 +- .../java-camel/src/main/resources/application.properties | 2 +- .../petstore/java-helidon-server/mp/.openapi-generator/VERSION | 2 +- .../petstore/java-helidon-server/se/.openapi-generator/VERSION | 2 +- .../petstore/java-micronaut-server/.openapi-generator/VERSION | 2 +- samples/server/petstore/java-msf4j/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../java-play-framework-async/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../java-play-framework-no-interface/.openapi-generator/VERSION | 2 +- .../java-play-framework-no-nullable/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/java-play-framework/.openapi-generator/VERSION | 2 +- .../server/petstore/java-undertow/.openapi-generator/VERSION | 2 +- .../server/petstore/java-vertx-web/.openapi-generator/VERSION | 2 +- .../jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION | 2 +- .../jaxrs-cxf-non-spring-app/.openapi-generator/VERSION | 2 +- samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION | 2 +- samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/default/.openapi-generator/VERSION | 2 +- .../jaxrs-resteasy/eap-java8/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/java8/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-spec-interface/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-spec-jakarta/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs/jersey1/.openapi-generator/VERSION | 2 +- .../petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION | 2 +- .../server/petstore/jaxrs/jersey2/.openapi-generator/VERSION | 2 +- samples/server/petstore/julia/.openapi-generator/VERSION | 2 +- .../kotlin-server-modelMutable/.openapi-generator/VERSION | 2 +- samples/server/petstore/kotlin-server-modelMutable/README.md | 2 +- .../kotlin-server/jaxrs-spec-mutiny/.openapi-generator/VERSION | 2 +- .../kotlin-server/jaxrs-spec/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-server/ktor/.openapi-generator/VERSION | 2 +- samples/server/petstore/kotlin-server/ktor/README.md | 2 +- .../petstore/kotlin-spring-default/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-springboot-3/.openapi-generator/VERSION | 2 +- .../kotlin-springboot-delegate/.openapi-generator/VERSION | 2 +- .../src/main/kotlin/org/openapitools/api/PetApi.kt | 2 +- .../src/main/kotlin/org/openapitools/api/StoreApi.kt | 2 +- .../src/main/kotlin/org/openapitools/api/UserApi.kt | 2 +- .../kotlin-springboot-modelMutable/.openapi-generator/VERSION | 2 +- .../kotlin-springboot-reactive/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin-springboot-springfox/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-springboot/.openapi-generator/VERSION | 2 +- .../kotlin-vertx-modelMutable/.openapi-generator/VERSION | 2 +- samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-laravel/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-lumen/.openapi-generator/VERSION | 2 +- .../petstore/php-mezzio-ph-modern/.openapi-generator/VERSION | 2 +- .../server/petstore/php-mezzio-ph/.openapi-generator/VERSION | 2 +- samples/server/petstore/php-slim4/.openapi-generator/VERSION | 2 +- .../php-symfony/SymfonyBundle-php/.openapi-generator/VERSION | 2 +- .../python-aiohttp-srclayout/.openapi-generator/VERSION | 2 +- .../petstore/python-blueplanet/.openapi-generator/VERSION | 2 +- .../server/petstore/python-fastapi/.openapi-generator/VERSION | 2 +- samples/server/petstore/python-flask/.openapi-generator/VERSION | 2 +- .../rust-server/output/multipart-v3/.openapi-generator/VERSION | 2 +- .../rust-server/output/no-example-v3/.openapi-generator/VERSION | 2 +- .../rust-server/output/openapi-v3/.openapi-generator/VERSION | 2 +- .../rust-server/output/ops-v3/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../output/ping-bearer-auth/.openapi-generator/VERSION | 2 +- .../output/rust-server-test/.openapi-generator/VERSION | 2 +- .../petstore/scala-akka-http-server/.openapi-generator/VERSION | 2 +- .../petstore/scala-pekko-http-server/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../spring-boot-nullable-set/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/NullableApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-beanvalidation/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-delegate-j8/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-delegate/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../springboot-implicitHeaders/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-reactive/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../src/main/java/org/openapitools/api/VersioningApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../src/main/java/org/openapitools/api/VersioningApi.java | 2 +- .../.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../src/main/java/org/openapitools/api/VersioningApi.java | 2 +- .../springboot-spring-pageable/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../src/main/java/org/openapitools/api/VersioningApi.java | 2 +- .../petstore/springboot-useoptional/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/api/UserApi.java | 2 +- .../petstore/springboot-virtualan/.openapi-generator/VERSION | 2 +- .../java/org/openapitools/virtualan/api/AnotherFakeApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/FakeApi.java | 2 +- .../org/openapitools/virtualan/api/FakeClassnameTestApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/PetApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/StoreApi.java | 2 +- .../src/main/java/org/openapitools/virtualan/api/UserApi.java | 2 +- samples/server/petstore/springboot/.openapi-generator/VERSION | 2 +- .../src/main/java/org/openapitools/api/AnotherFakeApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/FakeApi.java | 2 +- .../main/java/org/openapitools/api/FakeClassnameTestApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/PetApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/StoreApi.java | 2 +- .../springboot/src/main/java/org/openapitools/api/UserApi.java | 2 +- 1302 files changed, 1302 insertions(+), 1302 deletions(-) diff --git a/modules/openapi-generator-cli/pom.xml b/modules/openapi-generator-cli/pom.xml index c264adf32ee5..04f273dad27b 100644 --- a/modules/openapi-generator-cli/pom.xml +++ b/modules/openapi-generator-cli/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 7.0.1 + 7.1.0-SNAPSHOT ../.. diff --git a/modules/openapi-generator-core/pom.xml b/modules/openapi-generator-core/pom.xml index 13f8a0db08dc..e6d65605b7f3 100644 --- a/modules/openapi-generator-core/pom.xml +++ b/modules/openapi-generator-core/pom.xml @@ -6,7 +6,7 @@ openapi-generator-project org.openapitools - 7.0.1 + 7.1.0-SNAPSHOT ../.. diff --git a/modules/openapi-generator-gradle-plugin/gradle.properties b/modules/openapi-generator-gradle-plugin/gradle.properties index 7edb04f216ee..11df589b84bc 100644 --- a/modules/openapi-generator-gradle-plugin/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/gradle.properties @@ -1,5 +1,5 @@ # RELEASE_VERSION -openApiGeneratorVersion=7.0.1 +openApiGeneratorVersion=7.1.0-SNAPSHOT # /RELEASE_VERSION # BEGIN placeholders diff --git a/modules/openapi-generator-gradle-plugin/pom.xml b/modules/openapi-generator-gradle-plugin/pom.xml index ee40e297a222..eb972aa08701 100644 --- a/modules/openapi-generator-gradle-plugin/pom.xml +++ b/modules/openapi-generator-gradle-plugin/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 7.0.1 + 7.1.0-SNAPSHOT ../.. diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties index 258c95b06485..b6bc0004a3eb 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties @@ -1,3 +1,3 @@ # RELEASE_VERSION -openApiGeneratorVersion=7.0.1 +openApiGeneratorVersion=7.1.0-SNAPSHOT # /RELEASE_VERSION diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml index d3f80ab2b314..fcb7c1aafb8a 100644 --- a/modules/openapi-generator-maven-plugin/examples/java-client.xml +++ b/modules/openapi-generator-maven-plugin/examples/java-client.xml @@ -13,7 +13,7 @@ org.openapitools openapi-generator-maven-plugin - 7.0.1 + 7.1.0-SNAPSHOT diff --git a/modules/openapi-generator-maven-plugin/examples/kotlin.xml b/modules/openapi-generator-maven-plugin/examples/kotlin.xml index e070be9c487a..cc3410ba8ae0 100644 --- a/modules/openapi-generator-maven-plugin/examples/kotlin.xml +++ b/modules/openapi-generator-maven-plugin/examples/kotlin.xml @@ -15,7 +15,7 @@ org.openapitools openapi-generator-maven-plugin - 7.0.1 + 7.1.0-SNAPSHOT diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml index 8eb87caab71d..fab20894ed3c 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml @@ -19,7 +19,7 @@ org.openapitools openapi-generator-maven-plugin - 7.0.1 + 7.1.0-SNAPSHOT diff --git a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml index ff73ee764770..acdfe54dfdd5 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml @@ -13,7 +13,7 @@ org.openapitools openapi-generator-maven-plugin - 7.0.1 + 7.1.0-SNAPSHOT diff --git a/modules/openapi-generator-maven-plugin/examples/non-java.xml b/modules/openapi-generator-maven-plugin/examples/non-java.xml index e9931563b517..7d3617d18d13 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java.xml @@ -13,7 +13,7 @@ org.openapitools openapi-generator-maven-plugin - 7.0.1 + 7.1.0-SNAPSHOT diff --git a/modules/openapi-generator-maven-plugin/examples/spring.xml b/modules/openapi-generator-maven-plugin/examples/spring.xml index 028841521b48..6cabd0c50c20 100644 --- a/modules/openapi-generator-maven-plugin/examples/spring.xml +++ b/modules/openapi-generator-maven-plugin/examples/spring.xml @@ -20,7 +20,7 @@ org.openapitools openapi-generator-maven-plugin - 7.0.1 + 7.1.0-SNAPSHOT diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml index 625b40a163d6..c8598352669d 100644 --- a/modules/openapi-generator-maven-plugin/pom.xml +++ b/modules/openapi-generator-maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.openapitools openapi-generator-project - 7.0.1 + 7.1.0-SNAPSHOT ../.. diff --git a/modules/openapi-generator-online/pom.xml b/modules/openapi-generator-online/pom.xml index 23aab3644b65..3ef2e372a8d7 100644 --- a/modules/openapi-generator-online/pom.xml +++ b/modules/openapi-generator-online/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 7.0.1 + 7.1.0-SNAPSHOT ../.. diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index c284e40ee2d2..f55c4d55abe6 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 7.0.1 + 7.1.0-SNAPSHOT ../.. diff --git a/pom.xml b/pom.xml index 70ed4f42e26b..174fdcc71489 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ pom openapi-generator-project - 7.0.1 + 7.1.0-SNAPSHOT https://github.com/openapitools/openapi-generator diff --git a/samples/client/echo_api/csharp-restsharp/.openapi-generator/VERSION b/samples/client/echo_api/csharp-restsharp/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/echo_api/csharp-restsharp/.openapi-generator/VERSION +++ b/samples/client/echo_api/csharp-restsharp/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/echo_api/go/.openapi-generator/VERSION b/samples/client/echo_api/go/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/echo_api/go/.openapi-generator/VERSION +++ b/samples/client/echo_api/go/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/echo_api/java/apache-httpclient/.openapi-generator/VERSION b/samples/client/echo_api/java/apache-httpclient/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/echo_api/java/apache-httpclient/.openapi-generator/VERSION +++ b/samples/client/echo_api/java/apache-httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/echo_api/java/feign-gson/.openapi-generator/VERSION b/samples/client/echo_api/java/feign-gson/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/echo_api/java/feign-gson/.openapi-generator/VERSION +++ b/samples/client/echo_api/java/feign-gson/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/echo_api/java/native/.openapi-generator/VERSION b/samples/client/echo_api/java/native/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/echo_api/java/native/.openapi-generator/VERSION +++ b/samples/client/echo_api/java/native/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/echo_api/java/okhttp-gson/.openapi-generator/VERSION b/samples/client/echo_api/java/okhttp-gson/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/echo_api/java/okhttp-gson/.openapi-generator/VERSION +++ b/samples/client/echo_api/java/okhttp-gson/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/echo_api/php-nextgen/.openapi-generator/VERSION b/samples/client/echo_api/php-nextgen/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/echo_api/php-nextgen/.openapi-generator/VERSION +++ b/samples/client/echo_api/php-nextgen/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php index 30ae128d7e18..53f05d5f1bba 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php index 8456fd77969f..4c26e74f299d 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Api/FormApi.php b/samples/client/echo_api/php-nextgen/src/Api/FormApi.php index 5c2a2d000272..1106aef1a7b5 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/FormApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/FormApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php index 3f6f1a0da6bb..b0c66c8a3d9a 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php index c745e61ca330..a71380ffbd23 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php index 45e2df0f3fb8..2aa16de6f70e 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/ApiException.php b/samples/client/echo_api/php-nextgen/src/ApiException.php index 2c3b6e48dbbf..db9919eff9a5 100644 --- a/samples/client/echo_api/php-nextgen/src/ApiException.php +++ b/samples/client/echo_api/php-nextgen/src/ApiException.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Configuration.php b/samples/client/echo_api/php-nextgen/src/Configuration.php index ffb22a3cbeb3..c3e83b87b2f3 100644 --- a/samples/client/echo_api/php-nextgen/src/Configuration.php +++ b/samples/client/echo_api/php-nextgen/src/Configuration.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/HeaderSelector.php b/samples/client/echo_api/php-nextgen/src/HeaderSelector.php index de00e44e7155..5641fc3b9b3c 100644 --- a/samples/client/echo_api/php-nextgen/src/HeaderSelector.php +++ b/samples/client/echo_api/php-nextgen/src/HeaderSelector.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Model/Bird.php b/samples/client/echo_api/php-nextgen/src/Model/Bird.php index 78c6e208fc1c..58773f66cee1 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/Bird.php +++ b/samples/client/echo_api/php-nextgen/src/Model/Bird.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Model/Category.php b/samples/client/echo_api/php-nextgen/src/Model/Category.php index c33e03307b6c..fca3463c950b 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/Category.php +++ b/samples/client/echo_api/php-nextgen/src/Model/Category.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Model/DataQuery.php b/samples/client/echo_api/php-nextgen/src/Model/DataQuery.php index 1efa3a9e4f80..c726810fb0b0 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/DataQuery.php +++ b/samples/client/echo_api/php-nextgen/src/Model/DataQuery.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Model/DefaultValue.php b/samples/client/echo_api/php-nextgen/src/Model/DefaultValue.php index d11057ebada8..7ecd9e41b80f 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/DefaultValue.php +++ b/samples/client/echo_api/php-nextgen/src/Model/DefaultValue.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Model/ModelInterface.php b/samples/client/echo_api/php-nextgen/src/Model/ModelInterface.php index 60e917bca3e0..5fa11418479e 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/ModelInterface.php +++ b/samples/client/echo_api/php-nextgen/src/Model/ModelInterface.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Model/NumberPropertiesOnly.php b/samples/client/echo_api/php-nextgen/src/Model/NumberPropertiesOnly.php index 729ad478e05e..3799ee96511a 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/NumberPropertiesOnly.php +++ b/samples/client/echo_api/php-nextgen/src/Model/NumberPropertiesOnly.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Model/Pet.php b/samples/client/echo_api/php-nextgen/src/Model/Pet.php index 86f15d851237..e1d5a7932290 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/Pet.php +++ b/samples/client/echo_api/php-nextgen/src/Model/Pet.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Model/Query.php b/samples/client/echo_api/php-nextgen/src/Model/Query.php index 120083e272a7..9644ce0096c7 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/Query.php +++ b/samples/client/echo_api/php-nextgen/src/Model/Query.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Model/StringEnumRef.php b/samples/client/echo_api/php-nextgen/src/Model/StringEnumRef.php index 7f2ccd378ff5..f0c9cbc70d6b 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/StringEnumRef.php +++ b/samples/client/echo_api/php-nextgen/src/Model/StringEnumRef.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Model/Tag.php b/samples/client/echo_api/php-nextgen/src/Model/Tag.php index 64b4b56fffe1..5f5f5c3e8ab5 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/Tag.php +++ b/samples/client/echo_api/php-nextgen/src/Model/Tag.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php b/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php index 8a3f95fe219e..7055dc174436 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php +++ b/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php b/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php index c1fc04a39c44..4e08b3939e57 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php +++ b/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/php-nextgen/src/ObjectSerializer.php b/samples/client/echo_api/php-nextgen/src/ObjectSerializer.php index 780354b3bb56..88bada64febf 100644 --- a/samples/client/echo_api/php-nextgen/src/ObjectSerializer.php +++ b/samples/client/echo_api/php-nextgen/src/ObjectSerializer.php @@ -18,7 +18,7 @@ * The version of the OpenAPI document: 0.1.0 * Contact: team@openapitools.org * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/echo_api/python/.openapi-generator/VERSION b/samples/client/echo_api/python/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/echo_api/python/.openapi-generator/VERSION +++ b/samples/client/echo_api/python/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/others/csharp-complex-files/.openapi-generator/VERSION b/samples/client/others/csharp-complex-files/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/others/csharp-complex-files/.openapi-generator/VERSION +++ b/samples/client/others/csharp-complex-files/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/others/java/okhttp-gson-streaming/.openapi-generator/VERSION b/samples/client/others/java/okhttp-gson-streaming/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/others/java/okhttp-gson-streaming/.openapi-generator/VERSION +++ b/samples/client/others/java/okhttp-gson-streaming/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/.openapi-generator/VERSION b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/others/kotlin-jvm-okhttp-parameter-tests/.openapi-generator/VERSION +++ b/samples/client/others/kotlin-jvm-okhttp-parameter-tests/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/others/rust/reqwest-regression-16119/.openapi-generator/VERSION b/samples/client/others/rust/reqwest-regression-16119/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/others/rust/reqwest-regression-16119/.openapi-generator/VERSION +++ b/samples/client/others/rust/reqwest-regression-16119/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/others/typescript-angular/builds/composed-schemas-tagged-unions/.openapi-generator/VERSION b/samples/client/others/typescript-angular/builds/composed-schemas-tagged-unions/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/others/typescript-angular/builds/composed-schemas-tagged-unions/.openapi-generator/VERSION +++ b/samples/client/others/typescript-angular/builds/composed-schemas-tagged-unions/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/others/typescript-angular/builds/composed-schemas/.openapi-generator/VERSION b/samples/client/others/typescript-angular/builds/composed-schemas/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/others/typescript-angular/builds/composed-schemas/.openapi-generator/VERSION +++ b/samples/client/others/typescript-angular/builds/composed-schemas/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/.openapi-generator/VERSION b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/.openapi-generator/VERSION +++ b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/others/typescript-rxjs/allOf-composition/.openapi-generator/VERSION b/samples/client/others/typescript-rxjs/allOf-composition/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/others/typescript-rxjs/allOf-composition/.openapi-generator/VERSION +++ b/samples/client/others/typescript-rxjs/allOf-composition/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/others/typescript/builds/with-unique-items/.openapi-generator/VERSION b/samples/client/others/typescript/builds/with-unique-items/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/others/typescript/builds/with-unique-items/.openapi-generator/VERSION +++ b/samples/client/others/typescript/builds/with-unique-items/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/R-httr2-wrapper/.openapi-generator/VERSION b/samples/client/petstore/R-httr2-wrapper/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/R-httr2-wrapper/.openapi-generator/VERSION +++ b/samples/client/petstore/R-httr2-wrapper/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/R-httr2/.openapi-generator/VERSION b/samples/client/petstore/R-httr2/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/R-httr2/.openapi-generator/VERSION +++ b/samples/client/petstore/R-httr2/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/R/.openapi-generator/VERSION b/samples/client/petstore/R/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/R/.openapi-generator/VERSION +++ b/samples/client/petstore/R/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ada/.openapi-generator/VERSION b/samples/client/petstore/ada/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/ada/.openapi-generator/VERSION +++ b/samples/client/petstore/ada/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ada/src/client/samples-petstore-clients.adb b/samples/client/petstore/ada/src/client/samples-petstore-clients.adb index d81f7896b111..92b1c8cd7349 100644 --- a/samples/client/petstore/ada/src/client/samples-petstore-clients.adb +++ b/samples/client/petstore/ada/src/client/samples-petstore-clients.adb @@ -4,7 +4,7 @@ -- The version of the OpenAPI document: 1.0.0 -- -- --- NOTE: This package is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. +-- NOTE: This package is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. -- https://openapi-generator.tech -- Do not edit the class manually. diff --git a/samples/client/petstore/ada/src/client/samples-petstore-clients.ads b/samples/client/petstore/ada/src/client/samples-petstore-clients.ads index b9a8fbce7003..acd279390685 100644 --- a/samples/client/petstore/ada/src/client/samples-petstore-clients.ads +++ b/samples/client/petstore/ada/src/client/samples-petstore-clients.ads @@ -4,7 +4,7 @@ -- The version of the OpenAPI document: 1.0.0 -- -- --- NOTE: This package is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. +-- NOTE: This package is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. -- https://openapi-generator.tech -- Do not edit the class manually. diff --git a/samples/client/petstore/ada/src/model/samples-petstore-models.adb b/samples/client/petstore/ada/src/model/samples-petstore-models.adb index e46b13baf5b7..db9a2fcfde17 100644 --- a/samples/client/petstore/ada/src/model/samples-petstore-models.adb +++ b/samples/client/petstore/ada/src/model/samples-petstore-models.adb @@ -4,7 +4,7 @@ -- The version of the OpenAPI document: 1.0.0 -- -- --- NOTE: This package is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. +-- NOTE: This package is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. -- https://openapi-generator.tech -- Do not edit the class manually. diff --git a/samples/client/petstore/ada/src/model/samples-petstore-models.ads b/samples/client/petstore/ada/src/model/samples-petstore-models.ads index 57575ae66790..5c4f7dd1a162 100644 --- a/samples/client/petstore/ada/src/model/samples-petstore-models.ads +++ b/samples/client/petstore/ada/src/model/samples-petstore-models.ads @@ -4,7 +4,7 @@ -- The version of the OpenAPI document: 1.0.0 -- -- --- NOTE: This package is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. +-- NOTE: This package is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. -- https://openapi-generator.tech -- Do not edit the class manually. diff --git a/samples/client/petstore/apex/.openapi-generator/VERSION b/samples/client/petstore/apex/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/apex/.openapi-generator/VERSION +++ b/samples/client/petstore/apex/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/bash/.openapi-generator/VERSION b/samples/client/petstore/bash/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/bash/.openapi-generator/VERSION +++ b/samples/client/petstore/bash/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/c/.openapi-generator/VERSION b/samples/client/petstore/c/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/c/.openapi-generator/VERSION +++ b/samples/client/petstore/c/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-qt/.openapi-generator/VERSION b/samples/client/petstore/cpp-qt/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/cpp-qt/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-qt/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/ApiClient.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/ApiClient.h index e1b953ec770d..284b8fc9d562 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/ApiClient.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/ApiClient.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/ApiConfiguration.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/ApiConfiguration.h index a3ad024d4662..99d17bf97ff3 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/ApiConfiguration.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/ApiConfiguration.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/ApiException.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/ApiException.h index f8d15e6c9f9f..56473cbab111 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/ApiException.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/ApiException.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/HttpContent.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/HttpContent.h index ce9279be0ea5..d31a36207ed5 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/HttpContent.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/HttpContent.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/IHttpBody.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/IHttpBody.h index b4f96ebb9935..6cdc358efb24 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/IHttpBody.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/IHttpBody.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/JsonBody.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/JsonBody.h index e24a496219f0..f72e6b0e3142 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/JsonBody.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/JsonBody.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/ModelBase.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/ModelBase.h index ef51aaba1620..0a949deda70e 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/ModelBase.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/ModelBase.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/MultipartFormData.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/MultipartFormData.h index 0c503f1f352d..359d5724b820 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/MultipartFormData.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/MultipartFormData.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/Object.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/Object.h index 324218526f9d..2442c30215e0 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/Object.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/Object.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/api/PetApi.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/api/PetApi.h index fd214fbd6aff..46ea7c76f6b6 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/api/PetApi.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/api/PetApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/api/StoreApi.h index 887e6329e397..10035ddec3e1 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/api/StoreApi.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/api/StoreApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/api/UserApi.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/api/UserApi.h index 0af31b91d577..56e0a3781c8f 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/api/UserApi.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/api/UserApi.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/ApiResponse.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/ApiResponse.h index 547a9adf51e0..91d184ad6442 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/ApiResponse.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/ApiResponse.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/Category.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/Category.h index d180c89b704e..298c8e91b7f7 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/Category.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/Category.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/Order.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/Order.h index acf74c4f0962..b3e7522e93cb 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/Order.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/Order.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/Pet.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/Pet.h index af1ce7e680f4..8e2a561850d1 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/Pet.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/Pet.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/Tag.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/Tag.h index b563980ecc7b..07277a065361 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/Tag.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/Tag.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/User.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/User.h index be87cd065d63..a007708179d2 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/User.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/model/User.h @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/src/ApiClient.cpp b/samples/client/petstore/cpp-restsdk/client/src/ApiClient.cpp index fc66a961269f..018a525ddcfa 100644 --- a/samples/client/petstore/cpp-restsdk/client/src/ApiClient.cpp +++ b/samples/client/petstore/cpp-restsdk/client/src/ApiClient.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/src/ApiConfiguration.cpp b/samples/client/petstore/cpp-restsdk/client/src/ApiConfiguration.cpp index dde02fead722..f846b798d104 100644 --- a/samples/client/petstore/cpp-restsdk/client/src/ApiConfiguration.cpp +++ b/samples/client/petstore/cpp-restsdk/client/src/ApiConfiguration.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/src/ApiException.cpp b/samples/client/petstore/cpp-restsdk/client/src/ApiException.cpp index f4cc63995aa5..532f1e4170b8 100644 --- a/samples/client/petstore/cpp-restsdk/client/src/ApiException.cpp +++ b/samples/client/petstore/cpp-restsdk/client/src/ApiException.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/src/HttpContent.cpp b/samples/client/petstore/cpp-restsdk/client/src/HttpContent.cpp index 8e4118f1d272..09e73ff9a255 100644 --- a/samples/client/petstore/cpp-restsdk/client/src/HttpContent.cpp +++ b/samples/client/petstore/cpp-restsdk/client/src/HttpContent.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/src/JsonBody.cpp b/samples/client/petstore/cpp-restsdk/client/src/JsonBody.cpp index 6226443dc779..f95a480ac278 100644 --- a/samples/client/petstore/cpp-restsdk/client/src/JsonBody.cpp +++ b/samples/client/petstore/cpp-restsdk/client/src/JsonBody.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/src/ModelBase.cpp b/samples/client/petstore/cpp-restsdk/client/src/ModelBase.cpp index 1dbad4c8e7c1..fcf0205f2bb6 100644 --- a/samples/client/petstore/cpp-restsdk/client/src/ModelBase.cpp +++ b/samples/client/petstore/cpp-restsdk/client/src/ModelBase.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/src/MultipartFormData.cpp b/samples/client/petstore/cpp-restsdk/client/src/MultipartFormData.cpp index 04c53406259f..08fbc30f9c2d 100644 --- a/samples/client/petstore/cpp-restsdk/client/src/MultipartFormData.cpp +++ b/samples/client/petstore/cpp-restsdk/client/src/MultipartFormData.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/src/Object.cpp b/samples/client/petstore/cpp-restsdk/client/src/Object.cpp index 0ad3264fa664..fb7551a948a8 100644 --- a/samples/client/petstore/cpp-restsdk/client/src/Object.cpp +++ b/samples/client/petstore/cpp-restsdk/client/src/Object.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/src/api/PetApi.cpp b/samples/client/petstore/cpp-restsdk/client/src/api/PetApi.cpp index bc99de9c2daa..2a285b939202 100644 --- a/samples/client/petstore/cpp-restsdk/client/src/api/PetApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/src/api/PetApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/src/api/StoreApi.cpp b/samples/client/petstore/cpp-restsdk/client/src/api/StoreApi.cpp index 920a152840df..b2bafc2f2604 100644 --- a/samples/client/petstore/cpp-restsdk/client/src/api/StoreApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/src/api/StoreApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/src/api/UserApi.cpp b/samples/client/petstore/cpp-restsdk/client/src/api/UserApi.cpp index a7272a980aac..831ce76515af 100644 --- a/samples/client/petstore/cpp-restsdk/client/src/api/UserApi.cpp +++ b/samples/client/petstore/cpp-restsdk/client/src/api/UserApi.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/src/model/ApiResponse.cpp b/samples/client/petstore/cpp-restsdk/client/src/model/ApiResponse.cpp index e825b0e6af08..9a4a5bb02b5b 100644 --- a/samples/client/petstore/cpp-restsdk/client/src/model/ApiResponse.cpp +++ b/samples/client/petstore/cpp-restsdk/client/src/model/ApiResponse.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/src/model/Category.cpp b/samples/client/petstore/cpp-restsdk/client/src/model/Category.cpp index e34dc8b09e68..76a3418a22f7 100644 --- a/samples/client/petstore/cpp-restsdk/client/src/model/Category.cpp +++ b/samples/client/petstore/cpp-restsdk/client/src/model/Category.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/src/model/Order.cpp b/samples/client/petstore/cpp-restsdk/client/src/model/Order.cpp index 5d54ecfda179..8378b61e1d8e 100644 --- a/samples/client/petstore/cpp-restsdk/client/src/model/Order.cpp +++ b/samples/client/petstore/cpp-restsdk/client/src/model/Order.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/src/model/Pet.cpp b/samples/client/petstore/cpp-restsdk/client/src/model/Pet.cpp index a0ef67f9cb5c..a09ea47067bc 100644 --- a/samples/client/petstore/cpp-restsdk/client/src/model/Pet.cpp +++ b/samples/client/petstore/cpp-restsdk/client/src/model/Pet.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/src/model/Tag.cpp b/samples/client/petstore/cpp-restsdk/client/src/model/Tag.cpp index 0a4b24637c1a..6de95c5dc3e4 100644 --- a/samples/client/petstore/cpp-restsdk/client/src/model/Tag.cpp +++ b/samples/client/petstore/cpp-restsdk/client/src/model/Tag.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/client/src/model/User.cpp b/samples/client/petstore/cpp-restsdk/client/src/model/User.cpp index 7191743e2c6c..e334238b7356 100644 --- a/samples/client/petstore/cpp-restsdk/client/src/model/User.cpp +++ b/samples/client/petstore/cpp-restsdk/client/src/model/User.cpp @@ -4,7 +4,7 @@ * * The version of the OpenAPI document: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-tiny/.openapi-generator/VERSION b/samples/client/petstore/cpp-tiny/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/cpp-tiny/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-tiny/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION b/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-ue4/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/crystal/.openapi-generator/VERSION b/samples/client/petstore/crystal/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/crystal/.openapi-generator/VERSION +++ b/samples/client/petstore/crystal/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/crystal/.travis.yml b/samples/client/petstore/crystal/.travis.yml index 4b9eac3c47fe..c285c4e30e95 100644 --- a/samples/client/petstore/crystal/.travis.yml +++ b/samples/client/petstore/crystal/.travis.yml @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # language: crystal diff --git a/samples/client/petstore/crystal/spec/spec_helper.cr b/samples/client/petstore/crystal/spec/spec_helper.cr index 7407ae746e86..755af40f6404 100644 --- a/samples/client/petstore/crystal/spec/spec_helper.cr +++ b/samples/client/petstore/crystal/spec/spec_helper.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # # load modules diff --git a/samples/client/petstore/crystal/src/petstore.cr b/samples/client/petstore/crystal/src/petstore.cr index 9a9e3b183e96..caa91d8003e5 100644 --- a/samples/client/petstore/crystal/src/petstore.cr +++ b/samples/client/petstore/crystal/src/petstore.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # # Dependencies diff --git a/samples/client/petstore/crystal/src/petstore/api/fake_api.cr b/samples/client/petstore/crystal/src/petstore/api/fake_api.cr index 7384f10d3cf5..d7e9f086c972 100644 --- a/samples/client/petstore/crystal/src/petstore/api/fake_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/fake_api.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # require "uri" diff --git a/samples/client/petstore/crystal/src/petstore/api/pet_api.cr b/samples/client/petstore/crystal/src/petstore/api/pet_api.cr index 0fdd674c1b73..d7a07d9f3b84 100644 --- a/samples/client/petstore/crystal/src/petstore/api/pet_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/pet_api.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # require "uri" diff --git a/samples/client/petstore/crystal/src/petstore/api/store_api.cr b/samples/client/petstore/crystal/src/petstore/api/store_api.cr index 843810c5425b..d3442846c9c3 100644 --- a/samples/client/petstore/crystal/src/petstore/api/store_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/store_api.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # require "uri" diff --git a/samples/client/petstore/crystal/src/petstore/api/user_api.cr b/samples/client/petstore/crystal/src/petstore/api/user_api.cr index 4d0fa95d57fa..5b026d093e0f 100644 --- a/samples/client/petstore/crystal/src/petstore/api/user_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/user_api.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # require "uri" diff --git a/samples/client/petstore/crystal/src/petstore/api_client.cr b/samples/client/petstore/crystal/src/petstore/api_client.cr index def16ccbd533..8eb88a4aff03 100644 --- a/samples/client/petstore/crystal/src/petstore/api_client.cr +++ b/samples/client/petstore/crystal/src/petstore/api_client.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # require "json" diff --git a/samples/client/petstore/crystal/src/petstore/api_error.cr b/samples/client/petstore/crystal/src/petstore/api_error.cr index 61d29ba2fc36..0c7c05edce90 100644 --- a/samples/client/petstore/crystal/src/petstore/api_error.cr +++ b/samples/client/petstore/crystal/src/petstore/api_error.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # module Petstore diff --git a/samples/client/petstore/crystal/src/petstore/configuration.cr b/samples/client/petstore/crystal/src/petstore/configuration.cr index 50f81dac0b33..f5180e27ae17 100644 --- a/samples/client/petstore/crystal/src/petstore/configuration.cr +++ b/samples/client/petstore/crystal/src/petstore/configuration.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # require "log" diff --git a/samples/client/petstore/crystal/src/petstore/models/another_property_name_mapping.cr b/samples/client/petstore/crystal/src/petstore/models/another_property_name_mapping.cr index f7ec0b657371..5e4d51f40d92 100644 --- a/samples/client/petstore/crystal/src/petstore/models/another_property_name_mapping.cr +++ b/samples/client/petstore/crystal/src/petstore/models/another_property_name_mapping.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # require "big" diff --git a/samples/client/petstore/crystal/src/petstore/models/api_response.cr b/samples/client/petstore/crystal/src/petstore/models/api_response.cr index 8d753689c969..d27fcc91c870 100644 --- a/samples/client/petstore/crystal/src/petstore/models/api_response.cr +++ b/samples/client/petstore/crystal/src/petstore/models/api_response.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # require "big" diff --git a/samples/client/petstore/crystal/src/petstore/models/category.cr b/samples/client/petstore/crystal/src/petstore/models/category.cr index d70e4720f9f5..3b4413c68886 100644 --- a/samples/client/petstore/crystal/src/petstore/models/category.cr +++ b/samples/client/petstore/crystal/src/petstore/models/category.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # require "big" diff --git a/samples/client/petstore/crystal/src/petstore/models/format_test.cr b/samples/client/petstore/crystal/src/petstore/models/format_test.cr index c927a4a73fe1..d6cdd192f76f 100644 --- a/samples/client/petstore/crystal/src/petstore/models/format_test.cr +++ b/samples/client/petstore/crystal/src/petstore/models/format_test.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # require "big" diff --git a/samples/client/petstore/crystal/src/petstore/models/order.cr b/samples/client/petstore/crystal/src/petstore/models/order.cr index c948a062580d..d6336cdfc81c 100644 --- a/samples/client/petstore/crystal/src/petstore/models/order.cr +++ b/samples/client/petstore/crystal/src/petstore/models/order.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # require "big" diff --git a/samples/client/petstore/crystal/src/petstore/models/pet.cr b/samples/client/petstore/crystal/src/petstore/models/pet.cr index 89d9781a792b..e13b80441bc4 100644 --- a/samples/client/petstore/crystal/src/petstore/models/pet.cr +++ b/samples/client/petstore/crystal/src/petstore/models/pet.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # require "big" diff --git a/samples/client/petstore/crystal/src/petstore/models/tag.cr b/samples/client/petstore/crystal/src/petstore/models/tag.cr index 454ae2ea6d6b..6b4a1270bc8c 100644 --- a/samples/client/petstore/crystal/src/petstore/models/tag.cr +++ b/samples/client/petstore/crystal/src/petstore/models/tag.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # require "big" diff --git a/samples/client/petstore/crystal/src/petstore/models/user.cr b/samples/client/petstore/crystal/src/petstore/models/user.cr index 28323df759b5..e1c9102df6e9 100644 --- a/samples/client/petstore/crystal/src/petstore/models/user.cr +++ b/samples/client/petstore/crystal/src/petstore/models/user.cr @@ -5,7 +5,7 @@ #The version of the OpenAPI document: 1.0.0 # #Generated by: https://openapi-generator.tech -#OpenAPI Generator version: 7.0.1-SNAPSHOT +#OpenAPI Generator version: 7.1.0-SNAPSHOT # require "big" diff --git a/samples/client/petstore/csharp-functions/.openapi-generator/VERSION b/samples/client/petstore/csharp-functions/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp-functions/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-functions/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp-restsharp-name-parameter-mappings/.openapi-generator/VERSION b/samples/client/petstore/csharp-restsharp-name-parameter-mappings/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp-restsharp-name-parameter-mappings/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp-restsharp-name-parameter-mappings/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient-ConditionalSerialization/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient-ConditionalSerialization/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-ConditionalSerialization/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient-ConditionalSerialization/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient-httpclient/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient-httpclient/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient-httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient-net47/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient-net47/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-net47/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient-net47/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient-net48/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient-net48/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-net48/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient-net48/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient-net5.0/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient-net5.0/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-net5.0/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient-net5.0/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient-unityWebRequest/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient-unityWebRequest/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp/OpenAPIClient-unityWebRequest/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient-unityWebRequest/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientCore/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientCore/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp/OpenAPIClientCore/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientCore/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/csharp/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/elixir/.openapi-generator/VERSION b/samples/client/petstore/elixir/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/elixir/.openapi-generator/VERSION +++ b/samples/client/petstore/elixir/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/api/another_fake.ex b/samples/client/petstore/elixir/lib/openapi_petstore/api/another_fake.ex index 1d6f457f1ecf..007d16552eb1 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/api/another_fake.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/api/another_fake.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Api.AnotherFake do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/api/default.ex b/samples/client/petstore/elixir/lib/openapi_petstore/api/default.ex index 66ac9fdc082c..d0f10334d062 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/api/default.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/api/default.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Api.Default do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex b/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex index 6cdb560634a2..250ad1f66564 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Api.Fake do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/api/fake_classname_tags123.ex b/samples/client/petstore/elixir/lib/openapi_petstore/api/fake_classname_tags123.ex index 15788bde8e5d..6da0d3be1df3 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/api/fake_classname_tags123.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/api/fake_classname_tags123.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Api.FakeClassnameTags123 do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/api/pet.ex b/samples/client/petstore/elixir/lib/openapi_petstore/api/pet.ex index a080582f4ad4..1dbb727febe2 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/api/pet.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/api/pet.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Api.Pet do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/api/store.ex b/samples/client/petstore/elixir/lib/openapi_petstore/api/store.ex index ae29e7c4e7b8..c60587f49d7a 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/api/store.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/api/store.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Api.Store do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/api/user.ex b/samples/client/petstore/elixir/lib/openapi_petstore/api/user.ex index 07484e8a9da2..f84ca7e672db 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/api/user.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/api/user.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Api.User do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/connection.ex b/samples/client/petstore/elixir/lib/openapi_petstore/connection.ex index aaface577220..1fddbba77b53 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/connection.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/connection.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Connection do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/deserializer.ex b/samples/client/petstore/elixir/lib/openapi_petstore/deserializer.ex index 19416aa4a1f3..1c9e374f52b2 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/deserializer.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/deserializer.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Deserializer do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/_foo_get_default_response.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/_foo_get_default_response.ex index 9e3e4ba41e3a..d3775b7937a5 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/_foo_get_default_response.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/_foo_get_default_response.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.FooGetDefaultResponse do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/_special_model_name_.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/_special_model_name_.ex index c79a2cda8157..43b89e8d0acb 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/_special_model_name_.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/_special_model_name_.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.SpecialModelName do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/additional_properties_class.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/additional_properties_class.ex index a37abd3e9994..660632d285df 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/additional_properties_class.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/additional_properties_class.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.AdditionalPropertiesClass do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/all_of_with_single_ref.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/all_of_with_single_ref.ex index 7589a63261f7..3e5e10907ec5 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/all_of_with_single_ref.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/all_of_with_single_ref.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.AllOfWithSingleRef do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/animal.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/animal.ex index e12d39594955..fcba046deb05 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/animal.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/animal.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.Animal do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/api_response.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/api_response.ex index 9a9863b02d41..beebbebb3881 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/api_response.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/api_response.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.ApiResponse do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/array_of_array_of_number_only.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/array_of_array_of_number_only.ex index a7fd9519146c..55f62fd8f177 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/array_of_array_of_number_only.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/array_of_array_of_number_only.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.ArrayOfArrayOfNumberOnly do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/array_of_number_only.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/array_of_number_only.ex index 3324c9325ec9..2872c887131a 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/array_of_number_only.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/array_of_number_only.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.ArrayOfNumberOnly do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/array_test.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/array_test.ex index 6e1c5073b48a..7197a294d86a 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/array_test.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/array_test.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.ArrayTest do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/capitalization.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/capitalization.ex index c293ebf447f0..7445d8f7f2a0 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/capitalization.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/capitalization.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.Capitalization do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/cat.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/cat.ex index d81378e8ade1..bba420aa9b1d 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/cat.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/cat.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.Cat do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/category.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/category.ex index 61e196ebea0e..9bc4642e5504 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/category.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/category.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.Category do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/child_with_nullable.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/child_with_nullable.ex index 850ce5cbdf43..5a207ce58a75 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/child_with_nullable.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/child_with_nullable.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.ChildWithNullable do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/class_model.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/class_model.ex index b8e2a636fef9..88e49dccf155 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/class_model.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/class_model.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.ClassModel do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/client.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/client.ex index 932fbf93402f..0cd1f348d0c0 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/client.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/client.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.Client do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/deprecated_model.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/deprecated_model.ex index e347be8e8a70..d1d93be32ac1 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/deprecated_model.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/deprecated_model.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.DeprecatedModel do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/dog.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/dog.ex index 4b71372061e4..9edf699b0e20 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/dog.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/dog.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.Dog do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/enum_arrays.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/enum_arrays.ex index e537505d15cb..07cbe2af5915 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/enum_arrays.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/enum_arrays.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.EnumArrays do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/enum_class.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/enum_class.ex index 885f542fb799..c3e9fc07636c 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/enum_class.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/enum_class.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.EnumClass do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/enum_test.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/enum_test.ex index 9c4ee2e92ee7..6aa656fc1236 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/enum_test.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/enum_test.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.EnumTest do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/fake_big_decimal_map_200_response.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/fake_big_decimal_map_200_response.ex index 2d91d3156c56..cfb01b199aec 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/fake_big_decimal_map_200_response.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/fake_big_decimal_map_200_response.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.FakeBigDecimalMap200Response do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/file.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/file.ex index 2709a257ad9c..61f3c77317ed 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/file.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/file.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.File do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/file_schema_test_class.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/file_schema_test_class.ex index 90059894f5cf..0aef62f4284a 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/file_schema_test_class.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/file_schema_test_class.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.FileSchemaTestClass do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/foo.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/foo.ex index 372516e16768..aa0b7ddb1fff 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/foo.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/foo.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.Foo do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/format_test.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/format_test.ex index 935fce08041d..753b6960c178 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/format_test.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/format_test.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.FormatTest do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/has_only_read_only.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/has_only_read_only.ex index 4d757fde6307..1c0b0901bb9b 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/has_only_read_only.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/has_only_read_only.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.HasOnlyReadOnly do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/health_check_result.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/health_check_result.ex index 986a33ef186c..c2c15f4fe05c 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/health_check_result.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/health_check_result.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.HealthCheckResult do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/list.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/list.ex index 7021d017b71c..cd7e140187fd 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/list.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/list.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.List do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/map_test.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/map_test.ex index c7af31d3c38f..5dd33cc3af1a 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/map_test.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/map_test.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.MapTest do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/mixed_properties_and_additional_properties_class.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/mixed_properties_and_additional_properties_class.ex index 0cd4b5844e69..69b2050d175e 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/mixed_properties_and_additional_properties_class.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/mixed_properties_and_additional_properties_class.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.MixedPropertiesAndAdditionalPropertiesClass do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/model_200_response.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/model_200_response.ex index 3d3ecdb63c29..d230806294ef 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/model_200_response.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/model_200_response.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.Model200Response do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/name.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/name.ex index 1741d51000a8..771e0b09b3aa 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/name.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/name.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.Name do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/nullable_class.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/nullable_class.ex index 391c03e3cd18..59b1db452a3e 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/nullable_class.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/nullable_class.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.NullableClass do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/number_only.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/number_only.ex index 49217cef8173..19fd1c90e597 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/number_only.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/number_only.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.NumberOnly do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/object_with_deprecated_fields.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/object_with_deprecated_fields.ex index 4231e112e653..4915918a007d 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/object_with_deprecated_fields.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/object_with_deprecated_fields.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.ObjectWithDeprecatedFields do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/order.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/order.ex index 3ca924b9faf9..f515b5351e8a 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/order.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/order.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.Order do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_composite.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_composite.ex index 554a06fa99dc..2a2dcf409c82 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_composite.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_composite.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.OuterComposite do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_enum.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_enum.ex index 8713cb5c4f47..310f5adf44f6 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_enum.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_enum.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.OuterEnum do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_enum_default_value.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_enum_default_value.ex index db1da1673c02..d6b453e0f6dc 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_enum_default_value.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_enum_default_value.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.OuterEnumDefaultValue do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_enum_integer.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_enum_integer.ex index fc58e8d4ffd0..fdd33826f0cd 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_enum_integer.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_enum_integer.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.OuterEnumInteger do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_enum_integer_default_value.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_enum_integer_default_value.ex index 76298c5a7efe..eba3740d13c6 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_enum_integer_default_value.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_enum_integer_default_value.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.OuterEnumIntegerDefaultValue do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_object_with_enum_property.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_object_with_enum_property.ex index 86bd0570cb7b..f4696158dfc5 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_object_with_enum_property.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/outer_object_with_enum_property.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.OuterObjectWithEnumProperty do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/parent_with_nullable.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/parent_with_nullable.ex index 8fc6d5113e8e..93e2de79946e 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/parent_with_nullable.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/parent_with_nullable.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.ParentWithNullable do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/pet.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/pet.ex index a0fadde83bb9..e9f47d3af33e 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/pet.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/pet.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.Pet do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/read_only_first.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/read_only_first.ex index 4cf4f716759a..365ae17605a1 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/read_only_first.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/read_only_first.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.ReadOnlyFirst do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/return.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/return.ex index 288b5222e9d9..1eb9d9f5d788 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/return.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/return.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.Return do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/single_ref_type.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/single_ref_type.ex index 835c0c4f9cf9..ce3654c9b9f2 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/single_ref_type.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/single_ref_type.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.SingleRefType do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/tag.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/tag.ex index 57c3827dfa06..93466fbb0d0c 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/tag.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/tag.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.Tag do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/user.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/user.ex index 5510609faae9..f19a639647bb 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/user.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/user.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.Model.User do diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/request_builder.ex b/samples/client/petstore/elixir/lib/openapi_petstore/request_builder.ex index a438188b082f..043b2a10247b 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/request_builder.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/request_builder.ex @@ -1,4 +1,4 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1-SNAPSHOT (https://openapi-generator.tech). +# NOTE: This file is auto generated by OpenAPI Generator 7.1.0-SNAPSHOT (https://openapi-generator.tech). # Do not edit this file manually. defmodule OpenapiPetstore.RequestBuilder do diff --git a/samples/client/petstore/elm/.openapi-generator/VERSION b/samples/client/petstore/elm/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/elm/.openapi-generator/VERSION +++ b/samples/client/petstore/elm/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/erlang-client/.openapi-generator/VERSION b/samples/client/petstore/erlang-client/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/erlang-client/.openapi-generator/VERSION +++ b/samples/client/petstore/erlang-client/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/erlang-proper/.openapi-generator/VERSION b/samples/client/petstore/erlang-proper/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/erlang-proper/.openapi-generator/VERSION +++ b/samples/client/petstore/erlang-proper/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/groovy/.openapi-generator/VERSION b/samples/client/petstore/groovy/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/groovy/.openapi-generator/VERSION +++ b/samples/client/petstore/groovy/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION +++ b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java-helidon-client/mp/.openapi-generator/VERSION b/samples/client/petstore/java-helidon-client/mp/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java-helidon-client/mp/.openapi-generator/VERSION +++ b/samples/client/petstore/java-helidon-client/mp/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java-helidon-client/se/.openapi-generator/VERSION b/samples/client/petstore/java-helidon-client/se/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java-helidon-client/se/.openapi-generator/VERSION +++ b/samples/client/petstore/java-helidon-client/se/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java-micronaut-client/.openapi-generator/VERSION b/samples/client/petstore/java-micronaut-client/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java-micronaut-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java-micronaut-client/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/apache-httpclient/.openapi-generator/VERSION b/samples/client/petstore/java/apache-httpclient/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/apache-httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/java/apache-httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/feign/.openapi-generator/VERSION b/samples/client/petstore/java/feign/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/feign/.openapi-generator/VERSION +++ b/samples/client/petstore/java/feign/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey3/.openapi-generator/VERSION b/samples/client/petstore/java/jersey3/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/jersey3/.openapi-generator/VERSION +++ b/samples/client/petstore/java/jersey3/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/.openapi-generator/VERSION b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/.openapi-generator/VERSION +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/.openapi-generator/VERSION b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/microprofile-rest-client-3.0-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/.openapi-generator/VERSION b/samples/client/petstore/java/microprofile-rest-client-3.0/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/.openapi-generator/VERSION +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION +++ b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/native-async/.openapi-generator/VERSION b/samples/client/petstore/java/native-async/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/native-async/.openapi-generator/VERSION +++ b/samples/client/petstore/java/native-async/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/native-jakarta/.openapi-generator/VERSION b/samples/client/petstore/java/native-jakarta/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/native-jakarta/.openapi-generator/VERSION +++ b/samples/client/petstore/java/native-jakarta/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/native/.openapi-generator/VERSION b/samples/client/petstore/java/native/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/native/.openapi-generator/VERSION +++ b/samples/client/petstore/java/native/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-3.1/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-3.1/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-3.1/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-awsv4signature/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-group-parameter/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-nullable-required/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-swagger1/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-swagger1/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-swagger2/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson-swagger2/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION +++ b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-jakarta/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate-jakarta/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/resttemplate-jakarta/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate-jakarta/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-swagger1/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate-swagger1/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate-swagger1/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-swagger2/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate-swagger2/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/resttemplate-swagger2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate-swagger2/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION +++ b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION +++ b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/vertx/.openapi-generator/VERSION b/samples/client/petstore/java/vertx/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/vertx/.openapi-generator/VERSION +++ b/samples/client/petstore/java/vertx/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/webclient-jakarta/.openapi-generator/VERSION b/samples/client/petstore/java/webclient-jakarta/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/webclient-jakarta/.openapi-generator/VERSION +++ b/samples/client/petstore/java/webclient-jakarta/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/webclient-nullable-arrays/.openapi-generator/VERSION b/samples/client/petstore/java/webclient-nullable-arrays/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/webclient-nullable-arrays/.openapi-generator/VERSION +++ b/samples/client/petstore/java/webclient-nullable-arrays/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/webclient-swagger2/.openapi-generator/VERSION b/samples/client/petstore/java/webclient-swagger2/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/webclient-swagger2/.openapi-generator/VERSION +++ b/samples/client/petstore/java/webclient-swagger2/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/webclient/.openapi-generator/VERSION b/samples/client/petstore/java/webclient/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/java/webclient/.openapi-generator/VERSION +++ b/samples/client/petstore/java/webclient/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-apollo/.openapi-generator/VERSION b/samples/client/petstore/javascript-apollo/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/javascript-apollo/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-apollo/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/jetbrains/http/client/.openapi-generator/VERSION b/samples/client/petstore/jetbrains/http/client/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/jetbrains/http/client/.openapi-generator/VERSION +++ b/samples/client/petstore/jetbrains/http/client/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/julia/.openapi-generator/VERSION b/samples/client/petstore/julia/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/julia/.openapi-generator/VERSION +++ b/samples/client/petstore/julia/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/k6/.openapi-generator/VERSION b/samples/client/petstore/k6/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/k6/.openapi-generator/VERSION +++ b/samples/client/petstore/k6/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/k6/script.js b/samples/client/petstore/k6/script.js index 1416fe64534b..2805043984b3 100644 --- a/samples/client/petstore/k6/script.js +++ b/samples/client/petstore/k6/script.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by OpenAPI Generator. * https://github.com/OpenAPITools/openapi-generator * - * OpenAPI generator version: 7.0.1-SNAPSHOT + * OpenAPI generator version: 7.1.0-SNAPSHOT */ diff --git a/samples/client/petstore/kotlin-allOff-discriminator/.openapi-generator/VERSION b/samples/client/petstore/kotlin-allOff-discriminator/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-allOff-discriminator/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-allOff-discriminator/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/.openapi-generator/VERSION b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-volley/.openapi-generator/VERSION b/samples/client/petstore/kotlin-array-simple-string-jvm-volley/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-volley/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-volley/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/.openapi-generator/VERSION b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-default-values-jvm-okhttp3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-default-values-jvm-okhttp3/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-okhttp3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-default-values-jvm-okhttp3/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/.openapi-generator/VERSION b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/.openapi-generator/VERSION b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-default-values-jvm-volley/.openapi-generator/VERSION b/samples/client/petstore/kotlin-default-values-jvm-volley/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-volley/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-default-values-jvm-volley/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-default-values-multiplatform/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-default-values-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-default-values-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION b/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-jackson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-jackson/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-jvm-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-ktor-gson/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-ktor-jackson/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-spring-2-webclient/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-spring-2-webclient/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-jvm-spring-2-webclient/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-spring-2-webclient/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-spring-3-webclient/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-spring-3-webclient/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-jvm-spring-3-webclient/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-spring-3-webclient/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-vertx-gson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-vertx-gson/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-vertx-gson/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-vertx-jackson/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-vertx-moshi/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-vertx-moshi/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-moshi/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-vertx-moshi/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION b/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-name-parameter-mappings/.openapi-generator/VERSION b/samples/client/petstore/kotlin-name-parameter-mappings/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-name-parameter-mappings/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-name-parameter-mappings/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-spring-cloud/.openapi-generator/VERSION b/samples/client/petstore/kotlin-spring-cloud/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-spring-cloud/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-spring-cloud/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/client/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/api/PetApi.kt index 573e96f58e54..041070035f28 100644 --- a/samples/client/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/client/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/client/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/api/StoreApi.kt index 0a13ff60621f..a40bc742e05b 100644 --- a/samples/client/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/client/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/client/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/api/UserApi.kt index 03776cac247d..53b260d309dc 100644 --- a/samples/client/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/client/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin/.openapi-generator/VERSION b/samples/client/petstore/kotlin/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/kotlin/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/lua/.openapi-generator/VERSION b/samples/client/petstore/lua/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/lua/.openapi-generator/VERSION +++ b/samples/client/petstore/lua/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/n4js/.openapi-generator/VERSION b/samples/client/petstore/n4js/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/n4js/.openapi-generator/VERSION +++ b/samples/client/petstore/n4js/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/nim/.openapi-generator/VERSION b/samples/client/petstore/nim/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/nim/.openapi-generator/VERSION +++ b/samples/client/petstore/nim/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/objc/default/.openapi-generator/VERSION b/samples/client/petstore/objc/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/objc/default/.openapi-generator/VERSION +++ b/samples/client/petstore/objc/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/perl/.openapi-generator/VERSION b/samples/client/petstore/perl/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/perl/.openapi-generator/VERSION +++ b/samples/client/petstore/perl/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php-dt-modern/.openapi-generator/VERSION b/samples/client/petstore/php-dt-modern/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/php-dt-modern/.openapi-generator/VERSION +++ b/samples/client/petstore/php-dt-modern/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php-dt/.openapi-generator/VERSION b/samples/client/petstore/php-dt/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/php-dt/.openapi-generator/VERSION +++ b/samples/client/petstore/php-dt/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/VERSION b/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/VERSION +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php index 2206e9a2024c..e259016a09a4 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php index 7c5a10eb263c..ba6ac9872102 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php index 54e19d6cf9c6..dc4cc21b651a 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php index 70c47191e2e1..4979985740e4 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php index 7676dee8ab43..9253eebede95 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php index 904d710f3185..3298c726048f 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php index 12603dd791ef..54a4bc7dae2a 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ApiException.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ApiException.php index 048cf638bf9b..bd428b9eb039 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ApiException.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ApiException.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Configuration.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Configuration.php index ff0951a22250..701855bd52ac 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Configuration.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Configuration.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/HeaderSelector.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/HeaderSelector.php index b6390af4bb37..fd1f9f042799 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/HeaderSelector.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/HeaderSelector.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AdditionalPropertiesClass.php index 145d4affc919..1782451b59f7 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AdditionalPropertiesClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AllOfWithSingleRef.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AllOfWithSingleRef.php index 7a4f2445f31f..8927c5bdbea7 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AllOfWithSingleRef.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AllOfWithSingleRef.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Animal.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Animal.php index 9f0c964013b1..0dc131bc96e6 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Animal.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Animal.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ApiResponse.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ApiResponse.php index ce286af3024e..9cce32744d67 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ApiResponse.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ApiResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayOfArrayOfNumberOnly.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayOfArrayOfNumberOnly.php index 87f804f67e4e..4f1eb9a738fb 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayOfArrayOfNumberOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayOfNumberOnly.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayOfNumberOnly.php index da1c1a6622fe..08cb3caa16f7 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayOfNumberOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayTest.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayTest.php index e73fbb59a672..d58cccb12feb 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayTest.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Capitalization.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Capitalization.php index f7221de6b11d..c2b0f6152a35 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Capitalization.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Capitalization.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Cat.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Cat.php index 0183dad2756b..43620e272a4c 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Cat.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Cat.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Category.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Category.php index 7f70a293a091..48528946ef76 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Category.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Category.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ChildWithNullable.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ChildWithNullable.php index 1dea6bea779e..1fcbc2e09d90 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ChildWithNullable.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ChildWithNullable.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ClassModel.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ClassModel.php index a2fc5f2c86dd..0b3a7942aa10 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ClassModel.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ClassModel.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Client.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Client.php index 5b92fb7c9923..88317689171d 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Client.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Client.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/DeprecatedObject.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/DeprecatedObject.php index 2d78c59409b6..468b61db5b2e 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/DeprecatedObject.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/DeprecatedObject.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Dog.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Dog.php index 0849f774c4a6..4828f0c39327 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Dog.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Dog.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumArrays.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumArrays.php index e2c1bc834b73..9ab84b8a1290 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumArrays.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumArrays.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumClass.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumClass.php index 328f4f330d2a..9b51506bd217 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumClass.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumTest.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumTest.php index 8bbef40fb09a..66e1e015d035 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumTest.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FakeBigDecimalMap200Response.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FakeBigDecimalMap200Response.php index 8c58d57dc985..7e0e2b6352a9 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FakeBigDecimalMap200Response.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FakeBigDecimalMap200Response.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/File.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/File.php index 8a8217ce05a3..4f4e3273d2e6 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/File.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/File.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FileSchemaTestClass.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FileSchemaTestClass.php index fce6e591535a..25f3dc7dbe7a 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FileSchemaTestClass.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FileSchemaTestClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Foo.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Foo.php index 24286e79b983..ccc42ff91fa1 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Foo.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Foo.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FooGetDefaultResponse.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FooGetDefaultResponse.php index 84f920e618ee..c25eb3b7805b 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FooGetDefaultResponse.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FooGetDefaultResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FormatTest.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FormatTest.php index b76ecad44e80..c52bf088c151 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FormatTest.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FormatTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/HasOnlyReadOnly.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/HasOnlyReadOnly.php index 7b7e3d028c96..23f30409c28b 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/HasOnlyReadOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/HealthCheckResult.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/HealthCheckResult.php index 9bc9e6937f4c..6286cc83af42 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/HealthCheckResult.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/HealthCheckResult.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/MapTest.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/MapTest.php index f40033082713..2ba97b3e2d84 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/MapTest.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/MapTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/MixedPropertiesAndAdditionalPropertiesClass.php index 0028b5daa639..90874d86fa59 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Model200Response.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Model200Response.php index 0a5cdaa52676..647865ce67d7 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Model200Response.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Model200Response.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelInterface.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelInterface.php index 125f6998e66b..16890572ca58 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelInterface.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelInterface.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelList.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelList.php index bac4c2ac3d3b..6bd8e64b26ca 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelList.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelList.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelReturn.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelReturn.php index 6e1b6da9ef71..a61313b07c37 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelReturn.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelReturn.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Name.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Name.php index 8e1cfb06f0a9..f414b0e01b50 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Name.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Name.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/NullableClass.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/NullableClass.php index e5cd2620ef05..53b9a916a90d 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/NullableClass.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/NullableClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/NumberOnly.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/NumberOnly.php index c5fcaefa68e8..1a2cc3e0e5ed 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/NumberOnly.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/NumberOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ObjectWithDeprecatedFields.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ObjectWithDeprecatedFields.php index 8ae2a37551f2..da7ddfa5d6e2 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ObjectWithDeprecatedFields.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ObjectWithDeprecatedFields.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Order.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Order.php index 3178891e58e6..ac26e9bad946 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Order.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Order.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterComposite.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterComposite.php index f31462bd4a75..329faff8f00f 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterComposite.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterComposite.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnum.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnum.php index ed5aa962f71a..dafbcd8382de 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnum.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnum.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumDefaultValue.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumDefaultValue.php index 334410e862e3..eab68522e37f 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumDefaultValue.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumDefaultValue.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumInteger.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumInteger.php index 83013b84235b..eea4a8e08235 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumInteger.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumInteger.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumIntegerDefaultValue.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumIntegerDefaultValue.php index d841179ebe74..bce7902ff936 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumIntegerDefaultValue.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterEnumIntegerDefaultValue.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterObjectWithEnumProperty.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterObjectWithEnumProperty.php index 949df8c4b337..a6f0600d3590 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterObjectWithEnumProperty.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterObjectWithEnumProperty.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ParentWithNullable.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ParentWithNullable.php index e000ef7cf5f0..b58ad2ee964f 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ParentWithNullable.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ParentWithNullable.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Pet.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Pet.php index e82a042ede52..5e9a1db20fec 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Pet.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Pet.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ReadOnlyFirst.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ReadOnlyFirst.php index 35fe4d4343b2..c94b375ff311 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ReadOnlyFirst.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/SingleRefType.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/SingleRefType.php index 877fa704faef..4a800088fca6 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/SingleRefType.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/SingleRefType.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/SpecialModelName.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/SpecialModelName.php index a409f785eb81..c8856cb6a998 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/SpecialModelName.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/SpecialModelName.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Tag.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Tag.php index c8295601b848..8f1d73c93897 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Tag.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Tag.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/User.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/User.php index c8a8f03df1c7..a2f173dd0b22 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/User.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/User.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php index 55eeaaded916..242ce5910d66 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * @generated Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION +++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index bc1609f77376..d93207e06b3f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php index 33c9464c5bb4..e947bae0eebb 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index 4437636140c7..8665f33c1940 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index 0de50a72d27a..965f6491cd50 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index c7a6b9f5186e..735bd078f5c4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index 759e29666b80..712c7fbb6235 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index e70d3f6633bd..d808edb0f887 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php index 38b28476c92b..f1b4b4bbf6db 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php index 2d79593b41cc..c8a68ba11552 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php index 959a2e43093d..98c657508c13 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php index 551ac9dc3cb6..7ad01ecd87a5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AllOfWithSingleRef.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AllOfWithSingleRef.php index b85fafbabc91..b9d8b96c7ace 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AllOfWithSingleRef.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AllOfWithSingleRef.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php index 246abd736791..2578fe0fdcde 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php index caff0e0ad2cd..2c48180de022 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php index 86d4e08bc497..8a88346fef3c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php index 386414950aca..2bd26e01a049 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php index 49ccaa41bd88..4775338d3be3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php index 202eed096c30..ac9039f763f1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php index 14c508f8b459..330cd4445738 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php index 8d68d99ffb0f..ca975413f2c7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php index f5a462d92f89..3126e15e0dff 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php index 28cb52de8642..fab8874792bb 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php index 97b6a9455405..0b7794b5602d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php index cf2d99f40670..91ae32cd75c6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php index c6a3b9e78694..76548ed1e732 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php index 0253ef878329..564dad7bf507 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php index 8e1389e22548..8dbd8ad634d2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FakeBigDecimalMap200Response.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FakeBigDecimalMap200Response.php index 597b9ee2b26e..204e9af87d7b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FakeBigDecimalMap200Response.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FakeBigDecimalMap200Response.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php index e19edabd4be4..6f8e747ee27f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php index f81ce61d39f9..597666bf3e0a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php index e5f67e81053c..1c062093489e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FooGetDefaultResponse.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FooGetDefaultResponse.php index d75c50ada277..6eb0f77907da 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FooGetDefaultResponse.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FooGetDefaultResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php index 526e4e14c73c..f61d401cbe69 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php index d8cc4f460d9a..3904eeb5b931 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php index 9c10cf7b1e68..d5ead08d64b4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php index a255800bd60c..957c8d631014 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index 9afcc8ce3a3a..9ee00c9ef0f7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php index 3f6d2a6c6b6c..ea45ce3dc86d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php index eaa39f2b5822..a76ce2e767ba 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php index 1b69f8e8c1e0..1b1cc8987a2c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php index 34fb813a023b..5337c680bb35 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php index eaad7ce40c9b..d87e2df9b50f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php index 8f5cd289e725..30c50185b2c8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php index 62ee51f32ee9..bb529455e718 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php index eccdad877125..3f0c6a61c8bb 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php index abe4590a14de..502b8bbc944a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php index 9b0275346a41..4d8bc042776a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php index 4f9901b6492c..1853560c9003 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php index 26e8565f18f1..7fab44f133f9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php index a7ef8e394ea2..cd1f81768b34 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php index 111edd8b555b..fdfd64c90050 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php index 43bca223fd09..dc1ae0ca9977 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php index 93e3ffac8cb7..8075da54d28c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/PropertyNameMapping.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/PropertyNameMapping.php index 158d099a3462..e97fa27d01b4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/PropertyNameMapping.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/PropertyNameMapping.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php index 221c9165c7e3..9d0e8cd97a8a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SingleRefType.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SingleRefType.php index 036d8266a6e0..5f579dcbc944 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SingleRefType.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SingleRefType.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php index 3a90f2dfda68..61906b54f35a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php index 7e9dd1e89799..f016bc201443 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php index 8cc14fd9c191..f78bfc93a3f8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index 09e437a0f451..8398f415c99c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/.openapi-generator/VERSION b/samples/client/petstore/php/psr-18/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/php/psr-18/.openapi-generator/VERSION +++ b/samples/client/petstore/php/psr-18/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/php/psr-18/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/psr-18/lib/Api/AnotherFakeApi.php index 25b6057e344f..4fb4ac27b0f0 100644 --- a/samples/client/petstore/php/psr-18/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/psr-18/lib/Api/AnotherFakeApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Api/DefaultApi.php b/samples/client/petstore/php/psr-18/lib/Api/DefaultApi.php index def16b365f27..baf6b5fd79cd 100644 --- a/samples/client/petstore/php/psr-18/lib/Api/DefaultApi.php +++ b/samples/client/petstore/php/psr-18/lib/Api/DefaultApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Api/FakeApi.php b/samples/client/petstore/php/psr-18/lib/Api/FakeApi.php index 8197e87cc492..0d559c958a0c 100644 --- a/samples/client/petstore/php/psr-18/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/psr-18/lib/Api/FakeApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php/psr-18/lib/Api/FakeClassnameTags123Api.php index c342b27894b9..d9529fa7826d 100644 --- a/samples/client/petstore/php/psr-18/lib/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php/psr-18/lib/Api/FakeClassnameTags123Api.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Api/PetApi.php b/samples/client/petstore/php/psr-18/lib/Api/PetApi.php index c3afdecf9e64..932814cf2c75 100644 --- a/samples/client/petstore/php/psr-18/lib/Api/PetApi.php +++ b/samples/client/petstore/php/psr-18/lib/Api/PetApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Api/StoreApi.php b/samples/client/petstore/php/psr-18/lib/Api/StoreApi.php index a963b016b5b8..9880aa789c9e 100644 --- a/samples/client/petstore/php/psr-18/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/psr-18/lib/Api/StoreApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Api/UserApi.php b/samples/client/petstore/php/psr-18/lib/Api/UserApi.php index 72fe58cd9f5d..f5ace7d71bd4 100644 --- a/samples/client/petstore/php/psr-18/lib/Api/UserApi.php +++ b/samples/client/petstore/php/psr-18/lib/Api/UserApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/ApiException.php b/samples/client/petstore/php/psr-18/lib/ApiException.php index 8275cbb176bd..1d27742e67ca 100644 --- a/samples/client/petstore/php/psr-18/lib/ApiException.php +++ b/samples/client/petstore/php/psr-18/lib/ApiException.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Configuration.php b/samples/client/petstore/php/psr-18/lib/Configuration.php index 2d79593b41cc..c8a68ba11552 100644 --- a/samples/client/petstore/php/psr-18/lib/Configuration.php +++ b/samples/client/petstore/php/psr-18/lib/Configuration.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/DebugPlugin.php b/samples/client/petstore/php/psr-18/lib/DebugPlugin.php index e08dfe8249ae..8cdce5e92487 100644 --- a/samples/client/petstore/php/psr-18/lib/DebugPlugin.php +++ b/samples/client/petstore/php/psr-18/lib/DebugPlugin.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/HeaderSelector.php b/samples/client/petstore/php/psr-18/lib/HeaderSelector.php index 959a2e43093d..98c657508c13 100644 --- a/samples/client/petstore/php/psr-18/lib/HeaderSelector.php +++ b/samples/client/petstore/php/psr-18/lib/HeaderSelector.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php/psr-18/lib/Model/AdditionalPropertiesClass.php index 551ac9dc3cb6..7ad01ecd87a5 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/psr-18/lib/Model/AdditionalPropertiesClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/AllOfWithSingleRef.php b/samples/client/petstore/php/psr-18/lib/Model/AllOfWithSingleRef.php index b85fafbabc91..b9d8b96c7ace 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/AllOfWithSingleRef.php +++ b/samples/client/petstore/php/psr-18/lib/Model/AllOfWithSingleRef.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/Animal.php b/samples/client/petstore/php/psr-18/lib/Model/Animal.php index 246abd736791..2578fe0fdcde 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/Animal.php +++ b/samples/client/petstore/php/psr-18/lib/Model/Animal.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/ApiResponse.php b/samples/client/petstore/php/psr-18/lib/Model/ApiResponse.php index caff0e0ad2cd..2c48180de022 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/psr-18/lib/Model/ApiResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/client/petstore/php/psr-18/lib/Model/ArrayOfArrayOfNumberOnly.php index 86d4e08bc497..8a88346fef3c 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php/psr-18/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/ArrayOfNumberOnly.php b/samples/client/petstore/php/psr-18/lib/Model/ArrayOfNumberOnly.php index 386414950aca..2bd26e01a049 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php/psr-18/lib/Model/ArrayOfNumberOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/ArrayTest.php b/samples/client/petstore/php/psr-18/lib/Model/ArrayTest.php index 49ccaa41bd88..4775338d3be3 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/ArrayTest.php +++ b/samples/client/petstore/php/psr-18/lib/Model/ArrayTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/Capitalization.php b/samples/client/petstore/php/psr-18/lib/Model/Capitalization.php index 202eed096c30..ac9039f763f1 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/Capitalization.php +++ b/samples/client/petstore/php/psr-18/lib/Model/Capitalization.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/Cat.php b/samples/client/petstore/php/psr-18/lib/Model/Cat.php index 14c508f8b459..330cd4445738 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/Cat.php +++ b/samples/client/petstore/php/psr-18/lib/Model/Cat.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/Category.php b/samples/client/petstore/php/psr-18/lib/Model/Category.php index 8d68d99ffb0f..ca975413f2c7 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/Category.php +++ b/samples/client/petstore/php/psr-18/lib/Model/Category.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/ClassModel.php b/samples/client/petstore/php/psr-18/lib/Model/ClassModel.php index f5a462d92f89..3126e15e0dff 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/ClassModel.php +++ b/samples/client/petstore/php/psr-18/lib/Model/ClassModel.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/Client.php b/samples/client/petstore/php/psr-18/lib/Model/Client.php index 28cb52de8642..fab8874792bb 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/Client.php +++ b/samples/client/petstore/php/psr-18/lib/Model/Client.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/DeprecatedObject.php b/samples/client/petstore/php/psr-18/lib/Model/DeprecatedObject.php index 97b6a9455405..0b7794b5602d 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/DeprecatedObject.php +++ b/samples/client/petstore/php/psr-18/lib/Model/DeprecatedObject.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/Dog.php b/samples/client/petstore/php/psr-18/lib/Model/Dog.php index cf2d99f40670..91ae32cd75c6 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/Dog.php +++ b/samples/client/petstore/php/psr-18/lib/Model/Dog.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/EnumArrays.php b/samples/client/petstore/php/psr-18/lib/Model/EnumArrays.php index c6a3b9e78694..76548ed1e732 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/EnumArrays.php +++ b/samples/client/petstore/php/psr-18/lib/Model/EnumArrays.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/EnumClass.php b/samples/client/petstore/php/psr-18/lib/Model/EnumClass.php index 0253ef878329..564dad7bf507 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/EnumClass.php +++ b/samples/client/petstore/php/psr-18/lib/Model/EnumClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/EnumTest.php b/samples/client/petstore/php/psr-18/lib/Model/EnumTest.php index 8e1389e22548..8dbd8ad634d2 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/psr-18/lib/Model/EnumTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/FakeBigDecimalMap200Response.php b/samples/client/petstore/php/psr-18/lib/Model/FakeBigDecimalMap200Response.php index 597b9ee2b26e..204e9af87d7b 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/FakeBigDecimalMap200Response.php +++ b/samples/client/petstore/php/psr-18/lib/Model/FakeBigDecimalMap200Response.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/File.php b/samples/client/petstore/php/psr-18/lib/Model/File.php index e19edabd4be4..6f8e747ee27f 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/File.php +++ b/samples/client/petstore/php/psr-18/lib/Model/File.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/FileSchemaTestClass.php b/samples/client/petstore/php/psr-18/lib/Model/FileSchemaTestClass.php index f81ce61d39f9..597666bf3e0a 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/FileSchemaTestClass.php +++ b/samples/client/petstore/php/psr-18/lib/Model/FileSchemaTestClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/Foo.php b/samples/client/petstore/php/psr-18/lib/Model/Foo.php index e5f67e81053c..1c062093489e 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/Foo.php +++ b/samples/client/petstore/php/psr-18/lib/Model/Foo.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/FooGetDefaultResponse.php b/samples/client/petstore/php/psr-18/lib/Model/FooGetDefaultResponse.php index d75c50ada277..6eb0f77907da 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/FooGetDefaultResponse.php +++ b/samples/client/petstore/php/psr-18/lib/Model/FooGetDefaultResponse.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/FormatTest.php b/samples/client/petstore/php/psr-18/lib/Model/FormatTest.php index 526e4e14c73c..f61d401cbe69 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/psr-18/lib/Model/FormatTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/HasOnlyReadOnly.php b/samples/client/petstore/php/psr-18/lib/Model/HasOnlyReadOnly.php index d8cc4f460d9a..3904eeb5b931 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php/psr-18/lib/Model/HasOnlyReadOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/HealthCheckResult.php b/samples/client/petstore/php/psr-18/lib/Model/HealthCheckResult.php index 9c10cf7b1e68..d5ead08d64b4 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/HealthCheckResult.php +++ b/samples/client/petstore/php/psr-18/lib/Model/HealthCheckResult.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/MapTest.php b/samples/client/petstore/php/psr-18/lib/Model/MapTest.php index a255800bd60c..957c8d631014 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/MapTest.php +++ b/samples/client/petstore/php/psr-18/lib/Model/MapTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/client/petstore/php/psr-18/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index 9afcc8ce3a3a..9ee00c9ef0f7 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php/psr-18/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/Model200Response.php b/samples/client/petstore/php/psr-18/lib/Model/Model200Response.php index 3f6d2a6c6b6c..ea45ce3dc86d 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/psr-18/lib/Model/Model200Response.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/ModelInterface.php b/samples/client/petstore/php/psr-18/lib/Model/ModelInterface.php index eaa39f2b5822..a76ce2e767ba 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/ModelInterface.php +++ b/samples/client/petstore/php/psr-18/lib/Model/ModelInterface.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/ModelList.php b/samples/client/petstore/php/psr-18/lib/Model/ModelList.php index 1b69f8e8c1e0..1b1cc8987a2c 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/ModelList.php +++ b/samples/client/petstore/php/psr-18/lib/Model/ModelList.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/ModelReturn.php b/samples/client/petstore/php/psr-18/lib/Model/ModelReturn.php index 34fb813a023b..5337c680bb35 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/psr-18/lib/Model/ModelReturn.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/Name.php b/samples/client/petstore/php/psr-18/lib/Model/Name.php index eaad7ce40c9b..d87e2df9b50f 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/Name.php +++ b/samples/client/petstore/php/psr-18/lib/Model/Name.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/NullableClass.php b/samples/client/petstore/php/psr-18/lib/Model/NullableClass.php index 8f5cd289e725..30c50185b2c8 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/NullableClass.php +++ b/samples/client/petstore/php/psr-18/lib/Model/NullableClass.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/NumberOnly.php b/samples/client/petstore/php/psr-18/lib/Model/NumberOnly.php index 62ee51f32ee9..bb529455e718 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/NumberOnly.php +++ b/samples/client/petstore/php/psr-18/lib/Model/NumberOnly.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/ObjectWithDeprecatedFields.php b/samples/client/petstore/php/psr-18/lib/Model/ObjectWithDeprecatedFields.php index eccdad877125..3f0c6a61c8bb 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/ObjectWithDeprecatedFields.php +++ b/samples/client/petstore/php/psr-18/lib/Model/ObjectWithDeprecatedFields.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/Order.php b/samples/client/petstore/php/psr-18/lib/Model/Order.php index abe4590a14de..502b8bbc944a 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/Order.php +++ b/samples/client/petstore/php/psr-18/lib/Model/Order.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/OuterComposite.php b/samples/client/petstore/php/psr-18/lib/Model/OuterComposite.php index 9b0275346a41..4d8bc042776a 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/OuterComposite.php +++ b/samples/client/petstore/php/psr-18/lib/Model/OuterComposite.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/OuterEnum.php b/samples/client/petstore/php/psr-18/lib/Model/OuterEnum.php index 4f9901b6492c..1853560c9003 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/OuterEnum.php +++ b/samples/client/petstore/php/psr-18/lib/Model/OuterEnum.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/OuterEnumDefaultValue.php b/samples/client/petstore/php/psr-18/lib/Model/OuterEnumDefaultValue.php index 26e8565f18f1..7fab44f133f9 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/OuterEnumDefaultValue.php +++ b/samples/client/petstore/php/psr-18/lib/Model/OuterEnumDefaultValue.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/OuterEnumInteger.php b/samples/client/petstore/php/psr-18/lib/Model/OuterEnumInteger.php index a7ef8e394ea2..cd1f81768b34 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/OuterEnumInteger.php +++ b/samples/client/petstore/php/psr-18/lib/Model/OuterEnumInteger.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/OuterEnumIntegerDefaultValue.php b/samples/client/petstore/php/psr-18/lib/Model/OuterEnumIntegerDefaultValue.php index 111edd8b555b..fdfd64c90050 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/OuterEnumIntegerDefaultValue.php +++ b/samples/client/petstore/php/psr-18/lib/Model/OuterEnumIntegerDefaultValue.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/OuterObjectWithEnumProperty.php b/samples/client/petstore/php/psr-18/lib/Model/OuterObjectWithEnumProperty.php index 43bca223fd09..dc1ae0ca9977 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/OuterObjectWithEnumProperty.php +++ b/samples/client/petstore/php/psr-18/lib/Model/OuterObjectWithEnumProperty.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/Pet.php b/samples/client/petstore/php/psr-18/lib/Model/Pet.php index 93e3ffac8cb7..8075da54d28c 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/Pet.php +++ b/samples/client/petstore/php/psr-18/lib/Model/Pet.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/PropertyNameMapping.php b/samples/client/petstore/php/psr-18/lib/Model/PropertyNameMapping.php index 158d099a3462..e97fa27d01b4 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/PropertyNameMapping.php +++ b/samples/client/petstore/php/psr-18/lib/Model/PropertyNameMapping.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/ReadOnlyFirst.php b/samples/client/petstore/php/psr-18/lib/Model/ReadOnlyFirst.php index 221c9165c7e3..9d0e8cd97a8a 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php/psr-18/lib/Model/ReadOnlyFirst.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/SingleRefType.php b/samples/client/petstore/php/psr-18/lib/Model/SingleRefType.php index 036d8266a6e0..5f579dcbc944 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/SingleRefType.php +++ b/samples/client/petstore/php/psr-18/lib/Model/SingleRefType.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/SpecialModelName.php b/samples/client/petstore/php/psr-18/lib/Model/SpecialModelName.php index 3a90f2dfda68..61906b54f35a 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/psr-18/lib/Model/SpecialModelName.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/Tag.php b/samples/client/petstore/php/psr-18/lib/Model/Tag.php index 7e9dd1e89799..f016bc201443 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/Tag.php +++ b/samples/client/petstore/php/psr-18/lib/Model/Tag.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/Model/User.php b/samples/client/petstore/php/psr-18/lib/Model/User.php index 8cc14fd9c191..f78bfc93a3f8 100644 --- a/samples/client/petstore/php/psr-18/lib/Model/User.php +++ b/samples/client/petstore/php/psr-18/lib/Model/User.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php b/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php index 09e437a0f451..8398f415c99c 100644 --- a/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * OpenAPI Generator version: 7.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/powershell/.openapi-generator/VERSION b/samples/client/petstore/powershell/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/powershell/.openapi-generator/VERSION +++ b/samples/client/petstore/powershell/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby-autoload/.openapi-generator/VERSION b/samples/client/petstore/ruby-autoload/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/ruby-autoload/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby-autoload/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby-autoload/lib/petstore.rb b/samples/client/petstore/ruby-autoload/lib/petstore.rb index c4354c2b3123..72b626acd2ee 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby-autoload/lib/petstore/api/another_fake_api.rb index f86495d11a51..a3bdc5af0bfc 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/api/another_fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby-autoload/lib/petstore/api/default_api.rb index 1162a0fbaec9..f9fc19208aae 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/api/default_api.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/api/default_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb index 06e12cd00e55..3e90201ee0fa 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_classname_tags123_api.rb index 84c83d1ecdd4..3665b1137909 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby-autoload/lib/petstore/api/pet_api.rb index f9f9c9d15b92..9af0ed2672ec 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/api/pet_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby-autoload/lib/petstore/api/store_api.rb index 1c0806ab93b5..c23d44c56978 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/api/store_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby-autoload/lib/petstore/api/user_api.rb index a41677db7103..5b28f84953d8 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/api/user_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/api_client.rb b/samples/client/petstore/ruby-autoload/lib/petstore/api_client.rb index 7b85d8bc3f6b..a0c48d3c8610 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/api_error.rb b/samples/client/petstore/ruby-autoload/lib/petstore/api_error.rb index 1aa094e2d42c..e220ece388a7 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/configuration.rb b/samples/client/petstore/ruby-autoload/lib/petstore/configuration.rb index dcfd8f384fe5..5804a8d00e03 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/additional_properties_class.rb index b313919c1116..c28fba75cbf2 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/all_of_with_single_ref.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/all_of_with_single_ref.rb index 1026d19c11b4..99c49ee3e411 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/all_of_with_single_ref.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/all_of_with_single_ref.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/animal.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/animal.rb index 7c1a644ed0ed..38c3e4ae50cc 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/animal.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/api_response.rb index 5e45f7bef0c2..3f05081ca8f5 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/array_of_array_of_number_only.rb index 523657c09638..e3fc21969343 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/array_of_number_only.rb index 28b52590ce8d..c84931a3d2c8 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/array_test.rb index a9c6fb82ccd1..3d4fe2a619b7 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/array_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/capitalization.rb index 5cbba1d4c25a..535ca7697ba4 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/capitalization.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end 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 a475452c5b47..ddc6268f1752 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/cat.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/category.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/category.rb index 64e6a5114b66..029ecca4bf60 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/category.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/child_with_nullable.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/child_with_nullable.rb index e4027d5a7a0f..a40a99e9b457 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/child_with_nullable.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/child_with_nullable.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/class_model.rb index 758f62be2609..a69c0c3d8b18 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/class_model.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/client.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/client.rb index 01346a84c49e..d100b51d25eb 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/deprecated_object.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/deprecated_object.rb index 927ada3e489e..c13b9812ce80 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/deprecated_object.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/deprecated_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =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 32dc3c2013d8..baf8aed83aee 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/dog.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_arrays.rb index 5d0b69fb9999..b53d022ccbed 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_arrays.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_class.rb index ff926cf84f35..f842e0f451fa 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_test.rb index 151e317c9699..f71d804b6d59 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/enum_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/fake_big_decimal_map200_response.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/fake_big_decimal_map200_response.rb index 4be7f6fc3e5c..2e84764f47fd 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/fake_big_decimal_map200_response.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/fake_big_decimal_map200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/file.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/file.rb index e892d739a78c..af161d8f6319 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/file.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/file_schema_test_class.rb index af187301c5b0..b4cc94be47b5 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/file_schema_test_class.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/file_schema_test_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/foo.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/foo.rb index 202fcba6543b..76988fd3cd5c 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/foo.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/foo.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/foo_get_default_response.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/foo_get_default_response.rb index 48c30a48a164..d50fec9cd9fd 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/foo_get_default_response.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/foo_get_default_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/format_test.rb index c87ec4923b91..f6da236ae5b7 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/format_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/has_only_read_only.rb index 040b824ade1e..9d82934d22e1 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/has_only_read_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/health_check_result.rb index 2d0d214cc0f5..b850e8623c68 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/health_check_result.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/health_check_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/list.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/list.rb index 71c09e1d9619..ef3adc399fe4 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/map_test.rb index 804b353bc8ea..0ced89f3c867 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/map_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index 53ad7c22f428..ad1a5b472351 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/model200_response.rb index 70f6ac3a41ff..4d318df4c90f 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/model200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/model_return.rb index 6ea311e50d6d..ef0c65b55d8e 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/name.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/name.rb index be494581e9b0..a189793a3811 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/nullable_class.rb index 66461e7d5c7b..5748150ee607 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/nullable_class.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/nullable_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/number_only.rb index b947e8c2c464..341193e3f17c 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/object_with_deprecated_fields.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/object_with_deprecated_fields.rb index 58df095d85fe..5df34bc5a128 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/object_with_deprecated_fields.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/object_with_deprecated_fields.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/order.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/order.rb index 0ba5c16e8bbb..6d4ea1c77a7c 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_composite.rb index 1785ac93ce82..bcb2334d38ad 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_enum.rb index cf635bd62ba0..09837aa4f28d 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_enum_default_value.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_enum_default_value.rb index aa35a5346d67..4dde4e1d3e16 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_enum_default_value.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_enum_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_enum_integer.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_enum_integer.rb index 457f97bda3c9..93b24aac3a51 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_enum_integer.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_enum_integer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_enum_integer_default_value.rb index 04ee432b9b76..9100aff19e13 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_enum_integer_default_value.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_enum_integer_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_object_with_enum_property.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_object_with_enum_property.rb index f237c46fb363..1dd612ccaca5 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_object_with_enum_property.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_object_with_enum_property.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/parent_with_nullable.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/parent_with_nullable.rb index 80d5b087caa7..66ab22b8976c 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/parent_with_nullable.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/parent_with_nullable.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/pet.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/pet.rb index 4e0f7d69be6d..e0bb197e8e69 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/read_only_first.rb index a01948aa971c..46853a3feeee 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/single_ref_type.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/single_ref_type.rb index 00a573f97f08..ecccade2f191 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/single_ref_type.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/single_ref_type.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/special_model_name.rb index d63d3d9d8de0..07ede6cffe38 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/tag.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/tag.rb index 23604ab0866c..47cc6ac04379 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/user.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/user.rb index f0ca5f2c59c2..4045f639bcbf 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/version.rb b/samples/client/petstore/ruby-autoload/lib/petstore/version.rb index bdbd66cfbdb9..3d342d87a32f 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/version.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/petstore.gemspec b/samples/client/petstore/ruby-autoload/petstore.gemspec index 27b41c1ed1c7..d5420ccb8bea 100644 --- a/samples/client/petstore/ruby-autoload/petstore.gemspec +++ b/samples/client/petstore/ruby-autoload/petstore.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/spec/api_client_spec.rb b/samples/client/petstore/ruby-autoload/spec/api_client_spec.rb index ac7962af1c36..ffa7f281caf8 100644 --- a/samples/client/petstore/ruby-autoload/spec/api_client_spec.rb +++ b/samples/client/petstore/ruby-autoload/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/spec/configuration_spec.rb b/samples/client/petstore/ruby-autoload/spec/configuration_spec.rb index 41d7c0b53fd6..c61e6f00029a 100644 --- a/samples/client/petstore/ruby-autoload/spec/configuration_spec.rb +++ b/samples/client/petstore/ruby-autoload/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/spec/spec_helper.rb b/samples/client/petstore/ruby-autoload/spec/spec_helper.rb index c053c4774fcb..5cd856c95041 100644 --- a/samples/client/petstore/ruby-autoload/spec/spec_helper.rb +++ b/samples/client/petstore/ruby-autoload/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby-faraday/lib/petstore.rb b/samples/client/petstore/ruby-faraday/lib/petstore.rb index 6c6330b609ea..9902da58b069 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb index f86495d11a51..a3bdc5af0bfc 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb index 1162a0fbaec9..f9fc19208aae 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb index 06e12cd00e55..3e90201ee0fa 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb index 84c83d1ecdd4..3665b1137909 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb index 549c721ab85b..c3972cea110b 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb index bdb5e2f8d868..df4f0c3f7e81 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb index f1965706c619..9c4d48a96059 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb index 78219d671b18..b4687d558989 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb index 1aa094e2d42c..e220ece388a7 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb index b973ec1cfe2f..d530e543990f 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb index b313919c1116..c28fba75cbf2 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/all_of_with_single_ref.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/all_of_with_single_ref.rb index 1026d19c11b4..99c49ee3e411 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/all_of_with_single_ref.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/all_of_with_single_ref.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb index 7c1a644ed0ed..38c3e4ae50cc 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb index 5e45f7bef0c2..3f05081ca8f5 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb index 523657c09638..e3fc21969343 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb index 28b52590ce8d..c84931a3d2c8 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb index a9c6fb82ccd1..3d4fe2a619b7 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb index 5cbba1d4c25a..535ca7697ba4 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end 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 a475452c5b47..ddc6268f1752 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb index 64e6a5114b66..029ecca4bf60 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/child_with_nullable.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/child_with_nullable.rb index e4027d5a7a0f..a40a99e9b457 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/child_with_nullable.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/child_with_nullable.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb index 758f62be2609..a69c0c3d8b18 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb index 01346a84c49e..d100b51d25eb 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb index 927ada3e489e..c13b9812ce80 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/deprecated_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =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 32dc3c2013d8..baf8aed83aee 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb index 5d0b69fb9999..b53d022ccbed 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb index ff926cf84f35..f842e0f451fa 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb index 151e317c9699..f71d804b6d59 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/fake_big_decimal_map200_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/fake_big_decimal_map200_response.rb index 4be7f6fc3e5c..2e84764f47fd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/fake_big_decimal_map200_response.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/fake_big_decimal_map200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb index e892d739a78c..af161d8f6319 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb index af187301c5b0..b4cc94be47b5 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb index 202fcba6543b..76988fd3cd5c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo_get_default_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo_get_default_response.rb index 48c30a48a164..d50fec9cd9fd 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo_get_default_response.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo_get_default_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb index c87ec4923b91..f6da236ae5b7 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb index 040b824ade1e..9d82934d22e1 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb index 2d0d214cc0f5..b850e8623c68 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb index 71c09e1d9619..ef3adc399fe4 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb index 804b353bc8ea..0ced89f3c867 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index 53ad7c22f428..ad1a5b472351 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb index 70f6ac3a41ff..4d318df4c90f 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb index 6ea311e50d6d..ef0c65b55d8e 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb index be494581e9b0..a189793a3811 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb index 66461e7d5c7b..5748150ee607 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb index b947e8c2c464..341193e3f17c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb index 58df095d85fe..5df34bc5a128 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/object_with_deprecated_fields.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb index 0ba5c16e8bbb..6d4ea1c77a7c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb index 1785ac93ce82..bcb2334d38ad 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb index cf635bd62ba0..09837aa4f28d 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb index aa35a5346d67..4dde4e1d3e16 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb index 457f97bda3c9..93b24aac3a51 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb index 04ee432b9b76..9100aff19e13 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_object_with_enum_property.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_object_with_enum_property.rb index f237c46fb363..1dd612ccaca5 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_object_with_enum_property.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_object_with_enum_property.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/parent_with_nullable.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/parent_with_nullable.rb index 80d5b087caa7..66ab22b8976c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/parent_with_nullable.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/parent_with_nullable.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb index 4e0f7d69be6d..e0bb197e8e69 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb index a01948aa971c..46853a3feeee 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/single_ref_type.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/single_ref_type.rb index 00a573f97f08..ecccade2f191 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/single_ref_type.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/single_ref_type.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb index d63d3d9d8de0..07ede6cffe38 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb index 23604ab0866c..47cc6ac04379 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb index f0ca5f2c59c2..4045f639bcbf 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/version.rb b/samples/client/petstore/ruby-faraday/lib/petstore/version.rb index bdbd66cfbdb9..3d342d87a32f 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/version.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/petstore.gemspec b/samples/client/petstore/ruby-faraday/petstore.gemspec index cd7103698feb..7540e70134be 100644 --- a/samples/client/petstore/ruby-faraday/petstore.gemspec +++ b/samples/client/petstore/ruby-faraday/petstore.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb index f19f6d6a71c2..ecee30aaec1b 100644 --- a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb index 82f9b168f325..153cd92d5457 100644 --- a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb index c053c4774fcb..5cd856c95041 100644 --- a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb +++ b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/.openapi-generator/VERSION b/samples/client/petstore/ruby/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/ruby/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index e63bd124b83d..084f5d08a025 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb index f86495d11a51..a3bdc5af0bfc 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby/lib/petstore/api/default_api.rb index 1162a0fbaec9..f9fc19208aae 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/default_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index 8b70e338e642..aa0f38d33173 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb index 84c83d1ecdd4..3665b1137909 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb index f9f9c9d15b92..9af0ed2672ec 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb index 1c0806ab93b5..c23d44c56978 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb index a41677db7103..5b28f84953d8 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_client.rb b/samples/client/petstore/ruby/lib/petstore/api_client.rb index 7b85d8bc3f6b..a0c48d3c8610 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_error.rb b/samples/client/petstore/ruby/lib/petstore/api_error.rb index 1aa094e2d42c..e220ece388a7 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 4726a53eecf9..7ff04a8cf2a8 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb index b313919c1116..c28fba75cbf2 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/all_of_with_single_ref.rb b/samples/client/petstore/ruby/lib/petstore/models/all_of_with_single_ref.rb index 1026d19c11b4..99c49ee3e411 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/all_of_with_single_ref.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/all_of_with_single_ref.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal.rb b/samples/client/petstore/ruby/lib/petstore/models/animal.rb index 7c1a644ed0ed..38c3e4ae50cc 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb index 5e45f7bef0c2..3f05081ca8f5 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb index 523657c09638..e3fc21969343 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb index 28b52590ce8d..c84931a3d2c8 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb index a9c6fb82ccd1..3d4fe2a619b7 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb index 5cbba1d4c25a..535ca7697ba4 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb index a475452c5b47..ddc6268f1752 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/category.rb b/samples/client/petstore/ruby/lib/petstore/models/category.rb index 64e6a5114b66..029ecca4bf60 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb index 758f62be2609..a69c0c3d8b18 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/client.rb b/samples/client/petstore/ruby/lib/petstore/models/client.rb index 01346a84c49e..d100b51d25eb 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb b/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb index 927ada3e489e..c13b9812ce80 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/deprecated_object.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb index 32dc3c2013d8..baf8aed83aee 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb index 5d0b69fb9999..b53d022ccbed 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb index ff926cf84f35..f842e0f451fa 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb index 151e317c9699..f71d804b6d59 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/fake_big_decimal_map200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/fake_big_decimal_map200_response.rb index 4be7f6fc3e5c..2e84764f47fd 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/fake_big_decimal_map200_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/fake_big_decimal_map200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/file.rb b/samples/client/petstore/ruby/lib/petstore/models/file.rb index e892d739a78c..af161d8f6319 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb index af187301c5b0..b4cc94be47b5 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/foo.rb b/samples/client/petstore/ruby/lib/petstore/models/foo.rb index 202fcba6543b..76988fd3cd5c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/foo.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/foo.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/foo_get_default_response.rb b/samples/client/petstore/ruby/lib/petstore/models/foo_get_default_response.rb index 48c30a48a164..d50fec9cd9fd 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/foo_get_default_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/foo_get_default_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb index c87ec4923b91..f6da236ae5b7 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb index 040b824ade1e..9d82934d22e1 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb index 2d0d214cc0f5..b850e8623c68 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/list.rb b/samples/client/petstore/ruby/lib/petstore/models/list.rb index 71c09e1d9619..ef3adc399fe4 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/mammal.rb b/samples/client/petstore/ruby/lib/petstore/models/mammal.rb index 12d6ca6efe30..204dd4685e7a 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mammal.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mammal.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/mammal_anyof.rb b/samples/client/petstore/ruby/lib/petstore/models/mammal_anyof.rb index 017faf4b637d..f1432ade8b0d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mammal_anyof.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mammal_anyof.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/mammal_without_discriminator.rb b/samples/client/petstore/ruby/lib/petstore/models/mammal_without_discriminator.rb index b32eb2cc388b..331fc4ac7c35 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mammal_without_discriminator.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mammal_without_discriminator.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb index 804b353bc8ea..0ced89f3c867 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index 53ad7c22f428..ad1a5b472351 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb index 70f6ac3a41ff..4d318df4c90f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb index 6ea311e50d6d..ef0c65b55d8e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb index be494581e9b0..a189793a3811 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb index 66461e7d5c7b..5748150ee607 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb index b947e8c2c464..341193e3f17c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb b/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb index 58df095d85fe..5df34bc5a128 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/object_with_deprecated_fields.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb index 0ba5c16e8bbb..6d4ea1c77a7c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb index 1785ac93ce82..bcb2334d38ad 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb index cf635bd62ba0..09837aa4f28d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb index aa35a5346d67..4dde4e1d3e16 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb index 457f97bda3c9..93b24aac3a51 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb index 04ee432b9b76..9100aff19e13 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_object_with_enum_property.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_object_with_enum_property.rb index f237c46fb363..1dd612ccaca5 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_object_with_enum_property.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_object_with_enum_property.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb index 4e0f7d69be6d..e0bb197e8e69 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/property_name_mapping.rb b/samples/client/petstore/ruby/lib/petstore/models/property_name_mapping.rb index 13539e48e8a4..d565c9619833 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/property_name_mapping.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/property_name_mapping.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb index a01948aa971c..46853a3feeee 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/single_ref_type.rb b/samples/client/petstore/ruby/lib/petstore/models/single_ref_type.rb index 00a573f97f08..ecccade2f191 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/single_ref_type.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/single_ref_type.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb index d63d3d9d8de0..07ede6cffe38 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb index 23604ab0866c..47cc6ac04379 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb index f0ca5f2c59c2..4045f639bcbf 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/whale.rb b/samples/client/petstore/ruby/lib/petstore/models/whale.rb index b5364e2051cf..7127a617e73f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/whale.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/whale.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/zebra.rb b/samples/client/petstore/ruby/lib/petstore/models/zebra.rb index 743c0d4da51f..6767c534c330 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/zebra.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/zebra.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/version.rb b/samples/client/petstore/ruby/lib/petstore/version.rb index bdbd66cfbdb9..3d342d87a32f 100644 --- a/samples/client/petstore/ruby/lib/petstore/version.rb +++ b/samples/client/petstore/ruby/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec index 27b41c1ed1c7..d5420ccb8bea 100644 --- a/samples/client/petstore/ruby/petstore.gemspec +++ b/samples/client/petstore/ruby/petstore.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/api_client_spec.rb b/samples/client/petstore/ruby/spec/api_client_spec.rb index ac7962af1c36..ffa7f281caf8 100644 --- a/samples/client/petstore/ruby/spec/api_client_spec.rb +++ b/samples/client/petstore/ruby/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/configuration_spec.rb b/samples/client/petstore/ruby/spec/configuration_spec.rb index 41d7c0b53fd6..c61e6f00029a 100644 --- a/samples/client/petstore/ruby/spec/configuration_spec.rb +++ b/samples/client/petstore/ruby/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/spec_helper.rb b/samples/client/petstore/ruby/spec/spec_helper.rb index c053c4774fcb..5cd856c95041 100644 --- a/samples/client/petstore/ruby/spec/spec_helper.rb +++ b/samples/client/petstore/ruby/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/name-mapping/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/name-mapping/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/rust/reqwest/name-mapping/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/name-mapping/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore-async-middleware/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async-middleware/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-akka/.openapi-generator/VERSION b/samples/client/petstore/scala-akka/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/scala-akka/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-akka/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-sttp/.openapi-generator/VERSION b/samples/client/petstore/scala-sttp/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/scala-sttp/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-sttp/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-sttp4/.openapi-generator/VERSION b/samples/client/petstore/scala-sttp4/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/scala-sttp4/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-sttp4/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java index 48a3bc4d0010..f76215e98216 100644 --- a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java +++ b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-deprecated/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-deprecated/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/spring-cloud-deprecated/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-deprecated/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java index ca73e5cf597f..0747d4119878 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java index d856ce6a3360..65ce02af1be4 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java index 32bfbcc82d9c..08e01a9b9e5a 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-feign-without-url/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-feign-without-url/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-feign-without-url/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java index c3f912464f0e..f327113b0f40 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java index 48df37055361..18f948391d78 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java index 0c9fa4fe2bde..8c5829baec0e 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-tags/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-tags/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/spring-cloud-tags/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud-tags/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java index 03e10f405ba7..198c99b84c3c 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java index f32ee05c1f2c..d092e797a849 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java index 20687605a19b..8ca66fa7cdc7 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index c3f912464f0e..f327113b0f40 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index 48df37055361..18f948391d78 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 0c9fa4fe2bde..8c5829baec0e 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-http-interface-reactive/.openapi-generator/VERSION b/samples/client/petstore/spring-http-interface-reactive/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/spring-http-interface-reactive/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-http-interface-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index 3ad9da3699b4..02f764b41d06 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java index 537d7e748a60..942abfa00d23 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index 474aaf93d77a..9df3b11062b9 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java index a87281ff0e5a..88d60b92814e 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java index ca594285b9a1..84c4caa1d967 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java index bd6b82e7503d..86382ef890d4 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java index 9a426f990b97..cb5fd3664485 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-http-interface/.openapi-generator/VERSION b/samples/client/petstore/spring-http-interface/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/spring-http-interface/.openapi-generator/VERSION +++ b/samples/client/petstore/spring-http-interface/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/AnotherFakeApi.java index bc361b216dd4..55f9d50a95e6 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java index de4747c2d4c0..3fd6f8e3861b 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index 0524dfbd3e69..49f37cb7304b 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java index c54ae53f2a70..8ac471e16fd2 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java index 944a3d9dbe09..d18ddc2ff043 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java index 32fde56e913f..6f9a290e64b6 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java index 9a426f990b97..cb5fd3664485 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/configuration/HttpInterfacesAbstractConfigurator.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/swift-combine/client/.openapi-generator/VERSION b/samples/client/petstore/swift-combine/client/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift-combine/client/.openapi-generator/VERSION +++ b/samples/client/petstore/swift-combine/client/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/anycodableLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/anycodableLibrary/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/anycodableLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/anycodableLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/default/.openapi-generator/VERSION b/samples/client/petstore/swift5/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/default/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION b/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/frozenEnums/.openapi-generator/VERSION b/samples/client/petstore/swift5/frozenEnums/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/frozenEnums/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/frozenEnums/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION b/samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/oneOf/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/validation/.openapi-generator/VERSION b/samples/client/petstore/swift5/validation/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/validation/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/validation/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/VERSION b/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/VERSION +++ b/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v12-oneOf/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v12-oneOf/builds/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-angular-v12-oneOf/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v12-oneOf/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v13-oneOf/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v13-oneOf/builds/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-angular-v13-oneOf/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v13-oneOf/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v14-query-param-object-format/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v14-query-param-object-format/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-angular-v14-query-param-object-format/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v14-query-param-object-format/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v16-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v16-provided-in-root/builds/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-angular-v16-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v16-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/allOf-nullable/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/allOf-nullable/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-fetch/builds/allOf-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/allOf-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/allOf-readonly/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/allOf-readonly/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-fetch/builds/allOf-readonly/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/allOf-readonly/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/snakecase-discriminator/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-string-enums/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-string-enums/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/xojo/client-synchronous/.openapi-generator/VERSION b/samples/client/petstore/xojo/client-synchronous/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/xojo/client-synchronous/.openapi-generator/VERSION +++ b/samples/client/petstore/xojo/client-synchronous/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/xojo/client/.openapi-generator/VERSION b/samples/client/petstore/xojo/client/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/xojo/client/.openapi-generator/VERSION +++ b/samples/client/petstore/xojo/client/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/zapier/.openapi-generator/VERSION b/samples/client/petstore/zapier/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/client/petstore/zapier/.openapi-generator/VERSION +++ b/samples/client/petstore/zapier/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION b/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION +++ b/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index 433c17f02d58..4dc293c36263 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -121,7 +121,7 @@ UTF-8 - 7.0.1-SNAPSHOT + 7.1.0-SNAPSHOT 1.0.0 4.13.2 diff --git a/samples/meta-codegen/usage/.openapi-generator/VERSION b/samples/meta-codegen/usage/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/meta-codegen/usage/.openapi-generator/VERSION +++ b/samples/meta-codegen/usage/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/elm/.openapi-generator/VERSION b/samples/openapi3/client/elm/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/elm/.openapi-generator/VERSION +++ b/samples/openapi3/client/elm/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb index 69e6fec858c6..ac7eae6a8999 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb index 6a6188540ec7..ff6ee6a537c4 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb index 34d3c2be33cb..27a101a0ed35 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb index 0ba78ff75cfd..472b844cf3b2 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb index 800867ff0c2f..c20161f13a71 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb index 83272adc79e8..0585c3a11622 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb index e6c6f8dbb419..e567d24b718d 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb index 08b527cb6451..e838f2bb56ca 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb index dcee67e4de47..17d76c2378f0 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec index 2bb7bf5eb379..c4a502db6857 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION b/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec b/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec index b74ab8748d68..4c0134d4e5e9 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec +++ b/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb index af7742aeacd0..268050dda012 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb index c2cbc763d034..cd339e40d84e 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb index 285f0117cc64..192f46cf7c61 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb index fdb643aa61b6..891d37f5f8a8 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb index a3ff538f34e3..aad548d4f6e3 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb index 45306438bdd9..43dc577f4a8e 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb index f00c2cb9e0a2..d8966996fc00 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb index c8d0f74587b8..e2985bd7c554 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb index 463cf356df08..00ad7e95ed8e 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb index b724ab802781..b7a977230fb3 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb index f3779d992006..0648e6fab256 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb index c21f26a4c14c..8509f5c357d1 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb index ccc86b573027..2802659d740b 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb index a6939b22e521..f4df84d816d4 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb index 66bb5fe64ac0..569146fac473 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb index 6cfb980d9230..e12a9e974d3d 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb index d183fedc72a8..eaacb3865979 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec index 4257f10a1fd0..3b537846b36f 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb index f6476108f641..ab3122e1588f 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb index cb23ac4e104a..0bcafd44f120 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb index 5d73f90f475f..21a71465cf06 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.1-SNAPSHOT +OpenAPI Generator version: 7.1.0-SNAPSHOT =end diff --git a/samples/openapi3/client/petstore/dart-dio/oneof/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/oneof/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio/oneof/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_primitive/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio/oneof_primitive/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python-aiohttp/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python-aiohttp/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python-aiohttp/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100755 --- a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java index f0262f536457..c89af1a1a41a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java index bf8899c3b2c6..3aca0efac53f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java index 0ba732e8d9a2..521ee1ec6805 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-3/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-3/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-cloud-3/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java index c9dbedd2fdd4..b5b39d8e7429 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java index 76890b0de49e..375ae369a155 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java index c9130c3c895f..6a56fbc20fa6 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-cloud-async/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index bb3699f9ea59..1d324f509747 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index d41755a3b5ab..ebd61552b0a3 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index dc896b0c449a..96951205a9e8 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java index 2e67a065db0b..ddf6b779c6ab 100644 --- a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java index a8df00d04f68..3e20eedc368f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java index 72d45bdee9e3..bc0b9f113cfb 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index 107e97933172..ad3d22e0a50a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java index 9ec97f8ed7ad..308dfc4c2482 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java index 08fc2d93059e..aeb643ced04e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java index 0269c6456817..38c64487591e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index bc4a6572fd56..c5b2990f8569 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 8ff542e96989..a9d31d78cb6a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 5fcfc5f671ae..7b634ef29e64 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-cloud/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/spring-cloud/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-cloud/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 00c4881626aa..f36656735b4f 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index d856ce6a3360..65ce02af1be4 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 72b197591626..e8d27ffb2ee8 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java index 99d92febabe2..a1349148cc6b 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java index edae04fc4d67..124d64e68974 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java index 7c0e100c0a66..d40ccb8d8131 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/VERSION b/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/spring-stubs/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index 0f4895383574..588e7fc20a53 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index c0f801e02dd5..bfda3ffea835 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index 61ad9d41f3fc..b812e5baacfb 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/browser/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/typescript/builds/browser/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/browser/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION b/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION +++ b/samples/openapi3/schema/petstore/avro-schema/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/openapi3/server/petstore/go/go-petstore/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/server/petstore/go/go-petstore/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/go/go-petstore/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/.openapi-generator/VERSION b/samples/openapi3/server/petstore/spring-boot-oneof/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/spring-boot-oneof/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java index d0b7239f5379..ceb3b339f903 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java index 720e57804a06..2f8dd1881437 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator/VERSION b/samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java index 766576729ba7..a349111a2795 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java index 95c9abd7fcdb..d8e202aa918f 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java index 56204aba587f..4d6739489fd6 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-3/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-3/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/server/petstore/springboot-3/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/springboot-3/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java index 121ff9384306..5adb83f70e1e 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java index 9ce8c9076500..84e3acbf213e 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java index c78250173943..1ca047752e86 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index d2c67129e3e5..b4ee569246e5 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 47db3311b8aa..f03dbda783d9 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 3c04475dd2b5..f676e5b60385 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index b13f437a60db..13660ca6499b 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index 28db559a961a..6e49ab342a40 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index 26ae1efee78c..f5af6f531077 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index c02d2a4199b0..8e567d3d689c 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 48b273fb6fce..8a141fc1e039 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index da5cdda54506..0e14ec47dcaf 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 92068da8ae6d..314f1ee6d21e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index 934a408a84ef..c3ec78711cef 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index f12b8b0cbe30..393645089012 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-source/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot-source/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/server/petstore/springboot-source/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/springboot-source/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java index 7292e95b6810..dc1782b890d1 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java index 14d151ca88f4..5c7d2045127c 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java index 3646738445ac..332118a3a8f9 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot/.openapi-generator/VERSION b/samples/openapi3/server/petstore/springboot/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/openapi3/server/petstore/springboot/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/springboot/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 09bfa79ed3d0..2ce96c4819c3 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index ff9db2f69f55..e6baf04361b7 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index a22e5350c53b..10870729eb33 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/schema/petstore/ktorm-modelMutable/.openapi-generator/VERSION b/samples/schema/petstore/ktorm-modelMutable/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/schema/petstore/ktorm-modelMutable/.openapi-generator/VERSION +++ b/samples/schema/petstore/ktorm-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/schema/petstore/ktorm/.openapi-generator/VERSION b/samples/schema/petstore/ktorm/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/schema/petstore/ktorm/.openapi-generator/VERSION +++ b/samples/schema/petstore/ktorm/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/schema/petstore/mysql/.openapi-generator/VERSION b/samples/schema/petstore/mysql/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/schema/petstore/mysql/.openapi-generator/VERSION +++ b/samples/schema/petstore/mysql/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION b/samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION +++ b/samples/schema/petstore/wsdl-schema/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/schema/postman-collection/.openapi-generator/VERSION b/samples/schema/postman-collection/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/schema/postman-collection/.openapi-generator/VERSION +++ b/samples/schema/postman-collection/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/others/kotlin-server/jaxrs-spec/.openapi-generator/VERSION b/samples/server/others/kotlin-server/jaxrs-spec/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/others/kotlin-server/jaxrs-spec/.openapi-generator/VERSION +++ b/samples/server/others/kotlin-server/jaxrs-spec/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-6.0-pocoModels/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-6.0-project4Models/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-6.0-useSwashBuckle/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-6.0-useSwashBuckle/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/aspnetcore-6.0-useSwashBuckle/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-6.0-useSwashBuckle/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore-6.0/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-6.0/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/aspnetcore-6.0/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore-6.0/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/.openapi-generator/VERSION b/samples/server/petstore/cpp-qt-qhttpengine-server/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/.openapi-generator/VERSION b/samples/server/petstore/cpp-restbed/generated/3_0/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-restbed/generated/3_0/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/api/AnotherFakeApi.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/api/AnotherFakeApi.cpp index 0a44e2dc414b..3f8a86812990 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/api/AnotherFakeApi.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/api/AnotherFakeApi.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/api/AnotherFakeApi.h b/samples/server/petstore/cpp-restbed/generated/3_0/api/AnotherFakeApi.h index 9d9f010422e5..c0b4524b2bae 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/api/AnotherFakeApi.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/api/AnotherFakeApi.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/api/DefaultApi.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/api/DefaultApi.cpp index 97bec6ee2313..58514fb2f553 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/api/DefaultApi.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/api/DefaultApi.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/api/DefaultApi.h b/samples/server/petstore/cpp-restbed/generated/3_0/api/DefaultApi.h index 6d79f2799f09..e11b9ebc35b4 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/api/DefaultApi.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/api/DefaultApi.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.cpp index 28c0d4e0ba3a..af6ffd9863ff 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.h b/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.h index 46dc5181826c..12b24bcae824 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeClassnameTags123Api.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeClassnameTags123Api.cpp index 0786031f75ac..4e13211d7381 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeClassnameTags123Api.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeClassnameTags123Api.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeClassnameTags123Api.h b/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeClassnameTags123Api.h index ae97b470de57..d4bf1b3a406a 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeClassnameTags123Api.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeClassnameTags123Api.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/api/PetApi.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/api/PetApi.cpp index 7f1f1d014157..1da63f765781 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/api/PetApi.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/api/PetApi.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/api/PetApi.h b/samples/server/petstore/cpp-restbed/generated/3_0/api/PetApi.h index 3a082e49471b..a601e5740194 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/api/PetApi.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/api/PetApi.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/api/StoreApi.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/api/StoreApi.cpp index 1e6adc803e89..8719fd536570 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/api/StoreApi.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/api/StoreApi.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/api/StoreApi.h b/samples/server/petstore/cpp-restbed/generated/3_0/api/StoreApi.h index 5f1583b2aab4..2160ed8e9176 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/api/StoreApi.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/api/StoreApi.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/api/UserApi.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/api/UserApi.cpp index 4a4185709d13..958bce70c981 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/api/UserApi.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/api/UserApi.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/api/UserApi.h b/samples/server/petstore/cpp-restbed/generated/3_0/api/UserApi.h index a07b75e63cbd..b355f8aa2ef1 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/api/UserApi.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/api/UserApi.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/AdditionalPropertiesClass.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/AdditionalPropertiesClass.cpp index ea16de38d613..f639b6496aa0 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/AdditionalPropertiesClass.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/AdditionalPropertiesClass.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/AdditionalPropertiesClass.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/AdditionalPropertiesClass.h index 69bd7f1294ce..f0e05f94c671 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/AdditionalPropertiesClass.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/AdditionalPropertiesClass.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/AllOfWithSingleRef.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/AllOfWithSingleRef.cpp index 6f29833bd44b..68dc488b0101 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/AllOfWithSingleRef.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/AllOfWithSingleRef.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/AllOfWithSingleRef.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/AllOfWithSingleRef.h index 24f13b0216da..b15e9b4f817b 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/AllOfWithSingleRef.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/AllOfWithSingleRef.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Animal.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/Animal.cpp index 78e8f24ed9df..d66dc0cd3fa0 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Animal.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Animal.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Animal.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/Animal.h index 47d1115c5222..a169127170d4 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Animal.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Animal.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ApiResponse.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/ApiResponse.cpp index b76b2e7fa242..d392c00cad8b 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ApiResponse.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ApiResponse.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ApiResponse.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/ApiResponse.h index 1d44a11f2d44..7c6aaa4da853 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ApiResponse.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ApiResponse.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayOfArrayOfNumberOnly.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayOfArrayOfNumberOnly.cpp index dd962260a0a5..7337e106b758 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayOfArrayOfNumberOnly.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayOfArrayOfNumberOnly.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayOfArrayOfNumberOnly.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayOfArrayOfNumberOnly.h index a72d0af982ca..e3d4ac811592 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayOfArrayOfNumberOnly.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayOfArrayOfNumberOnly.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayOfNumberOnly.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayOfNumberOnly.cpp index b3b09fa05967..5f6d0e2f855f 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayOfNumberOnly.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayOfNumberOnly.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayOfNumberOnly.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayOfNumberOnly.h index acb9c6064b00..b0ed3cb04ea8 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayOfNumberOnly.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayOfNumberOnly.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayTest.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayTest.cpp index 544bc9dd9267..57afa82d7909 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayTest.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayTest.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayTest.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayTest.h index 51c1d4f5b3d3..5a936f1846c2 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayTest.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ArrayTest.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Capitalization.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/Capitalization.cpp index 0fa9d5d28ed5..2cd6cb205b3a 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Capitalization.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Capitalization.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Capitalization.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/Capitalization.h index 2d7eebd399cb..426bdcd6a2d3 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Capitalization.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Capitalization.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Cat.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/Cat.cpp index 6c4c4f748fe3..4407e6c56ccd 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Cat.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Cat.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ 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 bead9d4a657f..3a1197e7dd0f 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 @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Category.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/Category.cpp index a3007b7b597a..fac4005500da 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Category.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Category.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Category.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/Category.h index 69294e95f32b..edba27ba2aaf 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Category.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Category.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ChildWithNullable.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/ChildWithNullable.cpp index 48dd4b6314b3..a9f0e8b87707 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ChildWithNullable.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ChildWithNullable.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ChildWithNullable.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/ChildWithNullable.h index 7044b8204ee0..fa759c34a63d 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ChildWithNullable.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ChildWithNullable.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ClassModel.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/ClassModel.cpp index 21c2387fd474..92b063afe693 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ClassModel.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ClassModel.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ClassModel.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/ClassModel.h index 13060f3b04b2..438658071d88 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ClassModel.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ClassModel.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Client.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/Client.cpp index 291c5740bae4..7b81b445fde8 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Client.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Client.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Client.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/Client.h index bbc097b381e3..6f397154b580 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Client.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Client.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/DeprecatedObject.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/DeprecatedObject.cpp index 331fc7c79276..474196c81679 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/DeprecatedObject.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/DeprecatedObject.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/DeprecatedObject.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/DeprecatedObject.h index 7a645b8bce35..3384cb30a916 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/DeprecatedObject.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/DeprecatedObject.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Dog.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/Dog.cpp index 9631f25a8df9..4dbe28a20650 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Dog.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Dog.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ 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 9883394c0139..aa32d331eb95 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 @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/EnumArrays.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/EnumArrays.cpp index 8ac055270fed..46259268ed69 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/EnumArrays.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/EnumArrays.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/EnumArrays.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/EnumArrays.h index 2cbcf6b3f32f..fab7126a9fbd 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/EnumArrays.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/EnumArrays.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/EnumClass.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/EnumClass.cpp index 767f06565079..e9c4f22f78f0 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/EnumClass.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/EnumClass.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/EnumClass.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/EnumClass.h index 53e607a7110a..a9d51d81ddc6 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/EnumClass.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/EnumClass.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Enum_Test.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/Enum_Test.cpp index 5276480be3c2..9d6729df2628 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Enum_Test.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Enum_Test.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Enum_Test.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/Enum_Test.h index 5a188a5dbab4..96907f96cfc6 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Enum_Test.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Enum_Test.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/FakeBigDecimalMap_200_response.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/FakeBigDecimalMap_200_response.cpp index 5d6aa2638b92..b09e8ebb1339 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/FakeBigDecimalMap_200_response.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/FakeBigDecimalMap_200_response.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/FakeBigDecimalMap_200_response.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/FakeBigDecimalMap_200_response.h index 0834884233ae..78f713389b73 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/FakeBigDecimalMap_200_response.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/FakeBigDecimalMap_200_response.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/File.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/File.cpp index c22c1088fa21..02e757cfc875 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/File.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/File.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/File.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/File.h index fb40c0baa33a..6a11ee350f6a 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/File.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/File.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/FileSchemaTestClass.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/FileSchemaTestClass.cpp index 1cf7fa0b3d95..0c93c8bf8296 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/FileSchemaTestClass.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/FileSchemaTestClass.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/FileSchemaTestClass.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/FileSchemaTestClass.h index 9387cb5672dc..30f2bd83445d 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/FileSchemaTestClass.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/FileSchemaTestClass.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Foo.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/Foo.cpp index 16f5f9ad6a33..fe9264a14772 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Foo.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Foo.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Foo.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/Foo.h index 79f74f1c2bf6..63788973d8c1 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Foo.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Foo.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Format_test.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/Format_test.cpp index 8f5d18c931c9..81fffb9c9a8e 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Format_test.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Format_test.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Format_test.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/Format_test.h index e20a5ffff48e..b910fec8c9d4 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Format_test.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Format_test.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/HasOnlyReadOnly.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/HasOnlyReadOnly.cpp index 492a7e124001..18516a134057 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/HasOnlyReadOnly.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/HasOnlyReadOnly.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/HasOnlyReadOnly.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/HasOnlyReadOnly.h index 28b7eeeb09e9..b1320dec3847 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/HasOnlyReadOnly.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/HasOnlyReadOnly.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/HealthCheckResult.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/HealthCheckResult.cpp index dfff5b214941..d8e27e37c58c 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/HealthCheckResult.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/HealthCheckResult.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/HealthCheckResult.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/HealthCheckResult.h index d68c02f0414a..494c2de0eaab 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/HealthCheckResult.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/HealthCheckResult.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/List.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/List.cpp index e5e9940aafbf..44fa37e81a0b 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/List.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/List.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/List.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/List.h index 6fb5ba86a85d..c204ee774923 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/List.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/List.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/MapTest.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/MapTest.cpp index ab8594a078b3..4f993f0bfbc7 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/MapTest.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/MapTest.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/MapTest.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/MapTest.h index 1aef60f53721..abce4fced57c 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/MapTest.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/MapTest.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/MixedPropertiesAndAdditionalPropertiesClass.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/MixedPropertiesAndAdditionalPropertiesClass.cpp index ae5e21dce6d3..ed22d11fbfe0 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/MixedPropertiesAndAdditionalPropertiesClass.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/MixedPropertiesAndAdditionalPropertiesClass.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/MixedPropertiesAndAdditionalPropertiesClass.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/MixedPropertiesAndAdditionalPropertiesClass.h index 595aa01c7e61..765a9b57fbf1 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/MixedPropertiesAndAdditionalPropertiesClass.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/MixedPropertiesAndAdditionalPropertiesClass.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Name.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/Name.cpp index f6dd9c76fa57..3410be5ba569 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Name.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Name.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Name.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/Name.h index 82e1c553810a..7d1da5eb818a 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Name.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Name.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/NullableClass.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/NullableClass.cpp index b6d3fab4d1c0..557a91641fe4 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/NullableClass.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/NullableClass.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/NullableClass.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/NullableClass.h index 4fea6ea6d6a2..7fbe1201b805 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/NullableClass.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/NullableClass.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/NumberOnly.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/NumberOnly.cpp index e1299c76a99a..b517063a3529 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/NumberOnly.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/NumberOnly.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/NumberOnly.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/NumberOnly.h index 2877cdd2be1b..2c26c173fb49 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/NumberOnly.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/NumberOnly.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ObjectWithDeprecatedFields.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/ObjectWithDeprecatedFields.cpp index 8777dd048393..76d7fc447e2b 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ObjectWithDeprecatedFields.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ObjectWithDeprecatedFields.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ObjectWithDeprecatedFields.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/ObjectWithDeprecatedFields.h index 1aebdcf247b4..6efd93e23e53 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ObjectWithDeprecatedFields.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ObjectWithDeprecatedFields.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Order.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/Order.cpp index 57a690736227..dd49a1c52803 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Order.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Order.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Order.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/Order.h index 75403efd4992..9c87055ebe90 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Order.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Order.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterComposite.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterComposite.cpp index c28763135445..f32037763242 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterComposite.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterComposite.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterComposite.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterComposite.h index 7e0a5f70c0b1..a17458cfd45c 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterComposite.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterComposite.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnum.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnum.cpp index 4b92c197bdf9..3f4545879e77 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnum.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnum.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnum.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnum.h index 70d31f561842..8bc5090beb94 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnum.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnum.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumDefaultValue.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumDefaultValue.cpp index 3709d18b1385..2421acd14be2 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumDefaultValue.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumDefaultValue.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumDefaultValue.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumDefaultValue.h index 444f59e67819..c48a9e9c6f8b 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumDefaultValue.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumDefaultValue.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumInteger.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumInteger.cpp index a3a3bd8029ae..e607454a025a 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumInteger.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumInteger.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumInteger.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumInteger.h index f404790a6cd8..860b7d8ca73a 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumInteger.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumInteger.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumIntegerDefaultValue.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumIntegerDefaultValue.cpp index 9e5fc8dca084..283d888542c3 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumIntegerDefaultValue.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumIntegerDefaultValue.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumIntegerDefaultValue.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumIntegerDefaultValue.h index 1433cf0cf38f..c2001c0c702f 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumIntegerDefaultValue.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterEnumIntegerDefaultValue.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterObjectWithEnumProperty.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterObjectWithEnumProperty.cpp index 3ab52b4d0cda..78f44dc15196 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterObjectWithEnumProperty.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterObjectWithEnumProperty.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterObjectWithEnumProperty.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterObjectWithEnumProperty.h index 8fa4c7a6bd72..54894bbae9bd 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterObjectWithEnumProperty.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterObjectWithEnumProperty.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ParentWithNullable.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/ParentWithNullable.cpp index 28226e76d8a9..11781e0f2d32 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ParentWithNullable.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ParentWithNullable.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ParentWithNullable.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/ParentWithNullable.h index adb872bbee33..9fad5f85d671 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ParentWithNullable.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ParentWithNullable.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Pet.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/Pet.cpp index 5e03259f14d6..64da3ddb67cb 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Pet.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Pet.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Pet.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/Pet.h index d3132e239a00..4c1106f0ce2f 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Pet.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Pet.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ReadOnlyFirst.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/ReadOnlyFirst.cpp index 490c78ea3b70..036d7f80b52a 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ReadOnlyFirst.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ReadOnlyFirst.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/ReadOnlyFirst.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/ReadOnlyFirst.h index bff6dca45571..c24d57254556 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/ReadOnlyFirst.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/ReadOnlyFirst.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Return.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/Return.cpp index e086f60ac34f..b541e7f5a67d 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Return.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Return.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Return.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/Return.h index 6e65b11ab46e..e37268b88c1a 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Return.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Return.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/SingleRefType.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/SingleRefType.cpp index f0e9b092ac8a..64a5bba64507 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/SingleRefType.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/SingleRefType.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/SingleRefType.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/SingleRefType.h index f4dca375ef41..40ce96531787 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/SingleRefType.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/SingleRefType.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Tag.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/Tag.cpp index 9fa44cffa57d..279984549178 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Tag.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Tag.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Tag.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/Tag.h index 64264c4b754b..23a8064981b9 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Tag.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Tag.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/User.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/User.cpp index c145c4f06f60..867bd99903d6 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/User.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/User.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/User.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/User.h index 21508b1c7a31..3208a015d822 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/User.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/User.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/_foo_get_default_response.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/_foo_get_default_response.cpp index 140d76ee8251..8b0d1a049716 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/_foo_get_default_response.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/_foo_get_default_response.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/_foo_get_default_response.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/_foo_get_default_response.h index 7981d432ae90..c253d0a4fbe9 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/_foo_get_default_response.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/_foo_get_default_response.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/_special_model_name_.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/_special_model_name_.cpp index 017b0dfb6d30..c865e3c08254 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/_special_model_name_.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/_special_model_name_.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/_special_model_name_.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/_special_model_name_.h index 41c1946fc180..47174bdb340b 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/_special_model_name_.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/_special_model_name_.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/helpers.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/helpers.h index 5c5c40ede8c2..1777c3b1e35f 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/helpers.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/helpers.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/r_200_response.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/r_200_response.cpp index aaabff86a048..112925d39e10 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/r_200_response.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/r_200_response.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/r_200_response.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/r_200_response.h index 10a3cd6466d9..d343697ca47a 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/r_200_response.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/r_200_response.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 7.0.1-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 7.1.0-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/erlang-server/.openapi-generator/VERSION b/samples/server/petstore/erlang-server/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/erlang-server/.openapi-generator/VERSION +++ b/samples/server/petstore/erlang-server/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-api-server/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/go-api-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-chi-server/.openapi-generator/VERSION b/samples/server/petstore/go-chi-server/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/go-chi-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-chi-server/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-echo-server/.openapi-generator/VERSION b/samples/server/petstore/go-echo-server/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/go-echo-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-echo-server/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION +++ b/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/haskell-servant/.openapi-generator/VERSION b/samples/server/petstore/haskell-servant/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/haskell-servant/.openapi-generator/VERSION +++ b/samples/server/petstore/haskell-servant/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/haskell-yesod/.openapi-generator/VERSION b/samples/server/petstore/haskell-yesod/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/haskell-yesod/.openapi-generator/VERSION +++ b/samples/server/petstore/haskell-yesod/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-camel/.openapi-generator/VERSION b/samples/server/petstore/java-camel/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-camel/.openapi-generator/VERSION +++ b/samples/server/petstore/java-camel/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-camel/pom.xml b/samples/server/petstore/java-camel/pom.xml index 8839408e1183..24185d23d5df 100644 --- a/samples/server/petstore/java-camel/pom.xml +++ b/samples/server/petstore/java-camel/pom.xml @@ -1,6 +1,6 @@ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/RestConfiguration.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/RestConfiguration.java index 71d83999d33a..3ee63ee3c211 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/RestConfiguration.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/RestConfiguration.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/ValidationErrorProcessor.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/ValidationErrorProcessor.java index e3760163ba04..a061a61c7b13 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/ValidationErrorProcessor.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/ValidationErrorProcessor.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApi.java index 34919f768b61..6a3545cb3488 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiRoutesImpl.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiRoutesImpl.java index c2486ee7aba6..50588aebaa8a 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiRoutesImpl.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiRoutesImpl.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiValidator.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiValidator.java index ec61491400da..dbb016feedb6 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiValidator.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/PetApiValidator.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApi.java index 904f43b5de36..e8f0a41a0e0c 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiRoutesImpl.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiRoutesImpl.java index de44a796ff6f..e946f024254b 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiRoutesImpl.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiRoutesImpl.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiValidator.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiValidator.java index ef6e562737f8..3e04b2a908d9 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiValidator.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/StoreApiValidator.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApi.java index 34a29877d105..4686d6ba018a 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiRoutesImpl.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiRoutesImpl.java index 98c309662ef6..bae28e48aec3 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiRoutesImpl.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiRoutesImpl.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiValidator.java b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiValidator.java index 28ad21bf43a4..09f04702fe47 100644 --- a/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiValidator.java +++ b/samples/server/petstore/java-camel/src/main/java/org/openapitools/api/UserApiValidator.java @@ -1,5 +1,5 @@ /** -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/java-camel/src/main/resources/application.properties b/samples/server/petstore/java-camel/src/main/resources/application.properties index 38ca4561e636..9d51836e13ce 100644 --- a/samples/server/petstore/java-camel/src/main/resources/application.properties +++ b/samples/server/petstore/java-camel/src/main/resources/application.properties @@ -1,4 +1,4 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). # https://openapi-generator.tech # Do not edit the class manually. diff --git a/samples/server/petstore/java-helidon-server/mp/.openapi-generator/VERSION b/samples/server/petstore/java-helidon-server/mp/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-helidon-server/mp/.openapi-generator/VERSION +++ b/samples/server/petstore/java-helidon-server/mp/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-helidon-server/se/.openapi-generator/VERSION b/samples/server/petstore/java-helidon-server/se/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-helidon-server/se/.openapi-generator/VERSION +++ b/samples/server/petstore/java-helidon-server/se/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-micronaut-server/.openapi-generator/VERSION b/samples/server/petstore/java-micronaut-server/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-micronaut-server/.openapi-generator/VERSION +++ b/samples/server/petstore/java-micronaut-server/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION +++ b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION +++ b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-undertow/.openapi-generator/VERSION b/samples/server/petstore/java-undertow/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-undertow/.openapi-generator/VERSION +++ b/samples/server/petstore/java-undertow/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION b/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION +++ b/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/java8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/java8/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/java8/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-jakarta/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-jakarta/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec-jakarta/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-required-and-readonly-property/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-required-and-readonly-property/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs-spec-required-and-readonly-property/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec-required-and-readonly-property/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/julia/.openapi-generator/VERSION b/samples/server/petstore/julia/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/julia/.openapi-generator/VERSION +++ b/samples/server/petstore/julia/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server-modelMutable/README.md b/samples/server/petstore/kotlin-server-modelMutable/README.md index 4056dcac3a46..396cfb0211fd 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/README.md +++ b/samples/server/petstore/kotlin-server-modelMutable/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -Generated by OpenAPI Generator 7.0.1-SNAPSHOT. +Generated by OpenAPI Generator 7.1.0-SNAPSHOT. ## Requires diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec-mutiny/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/jaxrs-spec-mutiny/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/kotlin-server/jaxrs-spec-mutiny/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/jaxrs-spec-mutiny/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/README.md b/samples/server/petstore/kotlin-server/ktor/README.md index 4056dcac3a46..396cfb0211fd 100644 --- a/samples/server/petstore/kotlin-server/ktor/README.md +++ b/samples/server/petstore/kotlin-server/ktor/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -Generated by OpenAPI Generator 7.0.1-SNAPSHOT. +Generated by OpenAPI Generator 7.1.0-SNAPSHOT. ## Requires diff --git a/samples/server/petstore/kotlin-spring-default/.openapi-generator/VERSION b/samples/server/petstore/kotlin-spring-default/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/kotlin-spring-default/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-spring-default/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-3/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-3/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/kotlin-springboot-3/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-3/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt index a29a46ce8c25..d2987dc569ec 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt index 8c53554952c0..90bfc90caad3 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt index db3e868e042a..646c15b6b5e1 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-source-swagger1/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-source-swagger2/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-springfox/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-springfox/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-springfox/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION b/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION b/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-laravel/.openapi-generator/VERSION b/samples/server/petstore/php-laravel/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/php-laravel/.openapi-generator/VERSION +++ b/samples/server/petstore/php-laravel/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-lumen/.openapi-generator/VERSION b/samples/server/petstore/php-lumen/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/php-lumen/.openapi-generator/VERSION +++ b/samples/server/petstore/php-lumen/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-mezzio-ph-modern/.openapi-generator/VERSION b/samples/server/petstore/php-mezzio-ph-modern/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/php-mezzio-ph-modern/.openapi-generator/VERSION +++ b/samples/server/petstore/php-mezzio-ph-modern/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION b/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION +++ b/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-slim4/.openapi-generator/VERSION b/samples/server/petstore/php-slim4/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/php-slim4/.openapi-generator/VERSION +++ b/samples/server/petstore/php-slim4/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION +++ b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION +++ b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-fastapi/.openapi-generator/VERSION b/samples/server/petstore/python-fastapi/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/python-fastapi/.openapi-generator/VERSION +++ b/samples/server/petstore/python-fastapi/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-flask/.openapi-generator/VERSION b/samples/server/petstore/python-flask/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/python-flask/.openapi-generator/VERSION +++ b/samples/server/petstore/python-flask/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION +++ b/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/scala-akka-http-server/.openapi-generator/VERSION b/samples/server/petstore/scala-akka-http-server/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/scala-akka-http-server/.openapi-generator/VERSION +++ b/samples/server/petstore/scala-akka-http-server/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/scala-pekko-http-server/.openapi-generator/VERSION b/samples/server/petstore/scala-pekko-http-server/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/scala-pekko-http-server/.openapi-generator/VERSION +++ b/samples/server/petstore/scala-pekko-http-server/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator/VERSION b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java index 0179bd2406b0..e0e9847a99dd 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java index 173ca2a64051..517bd237005e 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 4eda1202f48b..5e679d5b62e2 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java index 5614dbd342b1..ce2393d89892 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java index affdab558979..47586e465675 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java index 169f2db020a5..2661be7d6f93 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/spring-boot-nullable-set/.openapi-generator/VERSION b/samples/server/petstore/spring-boot-nullable-set/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/spring-boot-nullable-set/.openapi-generator/VERSION +++ b/samples/server/petstore/spring-boot-nullable-set/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java index b87c728c1f62..f95486ad7c51 100644 --- a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java +++ b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 9234958328e4..d60c9b32c6ae 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index ac40279c6702..3dcedd31f23b 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 9204b12b4daa..d4656f9aa953 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 5b66d944d6d5..b2cf0f93b86f 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 6d21d62d5aea..3aaeb001372b 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 306658f7d86b..f1e788a25ee0 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java index 9234958328e4..d60c9b32c6ae 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index ac40279c6702..3dcedd31f23b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 9204b12b4daa..d4656f9aa953 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index 5b66d944d6d5..b2cf0f93b86f 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java index 6d21d62d5aea..3aaeb001372b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index 306658f7d86b..f1e788a25ee0 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 885b980112dd..b2a45de6de4f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index 601013398bea..02fe35584510 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index ea0212e8f6f7..83458c428f40 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 587ca2a3afc8..7e2e5e2a05f5 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java index 84cbe654d03f..9900a5292ab7 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index 198f910d8a28..a1ad61656ecc 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate-no-response-entity/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate-no-response-entity/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApi.java index d8ffd84a05ea..9d6bf69ac902 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/StoreApi.java index d2338cf9d5a6..8330053569cb 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApi.java index 4bb5845ee8d3..e5ab02160644 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index 885b980112dd..b2a45de6de4f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 601013398bea..02fe35584510 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index ea0212e8f6f7..83458c428f40 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 587ca2a3afc8..7e2e5e2a05f5 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index 84cbe654d03f..9900a5292ab7 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index 198f910d8a28..a1ad61656ecc 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/.openapi-generator/VERSION b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java index 140d6723e26d..31a61e163e0a 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java index 14d151ca88f4..5c7d2045127c 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java index 3646738445ac..332118a3a8f9 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 9234958328e4..d60c9b32c6ae 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 21a90acea537..99c6d2fbfb0a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 9204b12b4daa..d4656f9aa953 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index d35c2712c7c0..caabebd7fe93 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index 6d21d62d5aea..3aaeb001372b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index 306658f7d86b..f1e788a25ee0 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/.openapi-generator/VERSION b/samples/server/petstore/springboot-reactive-noResponseEntity/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java index 5fd2f041ea7d..c12111c12b6a 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java index c9470e15a9f6..1eec5cb7b63a 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 6ae6221f10ce..d1ddf7923568 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java index c829f96faab3..f9ce5228674c 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java index 176ce193bd99..d8cd87bde1bc 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java index 8888d10a3419..ccfa4727894b 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index 63bff975e837..e6508cac77b0 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index 1ce75cf75866..79fccb4b4319 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 7c94855e2576..e7f7463edc91 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index ad3bea158ffa..ea3b8e9fdd1a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index f1aa7603251f..415ce7a4302a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index 6ab51b2669a6..dd53db4fc544 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 0c66a6df9e91..77479419f4f7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java index e6dd5e4b6d7d..7a09e5086848 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 75dcd2b4cafe..9dd2cfed87c2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java index ee3bfb25acad..91fda48a66ab 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java index b39009ef0a29..25f2ff66b02d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java index 720feb4841a0..1bedbe96f29e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/VersioningApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/VersioningApi.java index 742df37d8a91..c337669679f7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/VersioningApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/VersioningApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java index 0c66a6df9e91..77479419f4f7 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java index e6dd5e4b6d7d..7a09e5086848 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 75dcd2b4cafe..9dd2cfed87c2 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java index ee3bfb25acad..91fda48a66ab 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java index b39009ef0a29..25f2ff66b02d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java index 720feb4841a0..1bedbe96f29e 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/VersioningApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/VersioningApi.java index de437d13eb10..2d60e0f233dd 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/VersioningApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/VersioningApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 13e7750a673c..92f1cead2d7f 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java index 0c7b0e1f5dc2..ec315896a8e8 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 74e3f9d28e3d..afa48af929f0 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java index bd0ff13e064f..8c1fe9173b69 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java index e6b744c0d716..95d169bee8ac 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java index 2f5518b0be32..86cf8340c590 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/VersioningApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/VersioningApi.java index 72e89aad7a5a..b0b7c549fe8f 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/VersioningApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/VersioningApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 13e7750a673c..92f1cead2d7f 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index 0c7b0e1f5dc2..ec315896a8e8 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 74e3f9d28e3d..afa48af929f0 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index bd0ff13e064f..8c1fe9173b69 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index e6b744c0d716..95d169bee8ac 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 2f5518b0be32..86cf8340c590 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/VersioningApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/VersioningApi.java index d6218131e1b8..16f10f4f0e89 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/VersioningApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/VersioningApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index 9234958328e4..d60c9b32c6ae 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index 19bcbf722b64..67991eb5e7fb 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 9204b12b4daa..d4656f9aa953 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index 1f4666c06f11..2585f8e5e8b0 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 6d21d62d5aea..3aaeb001372b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index 306658f7d86b..f1e788a25ee0 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java index ad41e9c9ef51..6054f5963bb2 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index 9410ee5fea14..3ddc4c175c7a 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java index 797fde369996..61a6861c282e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java index 8e2dde048bf3..96df22adeb43 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java index 3909de6bcb9e..3780fd4e0b3f 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java index 3613163eb4a8..adef91f65b1a 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/.openapi-generator/VERSION b/samples/server/petstore/springboot/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100644 --- a/samples/server/petstore/springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/springboot/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java index de6cbc323f73..0f02c6dd185a 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index 72ec8da42af4..6547d6369957 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index d02d318ce7ed..34f4335f2f13 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index f00f524a494a..b8b35dd72272 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index a6e21e5f79ee..539e6cda50b1 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 38b1a0fc06a3..1b3cdf967fdc 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ From bab67e44e49422f51aca84d0ac1cc3987f443c62 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 18 Sep 2023 17:37:52 +0800 Subject: [PATCH 30/59] add -SkipPublisherCheck (#16610) --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 96804576fc0d..c3d56f5f7de9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,7 +13,7 @@ install: - cmd: docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore - ps: Start-Sleep -s 120 - ps: $PSVersionTable.PSVersion - - ps: Install-Module -Name Pester -Force -Scope CurrentUser + - ps: Install-Module -Name Pester -Force -Scope CurrentUser -SkipPublisherCheck build_script: - dotnet --info # build C# aspnetcore 5.0 server From df994b77f212a10b0c86f093fd4869e8514199e4 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 19 Sep 2023 13:49:06 +0800 Subject: [PATCH 31/59] fix mapping options in gradle plugin (#16616) --- .../generator/gradle/plugin/OpenApiGeneratorPlugin.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt index 41da31505fb1..3947d3806ee4 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt @@ -119,6 +119,9 @@ class OpenApiGeneratorPlugin : Plugin { schemaMappings.set(generate.schemaMappings) inlineSchemaNameMappings.set(generate.inlineSchemaNameMappings) inlineSchemaOptions.set(generate.inlineSchemaOptions) + nameMappings.set(generate.nameMappings) + modelNameMappings.set(generate.modelNameMappings) + parameterNameMappings.set(generate.parameterNameMappings) openapiNormalizer.set(generate.openapiNormalizer) invokerPackage.set(generate.invokerPackage) groupId.set(generate.groupId) From 69bc994ba7c3b5b7e612fb721d71216850f2ff86 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 19 Sep 2023 18:13:58 +0800 Subject: [PATCH 32/59] Update sponsor (#16619) * add BairesDev to the sponsor list * add dmTECH --- README.md | 2 ++ website/src/dynamic/sponsors.yml | 10 ++++++++++ website/static/img/companies/bairesdev.png | Bin 0 -> 2611 bytes 3 files changed, 12 insertions(+) create mode 100644 website/static/img/companies/bairesdev.png diff --git a/README.md b/README.md index 485c20162f05..2f24e3798969 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,8 @@ If you find OpenAPI Generator useful for work, please consider asking your compa [](https://www.finbourne.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) [](https://bump.sh/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) [](https://www.bileto.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) +[](https://www.bairesdev.com/sponsoring-open-source-projects/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) +[](https://www.dm-jobs.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) #### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS and Checkly for sponsoring the API monitoring diff --git a/website/src/dynamic/sponsors.yml b/website/src/dynamic/sponsors.yml index 141e64e59890..ae1de21047d7 100644 --- a/website/src/dynamic/sponsors.yml +++ b/website/src/dynamic/sponsors.yml @@ -73,3 +73,13 @@ image: "img/companies/bileto.png" infoLink: "https://www.bileto.com/?utm_source=openapi_generator&utm_medium=official_website&utm_campaign=sponsor" bronze: true +- + caption: "BairesDev" + image: "img/companies/bairesdev.png" + infoLink: "https://www.bairesdev.com/sponsoring-open-source-projects/" + bronze: true +- + caption: "dmTECH" + image: "img/companies/dmtech.jpeg" + infoLink: "https://www.dm-jobs.com/" + bronze: true diff --git a/website/static/img/companies/bairesdev.png b/website/static/img/companies/bairesdev.png new file mode 100644 index 0000000000000000000000000000000000000000..31df8c5385e4c8a85c5df00c94221e5febc11b62 GIT binary patch literal 2611 zcmb7Ghc_E)6h~`@gjP^uZ>c>Rtx}^+DY0Wji<@0!>!aFAiG z9BhocLf(v>0i4*oPBdwj_ z44Il3+J!T3F8T-Az6G;=ZmsuBXf)M>CVR8CDJ>_)@otA#c{M2h85A z$+3zO+6CaF2-f7jDDIio2@;6DsTNXYw zArz9{A#m~UgOk>gPxm-U#GBQ=Q34lcxA=jPK3#S_%WvzCPOs`6 zD{<___?)PnPG3L#>bE`89<%w=nid$&bw0w0h~OUEe+C*nVPCq54?9%-@!HD5?9r5` z5lm$QP+Cae}f=&|uVA6~Jflw&ydL z=xT%S6|kr8G$AW?rPuY(Rt-8c!>7$kAG_0f&UrrZ{y0SBV?|@axAVkH;84444gI<> z5c!bK4;pwzg1DQtfGg|_mN%4Jrkvfr9u@rowqc>EPPtM%bUDU`uVXle99Pk_>pp4YxjOC)){LX?6mUV-sx(=7-du(zdBBjoe}&%H`GH z!&xlmyI1_M6W?Bs7JoOE#L<#bJ6AA*&t8T`u{;7MPwRYiffeFJuP){8KIWdQ9UpRd z@1Z4_zJcjqxfOkDK-yJ#h1Zrr3M>;%z$_{t4@>5Aa~})UKydR!*W$xNZOg_x&cZAY zl^}amqARNK;o6dpk2tR;P3SB$SF5)OUlW`9RC9HD__)wZ4gz4*+@rL=WW%hE=ty|? zHl~t}w9!fO=?51gnp>P}J;O#{;lAZ>%W<(ZD=%yc4|cRGb6F%V8+;51;8@8R&v$BR zQ+T&l=p_ZgL;IFaF3UZd8+?61x2Or7D7}b0RWfgO7+NhX*N3o>=}owOP(gsIu5=0@ z?gtijRET*=?Xa$`jO82e-ZmPGcl$A~v?7y^l?Tk@00f-p*n=t{yhEd1%>(XT3mKK{ z=(G_9K4E-U3(tbHhRji6`E>|>&mpG9Qn7bvVqjLf*`dY}>~wQ7$s=6*Qt%7fR12vi zs{nUae5r;oht(SMmB!JCb8$RUzrrsK;Nm;$;1E6;ePkzX$OEeX{u|dW=s2~{9+X29 zvWRfDD#50q30w}cq=-sxxHoF&(Hznl+Se~pAj(my38@uA=)D zi#jOoZcxP9^#nA<-HYLPiU5sKfo3xESfP2MEsIl90xHls=_c)5|Dxp=F_L>*90RZq*mv)Ckqa+$9CVFDoFudU>E#<0$)(yI zUn>9_Q1XTKom$>0L0*6|(LD+&{`SKFBP7kyaAG$t>F3mLPCI%1=^#ob+aAWn-lPof zh-6McV6*>;&$NKGf$LwZ$)(r5QH(4^S~SIjC+Zh{dqdpK*ENy){yD}Xq4okFM5=1M zbZ8uVn5LDq29Ay1lF2EJ6l@=ftDg%n#EIeo}6k?2dJY$F%YQ<*xCc}3E<)7HBsn(U1~-!A1WHShYF4i6w{Icr~hz;A*~ zUmgvOI{a54HPAN-^rs0q+h|^CDM{V^sNuID5wS@zDOD~hiaQqifRv{yPAO^lq;M^< zEAyTU>?)?eC}1JMP^?S!c)%=>)<6cgE+FvLl0O<#0EBWJj^(4WRGJ%Y3`hiL`$UrE(Nnex%b z{sw1AkEj)#QG?Xz*_xjQRq44Q<)|G$q0~GiXeq(%OUD;}Yh8X!f8@^gqj061Xf-JY zs~MbuJJo&@^I=`gqx%Fdj7c%2A|K5XGe!k7%!^g&_sLx|PO7e=x8lCgtQx_GU8s_F zkH4K2^gLuizb2c;6Fl?&YiKf_Q;=Oy1t>DC0yL#$?IHE3n69KWI5I#ClHyaFw!3ev z@JCw^qiu|lz4p8OGup>-8gJ~2BHp|>KFQRAIQjQqA*w!XNxsJGS6}e9H|ssJuoQML zx&;Pxg2@E*6WIM*W4U6xty1C5M{5E)e>qDQ<_YK?S0D>sXiN%Wd+6z+D=KW+oaR$6bzFV}GbDlyqkmE2 z&pwc%XaEz~A57i~yCBlJz_P=T2D|{_Sd@RU9N#tge$l}<_4L-HxSm!TG%Tv4v#(V9 z9`=qy=XSz==l1s#+W7&(N*u3=u%xg>O42wsJ&(HZRtsAi{O5VI+3u^xE0~SbPZ+xQ zQZFbJLlY{hpFtqx4x~9$JWj Date: Wed, 20 Sep 2023 04:48:31 +0200 Subject: [PATCH 33/59] python: remove non-async code path from the aiohttp generator (#16601) * python: remove non-async code path from the aiohttp generator This removes all the non-async code from the aiohttp generator: * all the methods that should be asynchronous are marked as `async` * the `async_req` parameter is gone; calls are directly awaitables now * the async calls into a thread pool are gone and the thread pool is gone too (now useless) Closes: #15824 Closes: #5539 Related: #763 Related: #3696 * Fix empty line * remove more --- .../src/main/resources/python/api.mustache | 38 +- .../main/resources/python/api_client.mustache | 103 ++- .../python/openapi_client/api_client.py | 43 +- .../petstore_api/api/another_fake_api.py | 34 +- .../petstore_api/api/default_api.py | 34 +- .../petstore_api/api/fake_api.py | 714 +++--------------- .../api/fake_classname_tags123_api.py | 34 +- .../petstore_api/api/pet_api.py | 306 +------- .../petstore_api/api/store_api.py | 136 +--- .../petstore_api/api/user_api.py | 272 +------ .../python-aiohttp/petstore_api/api_client.py | 95 +-- .../python-aiohttp/tests/test_api_client.py | 5 - .../petstore/python-aiohttp/tests/util.py | 3 +- .../python/petstore_api/api_client.py | 43 +- 14 files changed, 344 insertions(+), 1516 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/api.mustache b/modules/openapi-generator/src/main/resources/python/api.mustache index 740f2b2f20db..2b5c37ff50a4 100644 --- a/modules/openapi-generator/src/main/resources/python/api.mustache +++ b/modules/openapi-generator/src/main/resources/python/api.mustache @@ -37,35 +37,34 @@ class {{classname}}: self.api_client = api_client {{#operation}} + @validate_arguments {{#asyncio}} - @overload async def {{operationId}}(self, {{#allParams}}{{paramName}} : {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}}, {{/allParams}}**kwargs) -> {{{returnType}}}{{^returnType}}None{{/returnType}}: # noqa: E501 - ... - - @overload - def {{operationId}}(self, {{#allParams}}{{paramName}} : {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}}, {{/allParams}}async_req: Optional[bool]=True, **kwargs) -> {{{returnType}}}{{^returnType}}None{{/returnType}}: # noqa: E501 - ... - {{/asyncio}} - @validate_arguments - def {{operationId}}(self, {{#allParams}}{{paramName}} : {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}}, {{/allParams}}{{#asyncio}}async_req: Optional[bool]=None, {{/asyncio}}**kwargs) -> {{#asyncio}}Union[{{{returnType}}}{{^returnType}}None{{/returnType}}, Awaitable[{{{returnType}}}{{^returnType}}None{{/returnType}}]]{{/asyncio}}{{^asyncio}}{{{returnType}}}{{^returnType}}None{{/returnType}}{{/asyncio}}: # noqa: E501 +{{^asyncio}} + def {{operationId}}(self, {{#allParams}}{{paramName}} : {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}}, {{/allParams}}**kwargs) -> {{{returnType}}}{{^returnType}}None{{/returnType}}: # noqa: E501 +{{/asyncio}} """{{#isDeprecated}}(Deprecated) {{/isDeprecated}}{{{summary}}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501 {{#notes}} {{{.}}} # noqa: E501 {{/notes}} +{{^asyncio}} This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.{{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}async_req=True) >>> result = thread.get() +{{/asyncio}} {{#allParams}} :param {{paramName}}:{{#description}} {{{.}}}{{/description}}{{#required}} (required){{/required}}{{#optional}}(optional){{/optional}} :type {{paramName}}: {{dataType}}{{#optional}}, optional{{/optional}} {{/allParams}} +{{^asyncio}} :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional +{{/asyncio}} :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -79,31 +78,36 @@ class {{classname}}: if '_preload_content' in kwargs: message = "Error! Please call the {{operationId}}_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) -{{#asyncio}} - if async_req is not None: - kwargs['async_req'] = async_req -{{/asyncio}} - return self.{{operationId}}_with_http_info({{#allParams}}{{paramName}}, {{/allParams}}**kwargs) # noqa: E501 + return {{#asyncio}}await {{/asyncio}}self.{{operationId}}_with_http_info({{#allParams}}{{paramName}}, {{/allParams}}**kwargs) # noqa: E501 @validate_arguments +{{#asyncio}} + async def {{operationId}}_with_http_info(self, {{#allParams}}{{paramName}} : {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}}, {{/allParams}}**kwargs) -> ApiResponse: # noqa: E501 +{{/asyncio}} +{{^asyncio}} def {{operationId}}_with_http_info(self, {{#allParams}}{{paramName}} : {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}}, {{/allParams}}**kwargs) -> ApiResponse: # noqa: E501 +{{/asyncio}} """{{#isDeprecated}}(Deprecated) {{/isDeprecated}}{{{summary}}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501 {{#notes}} {{{.}}} # noqa: E501 {{/notes}} +{{^asyncio}} This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.{{operationId}}_with_http_info({{#allParams}}{{paramName}}, {{/allParams}}async_req=True) >>> result = thread.get() +{{/asyncio}} {{#allParams}} :param {{paramName}}:{{#description}} {{{.}}}{{/description}}{{#required}} (required){{/required}}{{#optional}}(optional){{/optional}} :type {{paramName}}: {{dataType}}{{#optional}}, optional{{/optional}} {{/allParams}} +{{^asyncio}} :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional +{{/asyncio}} :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -156,7 +160,9 @@ class {{classname}}: ] _all_params.extend( [ +{{^asyncio}} 'async_req', +{{/asyncio}} '_return_http_data_only', '_preload_content', '_request_timeout', @@ -290,7 +296,7 @@ class {{classname}}: _response_types_map = {} {{/returnType}} - return self.api_client.call_api( + return {{#asyncio}}await {{/asyncio}}self.api_client.call_api( '{{{path}}}', '{{httpMethod}}', _path_params, _query_params, @@ -300,7 +306,9 @@ class {{classname}}: files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, +{{^asyncio}} async_req=_params.get('async_req'), +{{/asyncio}} _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), diff --git a/modules/openapi-generator/src/main/resources/python/api_client.mustache b/modules/openapi-generator/src/main/resources/python/api_client.mustache index f0cdac8bb4ad..0870094d7835 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -7,7 +7,9 @@ import datetime from dateutil.parser import parse import json import mimetypes +{{^asyncio}} from multiprocessing.pool import ThreadPool +{{/asyncio}} import os import re import tempfile @@ -38,8 +40,10 @@ class ApiClient: the API. :param cookie: a cookie to include in the header when making calls to the API +{{^asyncio}} :param pool_threads: The number of threads to use for async requests to the API. More threads means more concurrent API requests. +{{/asyncio}} """ PRIMITIVE_TYPES = (float, bool, bytes, str, int) @@ -56,12 +60,14 @@ class ApiClient: _pool = None def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=1) -> None: + cookie=None{{^asyncio}}, pool_threads=1{{/asyncio}}) -> None: # use default configuration if none is provided if configuration is None: configuration = Configuration.get_default() self.configuration = configuration +{{^asyncio}} self.pool_threads = pool_threads +{{/asyncio}} self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} @@ -72,25 +78,24 @@ class ApiClient: self.user_agent = '{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/python{{/httpUserAgent}}' self.client_side_validation = configuration.client_side_validation - {{#asyncio}} +{{#asyncio}} async def __aenter__(self): return self async def __aexit__(self, exc_type, exc_value, traceback): await self.close() - {{/asyncio}} - {{^asyncio}} + + async def close(self): + await self.rest_client.close() +{{/asyncio}} +{{^asyncio}} def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): self.close() - {{/asyncio}} - {{#asyncio}}async {{/asyncio}}def close(self): - {{#asyncio}} - await self.rest_client.close() - {{/asyncio}} + def close(self): if self._pool: self._pool.close() self._pool.join() @@ -107,6 +112,7 @@ class ApiClient: atexit.register(self.close) self._pool = ThreadPool(self.pool_threads) return self._pool +{{/asyncio}} @property def user_agent(self): @@ -230,7 +236,7 @@ class ApiClient: self.last_response = response_data - return_data = None # assuming derialization is not needed + return_data = None # assuming deserialization is not needed # data needs deserialization or returns HTTP data (deserialized) only if _preload_content or _return_http_data_only: response_type = response_types_map.get(str(response_data.status), None) @@ -376,17 +382,19 @@ class ApiClient: else: return self.__deserialize_model(data, klass) - def call_api(self, resource_path, method, + {{#asyncio}}async {{/asyncio}}def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_types_map=None, auth_settings=None, - async_req=None, _return_http_data_only=None, + {{^asyncio}}async_req=None, {{/asyncio}}_return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None, _host=None, _request_auth=None): """Makes the HTTP request (synchronous) and returns deserialized data. +{{^asyncio}} To make an async_req request, set the async_req parameter. +{{/asyncio}} :param resource_path: Path to method endpoint. :param method: Method to call. :param path_params: Path parameters in the url. @@ -400,7 +408,9 @@ class ApiClient: :param response: Response data type. :param files dict: key -> filename, value -> filepath, for `multipart/form-data`. +{{^asyncio}} :param async_req bool: execute request asynchronously +{{/asyncio}} :param _return_http_data_only: response data instead of ApiResponse object with status code, headers, etc :param _preload_content: if False, the ApiResponse.data will @@ -418,58 +428,69 @@ class ApiClient: in the spec for a single request. :type _request_token: dict, optional :return: +{{#asyncio}} + The response. +{{/asyncio}} +{{^asyncio}} If async_req parameter is True, the request will be called asynchronously. The method will return the request thread. If parameter async_req is False or missing, then the method will return the response directly. +{{/asyncio}} """ + args = ( + resource_path, + method, + path_params, + query_params, + header_params, + body, + post_params, + files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, + _request_auth, + ) +{{#asyncio}} + return await self.__call_api(*args) +{{/asyncio}} +{{^asyncio}} if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_types_map, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host, - _request_auth) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_types_map, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, _request_auth)) - - def request(self, method, url, query_params=None, headers=None, + return self.__call_api(*args) + + return self.pool.apply_async(self.__call_api, args) +{{/asyncio}} + + {{#asyncio}}async {{/asyncio}}def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, _request_timeout=None): """Makes the HTTP request using RESTClient.""" if method == "GET": - return self.rest_client.get_request(url, + return {{#asyncio}}await {{/asyncio}}self.rest_client.get_request(url, query_params=query_params, _preload_content=_preload_content, _request_timeout=_request_timeout, headers=headers) elif method == "HEAD": - return self.rest_client.head_request(url, + return {{#asyncio}}await {{/asyncio}}self.rest_client.head_request(url, query_params=query_params, _preload_content=_preload_content, _request_timeout=_request_timeout, headers=headers) elif method == "OPTIONS": - return self.rest_client.options_request(url, + return {{#asyncio}}await {{/asyncio}}self.rest_client.options_request(url, query_params=query_params, headers=headers, _preload_content=_preload_content, _request_timeout=_request_timeout) elif method == "POST": - return self.rest_client.post_request(url, + return {{#asyncio}}await {{/asyncio}}self.rest_client.post_request(url, query_params=query_params, headers=headers, post_params=post_params, @@ -477,7 +498,7 @@ class ApiClient: _request_timeout=_request_timeout, body=body) elif method == "PUT": - return self.rest_client.put_request(url, + return {{#asyncio}}await {{/asyncio}}self.rest_client.put_request(url, query_params=query_params, headers=headers, post_params=post_params, @@ -485,7 +506,7 @@ class ApiClient: _request_timeout=_request_timeout, body=body) elif method == "PATCH": - return self.rest_client.patch_request(url, + return {{#asyncio}}await {{/asyncio}}self.rest_client.patch_request(url, query_params=query_params, headers=headers, post_params=post_params, @@ -493,7 +514,7 @@ class ApiClient: _request_timeout=_request_timeout, body=body) elif method == "DELETE": - return self.rest_client.delete_request(url, + return {{#asyncio}}await {{/asyncio}}self.rest_client.delete_request(url, query_params=query_params, headers=headers, _preload_content=_preload_content, diff --git a/samples/client/echo_api/python/openapi_client/api_client.py b/samples/client/echo_api/python/openapi_client/api_client.py index bce37fffa085..962fad87d685 100644 --- a/samples/client/echo_api/python/openapi_client/api_client.py +++ b/samples/client/echo_api/python/openapi_client/api_client.py @@ -223,7 +223,7 @@ def __call_api( self.last_response = response_data - return_data = None # assuming derialization is not needed + return_data = None # assuming deserialization is not needed # data needs deserialization or returns HTTP data (deserialized) only if _preload_content or _return_http_data_only: response_type = response_types_map.get(str(response_data.status), None) @@ -406,27 +406,28 @@ def call_api(self, resource_path, method, If parameter async_req is False or missing, then the method will return the response directly. """ + args = ( + resource_path, + method, + path_params, + query_params, + header_params, + body, + post_params, + files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, + _request_auth, + ) if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_types_map, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host, - _request_auth) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_types_map, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, _request_auth)) + return self.__call_api(*args) + + return self.pool.apply_async(self.__call_api, args) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/another_fake_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/another_fake_api.py index 140dcf434609..1fa3f57bcb28 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/another_fake_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/another_fake_api.py @@ -44,29 +44,14 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @overload - async def call_123_test_special_tags(self, client : Annotated[Client, Field(..., description="client model")], **kwargs) -> Client: # noqa: E501 - ... - - @overload - def call_123_test_special_tags(self, client : Annotated[Client, Field(..., description="client model")], async_req: Optional[bool]=True, **kwargs) -> Client: # noqa: E501 - ... - @validate_arguments - def call_123_test_special_tags(self, client : Annotated[Client, Field(..., description="client model")], async_req: Optional[bool]=None, **kwargs) -> Union[Client, Awaitable[Client]]: # noqa: E501 + async def call_123_test_special_tags(self, client : Annotated[Client, Field(..., description="client model")], **kwargs) -> Client: # noqa: E501 """To test special tags # noqa: E501 To test special tags and operation ID starting with number # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.call_123_test_special_tags(client, async_req=True) - >>> result = thread.get() :param client: client model (required) :type client: Client - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -80,25 +65,16 @@ def call_123_test_special_tags(self, client : Annotated[Client, Field(..., descr if '_preload_content' in kwargs: message = "Error! Please call the call_123_test_special_tags_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.call_123_test_special_tags_with_http_info(client, **kwargs) # noqa: E501 + return await self.call_123_test_special_tags_with_http_info(client, **kwargs) # noqa: E501 @validate_arguments - def call_123_test_special_tags_with_http_info(self, client : Annotated[Client, Field(..., description="client model")], **kwargs) -> ApiResponse: # noqa: E501 + async def call_123_test_special_tags_with_http_info(self, client : Annotated[Client, Field(..., description="client model")], **kwargs) -> ApiResponse: # noqa: E501 """To test special tags # noqa: E501 To test special tags and operation ID starting with number # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.call_123_test_special_tags_with_http_info(client, async_req=True) - >>> result = thread.get() :param client: client model (required) :type client: Client - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -129,7 +105,6 @@ def call_123_test_special_tags_with_http_info(self, client : Annotated[Client, F ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -184,7 +159,7 @@ def call_123_test_special_tags_with_http_info(self, client : Annotated[Client, F '200': "Client", } - return self.api_client.call_api( + return await self.api_client.call_api( '/another-fake/dummy', 'PATCH', _path_params, _query_params, @@ -194,7 +169,6 @@ def call_123_test_special_tags_with_http_info(self, client : Annotated[Client, F files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/default_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/default_api.py index be02dd6b8a7e..d2812fd326f2 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/default_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/default_api.py @@ -41,26 +41,11 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @overload - async def foo_get(self, **kwargs) -> FooGetDefaultResponse: # noqa: E501 - ... - - @overload - def foo_get(self, async_req: Optional[bool]=True, **kwargs) -> FooGetDefaultResponse: # noqa: E501 - ... - @validate_arguments - def foo_get(self, async_req: Optional[bool]=None, **kwargs) -> Union[FooGetDefaultResponse, Awaitable[FooGetDefaultResponse]]: # noqa: E501 + async def foo_get(self, **kwargs) -> FooGetDefaultResponse: # noqa: E501 """foo_get # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.foo_get(async_req=True) - >>> result = thread.get() - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -74,22 +59,13 @@ def foo_get(self, async_req: Optional[bool]=None, **kwargs) -> Union[FooGetDefau if '_preload_content' in kwargs: message = "Error! Please call the foo_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.foo_get_with_http_info(**kwargs) # noqa: E501 + return await self.foo_get_with_http_info(**kwargs) # noqa: E501 @validate_arguments - def foo_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + async def foo_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """foo_get # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.foo_get_with_http_info(async_req=True) - >>> result = thread.get() - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -119,7 +95,6 @@ def foo_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -163,7 +138,7 @@ def foo_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 _response_types_map = { } - return self.api_client.call_api( + return await self.api_client.call_api( '/foo', 'GET', _path_params, _query_params, @@ -173,7 +148,6 @@ def foo_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py index 3c0ef29b788f..17c8a17a918c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py @@ -56,28 +56,13 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @overload - async def fake_any_type_request_body(self, body : Optional[Dict[str, Any]] = None, **kwargs) -> None: # noqa: E501 - ... - - @overload - def fake_any_type_request_body(self, body : Optional[Dict[str, Any]] = None, async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def fake_any_type_request_body(self, body : Optional[Dict[str, Any]] = None, async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def fake_any_type_request_body(self, body : Optional[Dict[str, Any]] = None, **kwargs) -> None: # noqa: E501 """test any type request body # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_any_type_request_body(body, async_req=True) - >>> result = thread.get() :param body: :type body: object - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -91,24 +76,15 @@ def fake_any_type_request_body(self, body : Optional[Dict[str, Any]] = None, asy if '_preload_content' in kwargs: message = "Error! Please call the fake_any_type_request_body_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.fake_any_type_request_body_with_http_info(body, **kwargs) # noqa: E501 + return await self.fake_any_type_request_body_with_http_info(body, **kwargs) # noqa: E501 @validate_arguments - def fake_any_type_request_body_with_http_info(self, body : Optional[Dict[str, Any]] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_any_type_request_body_with_http_info(self, body : Optional[Dict[str, Any]] = None, **kwargs) -> ApiResponse: # noqa: E501 """test any type request body # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_any_type_request_body_with_http_info(body, async_req=True) - >>> result = thread.get() :param body: :type body: object - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -139,7 +115,6 @@ def fake_any_type_request_body_with_http_info(self, body : Optional[Dict[str, An ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -188,7 +163,7 @@ def fake_any_type_request_body_with_http_info(self, body : Optional[Dict[str, An _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/any_type_body', 'POST', _path_params, _query_params, @@ -198,35 +173,19 @@ def fake_any_type_request_body_with_http_info(self, body : Optional[Dict[str, An files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def fake_enum_ref_query_parameter(self, enum_ref : Annotated[Optional[EnumClass], Field(description="enum reference")] = None, **kwargs) -> None: # noqa: E501 - ... - - @overload - def fake_enum_ref_query_parameter(self, enum_ref : Annotated[Optional[EnumClass], Field(description="enum reference")] = None, async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def fake_enum_ref_query_parameter(self, enum_ref : Annotated[Optional[EnumClass], Field(description="enum reference")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def fake_enum_ref_query_parameter(self, enum_ref : Annotated[Optional[EnumClass], Field(description="enum reference")] = None, **kwargs) -> None: # noqa: E501 """test enum reference query parameter # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_enum_ref_query_parameter(enum_ref, async_req=True) - >>> result = thread.get() :param enum_ref: enum reference :type enum_ref: EnumClass - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -240,24 +199,15 @@ def fake_enum_ref_query_parameter(self, enum_ref : Annotated[Optional[EnumClass] if '_preload_content' in kwargs: message = "Error! Please call the fake_enum_ref_query_parameter_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.fake_enum_ref_query_parameter_with_http_info(enum_ref, **kwargs) # noqa: E501 + return await self.fake_enum_ref_query_parameter_with_http_info(enum_ref, **kwargs) # noqa: E501 @validate_arguments - def fake_enum_ref_query_parameter_with_http_info(self, enum_ref : Annotated[Optional[EnumClass], Field(description="enum reference")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_enum_ref_query_parameter_with_http_info(self, enum_ref : Annotated[Optional[EnumClass], Field(description="enum reference")] = None, **kwargs) -> ApiResponse: # noqa: E501 """test enum reference query parameter # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_enum_ref_query_parameter_with_http_info(enum_ref, async_req=True) - >>> result = thread.get() :param enum_ref: enum reference :type enum_ref: EnumClass - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -288,7 +238,6 @@ def fake_enum_ref_query_parameter_with_http_info(self, enum_ref : Annotated[Opti ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -330,7 +279,7 @@ def fake_enum_ref_query_parameter_with_http_info(self, enum_ref : Annotated[Opti _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/enum_ref_query_parameter', 'GET', _path_params, _query_params, @@ -340,33 +289,17 @@ def fake_enum_ref_query_parameter_with_http_info(self, enum_ref : Annotated[Opti files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def fake_health_get(self, **kwargs) -> HealthCheckResult: # noqa: E501 - ... - - @overload - def fake_health_get(self, async_req: Optional[bool]=True, **kwargs) -> HealthCheckResult: # noqa: E501 - ... - @validate_arguments - def fake_health_get(self, async_req: Optional[bool]=None, **kwargs) -> Union[HealthCheckResult, Awaitable[HealthCheckResult]]: # noqa: E501 + async def fake_health_get(self, **kwargs) -> HealthCheckResult: # noqa: E501 """Health check endpoint # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.fake_health_get(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -380,22 +313,13 @@ def fake_health_get(self, async_req: Optional[bool]=None, **kwargs) -> Union[Hea if '_preload_content' in kwargs: message = "Error! Please call the fake_health_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.fake_health_get_with_http_info(**kwargs) # noqa: E501 + return await self.fake_health_get_with_http_info(**kwargs) # noqa: E501 @validate_arguments - def fake_health_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_health_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Health check endpoint # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_health_get_with_http_info(async_req=True) - >>> result = thread.get() - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -425,7 +349,6 @@ def fake_health_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -470,7 +393,7 @@ def fake_health_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 '200': "HealthCheckResult", } - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/health', 'GET', _path_params, _query_params, @@ -480,30 +403,16 @@ def fake_health_get_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def fake_http_signature_test(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], query_1 : Annotated[Optional[StrictStr], Field(description="query parameter")] = None, header_1 : Annotated[Optional[StrictStr], Field(description="header parameter")] = None, **kwargs) -> None: # noqa: E501 - ... - - @overload - def fake_http_signature_test(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], query_1 : Annotated[Optional[StrictStr], Field(description="query parameter")] = None, header_1 : Annotated[Optional[StrictStr], Field(description="header parameter")] = None, async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def fake_http_signature_test(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], query_1 : Annotated[Optional[StrictStr], Field(description="query parameter")] = None, header_1 : Annotated[Optional[StrictStr], Field(description="header parameter")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def fake_http_signature_test(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], query_1 : Annotated[Optional[StrictStr], Field(description="query parameter")] = None, header_1 : Annotated[Optional[StrictStr], Field(description="header parameter")] = None, **kwargs) -> None: # noqa: E501 """test http signature authentication # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_http_signature_test(pet, query_1, header_1, async_req=True) - >>> result = thread.get() :param pet: Pet object that needs to be added to the store (required) :type pet: Pet @@ -511,8 +420,6 @@ def fake_http_signature_test(self, pet : Annotated[Pet, Field(..., description=" :type query_1: str :param header_1: header parameter :type header_1: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -526,19 +433,12 @@ def fake_http_signature_test(self, pet : Annotated[Pet, Field(..., description=" if '_preload_content' in kwargs: message = "Error! Please call the fake_http_signature_test_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.fake_http_signature_test_with_http_info(pet, query_1, header_1, **kwargs) # noqa: E501 + return await self.fake_http_signature_test_with_http_info(pet, query_1, header_1, **kwargs) # noqa: E501 @validate_arguments - def fake_http_signature_test_with_http_info(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], query_1 : Annotated[Optional[StrictStr], Field(description="query parameter")] = None, header_1 : Annotated[Optional[StrictStr], Field(description="header parameter")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_http_signature_test_with_http_info(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], query_1 : Annotated[Optional[StrictStr], Field(description="query parameter")] = None, header_1 : Annotated[Optional[StrictStr], Field(description="header parameter")] = None, **kwargs) -> ApiResponse: # noqa: E501 """test http signature authentication # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_http_signature_test_with_http_info(pet, query_1, header_1, async_req=True) - >>> result = thread.get() :param pet: Pet object that needs to be added to the store (required) :type pet: Pet @@ -546,8 +446,6 @@ def fake_http_signature_test_with_http_info(self, pet : Annotated[Pet, Field(... :type query_1: str :param header_1: header parameter :type header_1: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -580,7 +478,6 @@ def fake_http_signature_test_with_http_info(self, pet : Annotated[Pet, Field(... ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -635,7 +532,7 @@ def fake_http_signature_test_with_http_info(self, pet : Annotated[Pet, Field(... _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/http-signature-test', 'GET', _path_params, _query_params, @@ -645,36 +542,20 @@ def fake_http_signature_test_with_http_info(self, pet : Annotated[Pet, Field(... files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def fake_outer_boolean_serialize(self, body : Annotated[Optional[StrictBool], Field(description="Input boolean as post body")] = None, **kwargs) -> bool: # noqa: E501 - ... - - @overload - def fake_outer_boolean_serialize(self, body : Annotated[Optional[StrictBool], Field(description="Input boolean as post body")] = None, async_req: Optional[bool]=True, **kwargs) -> bool: # noqa: E501 - ... - @validate_arguments - def fake_outer_boolean_serialize(self, body : Annotated[Optional[StrictBool], Field(description="Input boolean as post body")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[bool, Awaitable[bool]]: # noqa: E501 + async def fake_outer_boolean_serialize(self, body : Annotated[Optional[StrictBool], Field(description="Input boolean as post body")] = None, **kwargs) -> bool: # noqa: E501 """fake_outer_boolean_serialize # noqa: E501 Test serialization of outer boolean types # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_outer_boolean_serialize(body, async_req=True) - >>> result = thread.get() :param body: Input boolean as post body :type body: bool - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -688,25 +569,16 @@ def fake_outer_boolean_serialize(self, body : Annotated[Optional[StrictBool], Fi if '_preload_content' in kwargs: message = "Error! Please call the fake_outer_boolean_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.fake_outer_boolean_serialize_with_http_info(body, **kwargs) # noqa: E501 + return await self.fake_outer_boolean_serialize_with_http_info(body, **kwargs) # noqa: E501 @validate_arguments - def fake_outer_boolean_serialize_with_http_info(self, body : Annotated[Optional[StrictBool], Field(description="Input boolean as post body")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_outer_boolean_serialize_with_http_info(self, body : Annotated[Optional[StrictBool], Field(description="Input boolean as post body")] = None, **kwargs) -> ApiResponse: # noqa: E501 """fake_outer_boolean_serialize # noqa: E501 Test serialization of outer boolean types # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_outer_boolean_serialize_with_http_info(body, async_req=True) - >>> result = thread.get() :param body: Input boolean as post body :type body: bool - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -737,7 +609,6 @@ def fake_outer_boolean_serialize_with_http_info(self, body : Annotated[Optional[ ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -792,7 +663,7 @@ def fake_outer_boolean_serialize_with_http_info(self, body : Annotated[Optional[ '200': "bool", } - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/outer/boolean', 'POST', _path_params, _query_params, @@ -802,36 +673,20 @@ def fake_outer_boolean_serialize_with_http_info(self, body : Annotated[Optional[ files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def fake_outer_composite_serialize(self, outer_composite : Annotated[Optional[OuterComposite], Field(description="Input composite as post body")] = None, **kwargs) -> OuterComposite: # noqa: E501 - ... - - @overload - def fake_outer_composite_serialize(self, outer_composite : Annotated[Optional[OuterComposite], Field(description="Input composite as post body")] = None, async_req: Optional[bool]=True, **kwargs) -> OuterComposite: # noqa: E501 - ... - @validate_arguments - def fake_outer_composite_serialize(self, outer_composite : Annotated[Optional[OuterComposite], Field(description="Input composite as post body")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[OuterComposite, Awaitable[OuterComposite]]: # noqa: E501 + async def fake_outer_composite_serialize(self, outer_composite : Annotated[Optional[OuterComposite], Field(description="Input composite as post body")] = None, **kwargs) -> OuterComposite: # noqa: E501 """fake_outer_composite_serialize # noqa: E501 Test serialization of object with outer number type # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_outer_composite_serialize(outer_composite, async_req=True) - >>> result = thread.get() :param outer_composite: Input composite as post body :type outer_composite: OuterComposite - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -845,25 +700,16 @@ def fake_outer_composite_serialize(self, outer_composite : Annotated[Optional[Ou if '_preload_content' in kwargs: message = "Error! Please call the fake_outer_composite_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.fake_outer_composite_serialize_with_http_info(outer_composite, **kwargs) # noqa: E501 + return await self.fake_outer_composite_serialize_with_http_info(outer_composite, **kwargs) # noqa: E501 @validate_arguments - def fake_outer_composite_serialize_with_http_info(self, outer_composite : Annotated[Optional[OuterComposite], Field(description="Input composite as post body")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_outer_composite_serialize_with_http_info(self, outer_composite : Annotated[Optional[OuterComposite], Field(description="Input composite as post body")] = None, **kwargs) -> ApiResponse: # noqa: E501 """fake_outer_composite_serialize # noqa: E501 Test serialization of object with outer number type # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_outer_composite_serialize_with_http_info(outer_composite, async_req=True) - >>> result = thread.get() :param outer_composite: Input composite as post body :type outer_composite: OuterComposite - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -894,7 +740,6 @@ def fake_outer_composite_serialize_with_http_info(self, outer_composite : Annota ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -949,7 +794,7 @@ def fake_outer_composite_serialize_with_http_info(self, outer_composite : Annota '200': "OuterComposite", } - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/outer/composite', 'POST', _path_params, _query_params, @@ -959,36 +804,20 @@ def fake_outer_composite_serialize_with_http_info(self, outer_composite : Annota files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def fake_outer_number_serialize(self, body : Annotated[Optional[float], Field(description="Input number as post body")] = None, **kwargs) -> float: # noqa: E501 - ... - - @overload - def fake_outer_number_serialize(self, body : Annotated[Optional[float], Field(description="Input number as post body")] = None, async_req: Optional[bool]=True, **kwargs) -> float: # noqa: E501 - ... - @validate_arguments - def fake_outer_number_serialize(self, body : Annotated[Optional[float], Field(description="Input number as post body")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[float, Awaitable[float]]: # noqa: E501 + async def fake_outer_number_serialize(self, body : Annotated[Optional[float], Field(description="Input number as post body")] = None, **kwargs) -> float: # noqa: E501 """fake_outer_number_serialize # noqa: E501 Test serialization of outer number types # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_outer_number_serialize(body, async_req=True) - >>> result = thread.get() :param body: Input number as post body :type body: float - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1002,25 +831,16 @@ def fake_outer_number_serialize(self, body : Annotated[Optional[float], Field(de if '_preload_content' in kwargs: message = "Error! Please call the fake_outer_number_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.fake_outer_number_serialize_with_http_info(body, **kwargs) # noqa: E501 + return await self.fake_outer_number_serialize_with_http_info(body, **kwargs) # noqa: E501 @validate_arguments - def fake_outer_number_serialize_with_http_info(self, body : Annotated[Optional[float], Field(description="Input number as post body")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_outer_number_serialize_with_http_info(self, body : Annotated[Optional[float], Field(description="Input number as post body")] = None, **kwargs) -> ApiResponse: # noqa: E501 """fake_outer_number_serialize # noqa: E501 Test serialization of outer number types # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_outer_number_serialize_with_http_info(body, async_req=True) - >>> result = thread.get() :param body: Input number as post body :type body: float - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -1051,7 +871,6 @@ def fake_outer_number_serialize_with_http_info(self, body : Annotated[Optional[f ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -1106,7 +925,7 @@ def fake_outer_number_serialize_with_http_info(self, body : Annotated[Optional[f '200': "float", } - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/outer/number', 'POST', _path_params, _query_params, @@ -1116,36 +935,20 @@ def fake_outer_number_serialize_with_http_info(self, body : Annotated[Optional[f files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def fake_outer_string_serialize(self, body : Annotated[Optional[StrictStr], Field(description="Input string as post body")] = None, **kwargs) -> str: # noqa: E501 - ... - - @overload - def fake_outer_string_serialize(self, body : Annotated[Optional[StrictStr], Field(description="Input string as post body")] = None, async_req: Optional[bool]=True, **kwargs) -> str: # noqa: E501 - ... - @validate_arguments - def fake_outer_string_serialize(self, body : Annotated[Optional[StrictStr], Field(description="Input string as post body")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[str, Awaitable[str]]: # noqa: E501 + async def fake_outer_string_serialize(self, body : Annotated[Optional[StrictStr], Field(description="Input string as post body")] = None, **kwargs) -> str: # noqa: E501 """fake_outer_string_serialize # noqa: E501 Test serialization of outer string types # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_outer_string_serialize(body, async_req=True) - >>> result = thread.get() :param body: Input string as post body :type body: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1159,25 +962,16 @@ def fake_outer_string_serialize(self, body : Annotated[Optional[StrictStr], Fiel if '_preload_content' in kwargs: message = "Error! Please call the fake_outer_string_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.fake_outer_string_serialize_with_http_info(body, **kwargs) # noqa: E501 + return await self.fake_outer_string_serialize_with_http_info(body, **kwargs) # noqa: E501 @validate_arguments - def fake_outer_string_serialize_with_http_info(self, body : Annotated[Optional[StrictStr], Field(description="Input string as post body")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_outer_string_serialize_with_http_info(self, body : Annotated[Optional[StrictStr], Field(description="Input string as post body")] = None, **kwargs) -> ApiResponse: # noqa: E501 """fake_outer_string_serialize # noqa: E501 Test serialization of outer string types # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_outer_string_serialize_with_http_info(body, async_req=True) - >>> result = thread.get() :param body: Input string as post body :type body: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -1208,7 +1002,6 @@ def fake_outer_string_serialize_with_http_info(self, body : Annotated[Optional[S ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -1263,7 +1056,7 @@ def fake_outer_string_serialize_with_http_info(self, body : Annotated[Optional[S '200': "str", } - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/outer/string', 'POST', _path_params, _query_params, @@ -1273,36 +1066,20 @@ def fake_outer_string_serialize_with_http_info(self, body : Annotated[Optional[S files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def fake_property_enum_integer_serialize(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(..., description="Input enum (int) as post body")], **kwargs) -> OuterObjectWithEnumProperty: # noqa: E501 - ... - - @overload - def fake_property_enum_integer_serialize(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(..., description="Input enum (int) as post body")], async_req: Optional[bool]=True, **kwargs) -> OuterObjectWithEnumProperty: # noqa: E501 - ... - @validate_arguments - def fake_property_enum_integer_serialize(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(..., description="Input enum (int) as post body")], async_req: Optional[bool]=None, **kwargs) -> Union[OuterObjectWithEnumProperty, Awaitable[OuterObjectWithEnumProperty]]: # noqa: E501 + async def fake_property_enum_integer_serialize(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(..., description="Input enum (int) as post body")], **kwargs) -> OuterObjectWithEnumProperty: # noqa: E501 """fake_property_enum_integer_serialize # noqa: E501 Test serialization of enum (int) properties with examples # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_property_enum_integer_serialize(outer_object_with_enum_property, async_req=True) - >>> result = thread.get() :param outer_object_with_enum_property: Input enum (int) as post body (required) :type outer_object_with_enum_property: OuterObjectWithEnumProperty - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1316,25 +1093,16 @@ def fake_property_enum_integer_serialize(self, outer_object_with_enum_property : if '_preload_content' in kwargs: message = "Error! Please call the fake_property_enum_integer_serialize_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.fake_property_enum_integer_serialize_with_http_info(outer_object_with_enum_property, **kwargs) # noqa: E501 + return await self.fake_property_enum_integer_serialize_with_http_info(outer_object_with_enum_property, **kwargs) # noqa: E501 @validate_arguments - def fake_property_enum_integer_serialize_with_http_info(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(..., description="Input enum (int) as post body")], **kwargs) -> ApiResponse: # noqa: E501 + async def fake_property_enum_integer_serialize_with_http_info(self, outer_object_with_enum_property : Annotated[OuterObjectWithEnumProperty, Field(..., description="Input enum (int) as post body")], **kwargs) -> ApiResponse: # noqa: E501 """fake_property_enum_integer_serialize # noqa: E501 Test serialization of enum (int) properties with examples # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_property_enum_integer_serialize_with_http_info(outer_object_with_enum_property, async_req=True) - >>> result = thread.get() :param outer_object_with_enum_property: Input enum (int) as post body (required) :type outer_object_with_enum_property: OuterObjectWithEnumProperty - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -1365,7 +1133,6 @@ def fake_property_enum_integer_serialize_with_http_info(self, outer_object_with_ ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -1420,7 +1187,7 @@ def fake_property_enum_integer_serialize_with_http_info(self, outer_object_with_ '200': "OuterObjectWithEnumProperty", } - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/property/enum-int', 'POST', _path_params, _query_params, @@ -1430,33 +1197,17 @@ def fake_property_enum_integer_serialize_with_http_info(self, outer_object_with_ files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def fake_return_list_of_objects(self, **kwargs) -> List[List[Tag]]: # noqa: E501 - ... - - @overload - def fake_return_list_of_objects(self, async_req: Optional[bool]=True, **kwargs) -> List[List[Tag]]: # noqa: E501 - ... - @validate_arguments - def fake_return_list_of_objects(self, async_req: Optional[bool]=None, **kwargs) -> Union[List[List[Tag]], Awaitable[List[List[Tag]]]]: # noqa: E501 + async def fake_return_list_of_objects(self, **kwargs) -> List[List[Tag]]: # noqa: E501 """test returning list of objects # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.fake_return_list_of_objects(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1470,22 +1221,13 @@ def fake_return_list_of_objects(self, async_req: Optional[bool]=None, **kwargs) if '_preload_content' in kwargs: message = "Error! Please call the fake_return_list_of_objects_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.fake_return_list_of_objects_with_http_info(**kwargs) # noqa: E501 + return await self.fake_return_list_of_objects_with_http_info(**kwargs) # noqa: E501 @validate_arguments - def fake_return_list_of_objects_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + async def fake_return_list_of_objects_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """test returning list of objects # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_return_list_of_objects_with_http_info(async_req=True) - >>> result = thread.get() - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -1515,7 +1257,6 @@ def fake_return_list_of_objects_with_http_info(self, **kwargs) -> ApiResponse: ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -1560,7 +1301,7 @@ def fake_return_list_of_objects_with_http_info(self, **kwargs) -> ApiResponse: '200': "List[List[Tag]]", } - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/return_list_of_object', 'GET', _path_params, _query_params, @@ -1570,35 +1311,19 @@ def fake_return_list_of_objects_with_http_info(self, **kwargs) -> ApiResponse: files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def fake_uuid_example(self, uuid_example : Annotated[StrictStr, Field(..., description="uuid example")], **kwargs) -> None: # noqa: E501 - ... - - @overload - def fake_uuid_example(self, uuid_example : Annotated[StrictStr, Field(..., description="uuid example")], async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def fake_uuid_example(self, uuid_example : Annotated[StrictStr, Field(..., description="uuid example")], async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def fake_uuid_example(self, uuid_example : Annotated[StrictStr, Field(..., description="uuid example")], **kwargs) -> None: # noqa: E501 """test uuid example # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_uuid_example(uuid_example, async_req=True) - >>> result = thread.get() :param uuid_example: uuid example (required) :type uuid_example: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1612,24 +1337,15 @@ def fake_uuid_example(self, uuid_example : Annotated[StrictStr, Field(..., descr if '_preload_content' in kwargs: message = "Error! Please call the fake_uuid_example_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.fake_uuid_example_with_http_info(uuid_example, **kwargs) # noqa: E501 + return await self.fake_uuid_example_with_http_info(uuid_example, **kwargs) # noqa: E501 @validate_arguments - def fake_uuid_example_with_http_info(self, uuid_example : Annotated[StrictStr, Field(..., description="uuid example")], **kwargs) -> ApiResponse: # noqa: E501 + async def fake_uuid_example_with_http_info(self, uuid_example : Annotated[StrictStr, Field(..., description="uuid example")], **kwargs) -> ApiResponse: # noqa: E501 """test uuid example # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.fake_uuid_example_with_http_info(uuid_example, async_req=True) - >>> result = thread.get() :param uuid_example: uuid example (required) :type uuid_example: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -1660,7 +1376,6 @@ def fake_uuid_example_with_http_info(self, uuid_example : Annotated[StrictStr, F ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -1702,7 +1417,7 @@ def fake_uuid_example_with_http_info(self, uuid_example : Annotated[StrictStr, F _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/uuid_example', 'GET', _path_params, _query_params, @@ -1712,36 +1427,20 @@ def fake_uuid_example_with_http_info(self, uuid_example : Annotated[StrictStr, F files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def test_body_with_binary(self, body : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(..., description="image to upload")], **kwargs) -> None: # noqa: E501 - ... - - @overload - def test_body_with_binary(self, body : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(..., description="image to upload")], async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def test_body_with_binary(self, body : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(..., description="image to upload")], async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def test_body_with_binary(self, body : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(..., description="image to upload")], **kwargs) -> None: # noqa: E501 """test_body_with_binary # noqa: E501 For this test, the body has to be a binary file. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_body_with_binary(body, async_req=True) - >>> result = thread.get() :param body: image to upload (required) :type body: bytearray - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1755,25 +1454,16 @@ def test_body_with_binary(self, body : Annotated[Optional[Union[StrictBytes, Str if '_preload_content' in kwargs: message = "Error! Please call the test_body_with_binary_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.test_body_with_binary_with_http_info(body, **kwargs) # noqa: E501 + return await self.test_body_with_binary_with_http_info(body, **kwargs) # noqa: E501 @validate_arguments - def test_body_with_binary_with_http_info(self, body : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(..., description="image to upload")], **kwargs) -> ApiResponse: # noqa: E501 + async def test_body_with_binary_with_http_info(self, body : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(..., description="image to upload")], **kwargs) -> ApiResponse: # noqa: E501 """test_body_with_binary # noqa: E501 For this test, the body has to be a binary file. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_body_with_binary_with_http_info(body, async_req=True) - >>> result = thread.get() :param body: image to upload (required) :type body: bytearray - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -1804,7 +1494,6 @@ def test_body_with_binary_with_http_info(self, body : Annotated[Optional[Union[S ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -1858,7 +1547,7 @@ def test_body_with_binary_with_http_info(self, body : Annotated[Optional[Union[S _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/body-with-binary', 'PUT', _path_params, _query_params, @@ -1868,36 +1557,20 @@ def test_body_with_binary_with_http_info(self, body : Annotated[Optional[Union[S files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def test_body_with_file_schema(self, file_schema_test_class : FileSchemaTestClass, **kwargs) -> None: # noqa: E501 - ... - - @overload - def test_body_with_file_schema(self, file_schema_test_class : FileSchemaTestClass, async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def test_body_with_file_schema(self, file_schema_test_class : FileSchemaTestClass, async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def test_body_with_file_schema(self, file_schema_test_class : FileSchemaTestClass, **kwargs) -> None: # noqa: E501 """test_body_with_file_schema # noqa: E501 For this test, the body for this request must reference a schema named `File`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_body_with_file_schema(file_schema_test_class, async_req=True) - >>> result = thread.get() :param file_schema_test_class: (required) :type file_schema_test_class: FileSchemaTestClass - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1911,25 +1584,16 @@ def test_body_with_file_schema(self, file_schema_test_class : FileSchemaTestClas if '_preload_content' in kwargs: message = "Error! Please call the test_body_with_file_schema_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.test_body_with_file_schema_with_http_info(file_schema_test_class, **kwargs) # noqa: E501 + return await self.test_body_with_file_schema_with_http_info(file_schema_test_class, **kwargs) # noqa: E501 @validate_arguments - def test_body_with_file_schema_with_http_info(self, file_schema_test_class : FileSchemaTestClass, **kwargs) -> ApiResponse: # noqa: E501 + async def test_body_with_file_schema_with_http_info(self, file_schema_test_class : FileSchemaTestClass, **kwargs) -> ApiResponse: # noqa: E501 """test_body_with_file_schema # noqa: E501 For this test, the body for this request must reference a schema named `File`. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_body_with_file_schema_with_http_info(file_schema_test_class, async_req=True) - >>> result = thread.get() :param file_schema_test_class: (required) :type file_schema_test_class: FileSchemaTestClass - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -1960,7 +1624,6 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class : Fil ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -2009,7 +1672,7 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class : Fil _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/body-with-file-schema', 'PUT', _path_params, _query_params, @@ -2019,37 +1682,21 @@ def test_body_with_file_schema_with_http_info(self, file_schema_test_class : Fil files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def test_body_with_query_params(self, query : StrictStr, user : User, **kwargs) -> None: # noqa: E501 - ... - - @overload - def test_body_with_query_params(self, query : StrictStr, user : User, async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def test_body_with_query_params(self, query : StrictStr, user : User, async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def test_body_with_query_params(self, query : StrictStr, user : User, **kwargs) -> None: # noqa: E501 """test_body_with_query_params # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_body_with_query_params(query, user, async_req=True) - >>> result = thread.get() :param query: (required) :type query: str :param user: (required) :type user: User - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2063,26 +1710,17 @@ def test_body_with_query_params(self, query : StrictStr, user : User, async_req: if '_preload_content' in kwargs: message = "Error! Please call the test_body_with_query_params_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.test_body_with_query_params_with_http_info(query, user, **kwargs) # noqa: E501 + return await self.test_body_with_query_params_with_http_info(query, user, **kwargs) # noqa: E501 @validate_arguments - def test_body_with_query_params_with_http_info(self, query : StrictStr, user : User, **kwargs) -> ApiResponse: # noqa: E501 + async def test_body_with_query_params_with_http_info(self, query : StrictStr, user : User, **kwargs) -> ApiResponse: # noqa: E501 """test_body_with_query_params # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_body_with_query_params_with_http_info(query, user, async_req=True) - >>> result = thread.get() :param query: (required) :type query: str :param user: (required) :type user: User - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -2114,7 +1752,6 @@ def test_body_with_query_params_with_http_info(self, query : StrictStr, user : U ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -2166,7 +1803,7 @@ def test_body_with_query_params_with_http_info(self, query : StrictStr, user : U _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/body-with-query-params', 'PUT', _path_params, _query_params, @@ -2176,36 +1813,20 @@ def test_body_with_query_params_with_http_info(self, query : StrictStr, user : U files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def test_client_model(self, client : Annotated[Client, Field(..., description="client model")], **kwargs) -> Client: # noqa: E501 - ... - - @overload - def test_client_model(self, client : Annotated[Client, Field(..., description="client model")], async_req: Optional[bool]=True, **kwargs) -> Client: # noqa: E501 - ... - @validate_arguments - def test_client_model(self, client : Annotated[Client, Field(..., description="client model")], async_req: Optional[bool]=None, **kwargs) -> Union[Client, Awaitable[Client]]: # noqa: E501 + async def test_client_model(self, client : Annotated[Client, Field(..., description="client model")], **kwargs) -> Client: # noqa: E501 """To test \"client\" model # noqa: E501 To test \"client\" model # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_client_model(client, async_req=True) - >>> result = thread.get() :param client: client model (required) :type client: Client - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2219,25 +1840,16 @@ def test_client_model(self, client : Annotated[Client, Field(..., description="c if '_preload_content' in kwargs: message = "Error! Please call the test_client_model_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.test_client_model_with_http_info(client, **kwargs) # noqa: E501 + return await self.test_client_model_with_http_info(client, **kwargs) # noqa: E501 @validate_arguments - def test_client_model_with_http_info(self, client : Annotated[Client, Field(..., description="client model")], **kwargs) -> ApiResponse: # noqa: E501 + async def test_client_model_with_http_info(self, client : Annotated[Client, Field(..., description="client model")], **kwargs) -> ApiResponse: # noqa: E501 """To test \"client\" model # noqa: E501 To test \"client\" model # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_client_model_with_http_info(client, async_req=True) - >>> result = thread.get() :param client: client model (required) :type client: Client - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -2268,7 +1880,6 @@ def test_client_model_with_http_info(self, client : Annotated[Client, Field(..., ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -2323,7 +1934,7 @@ def test_client_model_with_http_info(self, client : Annotated[Client, Field(..., '200': "Client", } - return self.api_client.call_api( + return await self.api_client.call_api( '/fake', 'PATCH', _path_params, _query_params, @@ -2333,37 +1944,21 @@ def test_client_model_with_http_info(self, client : Annotated[Client, Field(..., files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def test_date_time_query_parameter(self, date_time_query : datetime, str_query : StrictStr, **kwargs) -> None: # noqa: E501 - ... - - @overload - def test_date_time_query_parameter(self, date_time_query : datetime, str_query : StrictStr, async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def test_date_time_query_parameter(self, date_time_query : datetime, str_query : StrictStr, async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def test_date_time_query_parameter(self, date_time_query : datetime, str_query : StrictStr, **kwargs) -> None: # noqa: E501 """test_date_time_query_parameter # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_date_time_query_parameter(date_time_query, str_query, async_req=True) - >>> result = thread.get() :param date_time_query: (required) :type date_time_query: datetime :param str_query: (required) :type str_query: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2377,26 +1972,17 @@ def test_date_time_query_parameter(self, date_time_query : datetime, str_query : if '_preload_content' in kwargs: message = "Error! Please call the test_date_time_query_parameter_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.test_date_time_query_parameter_with_http_info(date_time_query, str_query, **kwargs) # noqa: E501 + return await self.test_date_time_query_parameter_with_http_info(date_time_query, str_query, **kwargs) # noqa: E501 @validate_arguments - def test_date_time_query_parameter_with_http_info(self, date_time_query : datetime, str_query : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + async def test_date_time_query_parameter_with_http_info(self, date_time_query : datetime, str_query : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 """test_date_time_query_parameter # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_date_time_query_parameter_with_http_info(date_time_query, str_query, async_req=True) - >>> result = thread.get() :param date_time_query: (required) :type date_time_query: datetime :param str_query: (required) :type str_query: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -2428,7 +2014,6 @@ def test_date_time_query_parameter_with_http_info(self, date_time_query : dateti ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -2476,7 +2061,7 @@ def test_date_time_query_parameter_with_http_info(self, date_time_query : dateti _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/date-time-query-params', 'PUT', _path_params, _query_params, @@ -2486,31 +2071,17 @@ def test_date_time_query_parameter_with_http_info(self, date_time_query : dateti files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def test_endpoint_parameters(self, number : Annotated[confloat(le=543.2, ge=32.1), Field(..., description="None")], double : Annotated[confloat(le=123.4, ge=67.8), Field(..., description="None")], pattern_without_delimiter : Annotated[constr(strict=True), Field(..., description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(..., description="None")], integer : Annotated[Optional[conint(strict=True, le=100, ge=10)], Field(description="None")] = None, int32 : Annotated[Optional[conint(strict=True, le=200, ge=20)], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, float : Annotated[Optional[confloat(le=987.6)], Field(description="None")] = None, string : Annotated[Optional[constr(strict=True)], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[conbytes(strict=True, max_length=64), constr(strict=True, max_length=64)]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[constr(strict=True, max_length=64, min_length=10)], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> None: # noqa: E501 - ... - - @overload - def test_endpoint_parameters(self, number : Annotated[confloat(le=543.2, ge=32.1), Field(..., description="None")], double : Annotated[confloat(le=123.4, ge=67.8), Field(..., description="None")], pattern_without_delimiter : Annotated[constr(strict=True), Field(..., description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(..., description="None")], integer : Annotated[Optional[conint(strict=True, le=100, ge=10)], Field(description="None")] = None, int32 : Annotated[Optional[conint(strict=True, le=200, ge=20)], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, float : Annotated[Optional[confloat(le=987.6)], Field(description="None")] = None, string : Annotated[Optional[constr(strict=True)], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[conbytes(strict=True, max_length=64), constr(strict=True, max_length=64)]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[constr(strict=True, max_length=64, min_length=10)], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def test_endpoint_parameters(self, number : Annotated[confloat(le=543.2, ge=32.1), Field(..., description="None")], double : Annotated[confloat(le=123.4, ge=67.8), Field(..., description="None")], pattern_without_delimiter : Annotated[constr(strict=True), Field(..., description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(..., description="None")], integer : Annotated[Optional[conint(strict=True, le=100, ge=10)], Field(description="None")] = None, int32 : Annotated[Optional[conint(strict=True, le=200, ge=20)], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, float : Annotated[Optional[confloat(le=987.6)], Field(description="None")] = None, string : Annotated[Optional[constr(strict=True)], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[conbytes(strict=True, max_length=64), constr(strict=True, max_length=64)]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[constr(strict=True, max_length=64, min_length=10)], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def test_endpoint_parameters(self, number : Annotated[confloat(le=543.2, ge=32.1), Field(..., description="None")], double : Annotated[confloat(le=123.4, ge=67.8), Field(..., description="None")], pattern_without_delimiter : Annotated[constr(strict=True), Field(..., description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(..., description="None")], integer : Annotated[Optional[conint(strict=True, le=100, ge=10)], Field(description="None")] = None, int32 : Annotated[Optional[conint(strict=True, le=200, ge=20)], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, float : Annotated[Optional[confloat(le=987.6)], Field(description="None")] = None, string : Annotated[Optional[constr(strict=True)], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[conbytes(strict=True, max_length=64), constr(strict=True, max_length=64)]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[constr(strict=True, max_length=64, min_length=10)], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> None: # noqa: E501 """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer, int32, int64, float, string, binary, byte_with_max_length, var_date, date_time, password, param_callback, async_req=True) - >>> result = thread.get() :param number: None (required) :type number: float @@ -2542,8 +2113,6 @@ def test_endpoint_parameters(self, number : Annotated[confloat(le=543.2, ge=32.1 :type password: str :param param_callback: None :type param_callback: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2557,20 +2126,13 @@ def test_endpoint_parameters(self, number : Annotated[confloat(le=543.2, ge=32.1 if '_preload_content' in kwargs: message = "Error! Please call the test_endpoint_parameters_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, integer, int32, int64, float, string, binary, byte_with_max_length, var_date, date_time, password, param_callback, **kwargs) # noqa: E501 + return await self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, integer, int32, int64, float, string, binary, byte_with_max_length, var_date, date_time, password, param_callback, **kwargs) # noqa: E501 @validate_arguments - def test_endpoint_parameters_with_http_info(self, number : Annotated[confloat(le=543.2, ge=32.1), Field(..., description="None")], double : Annotated[confloat(le=123.4, ge=67.8), Field(..., description="None")], pattern_without_delimiter : Annotated[constr(strict=True), Field(..., description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(..., description="None")], integer : Annotated[Optional[conint(strict=True, le=100, ge=10)], Field(description="None")] = None, int32 : Annotated[Optional[conint(strict=True, le=200, ge=20)], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, float : Annotated[Optional[confloat(le=987.6)], Field(description="None")] = None, string : Annotated[Optional[constr(strict=True)], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[conbytes(strict=True, max_length=64), constr(strict=True, max_length=64)]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[constr(strict=True, max_length=64, min_length=10)], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def test_endpoint_parameters_with_http_info(self, number : Annotated[confloat(le=543.2, ge=32.1), Field(..., description="None")], double : Annotated[confloat(le=123.4, ge=67.8), Field(..., description="None")], pattern_without_delimiter : Annotated[constr(strict=True), Field(..., description="None")], byte : Annotated[Union[StrictBytes, StrictStr], Field(..., description="None")], integer : Annotated[Optional[conint(strict=True, le=100, ge=10)], Field(description="None")] = None, int32 : Annotated[Optional[conint(strict=True, le=200, ge=20)], Field(description="None")] = None, int64 : Annotated[Optional[StrictInt], Field(description="None")] = None, float : Annotated[Optional[confloat(le=987.6)], Field(description="None")] = None, string : Annotated[Optional[constr(strict=True)], Field(description="None")] = None, binary : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="None")] = None, byte_with_max_length : Annotated[Optional[Union[conbytes(strict=True, max_length=64), constr(strict=True, max_length=64)]], Field(description="None")] = None, var_date : Annotated[Optional[date], Field(description="None")] = None, date_time : Annotated[Optional[datetime], Field(description="None")] = None, password : Annotated[Optional[constr(strict=True, max_length=64, min_length=10)], Field(description="None")] = None, param_callback : Annotated[Optional[StrictStr], Field(description="None")] = None, **kwargs) -> ApiResponse: # noqa: E501 """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, integer, int32, int64, float, string, binary, byte_with_max_length, var_date, date_time, password, param_callback, async_req=True) - >>> result = thread.get() :param number: None (required) :type number: float @@ -2602,8 +2164,6 @@ def test_endpoint_parameters_with_http_info(self, number : Annotated[confloat(le :type password: str :param param_callback: None :type param_callback: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -2648,7 +2208,6 @@ def test_endpoint_parameters_with_http_info(self, number : Annotated[confloat(le ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -2739,7 +2298,7 @@ def test_endpoint_parameters_with_http_info(self, number : Annotated[confloat(le _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/fake', 'POST', _path_params, _query_params, @@ -2749,31 +2308,17 @@ def test_endpoint_parameters_with_http_info(self, number : Annotated[confloat(le files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def test_group_parameters(self, required_string_group : Annotated[StrictInt, Field(..., description="Required String in group parameters")], required_boolean_group : Annotated[StrictBool, Field(..., description="Required Boolean in group parameters")], required_int64_group : Annotated[StrictInt, Field(..., description="Required Integer in group parameters")], string_group : Annotated[Optional[StrictInt], Field(description="String in group parameters")] = None, boolean_group : Annotated[Optional[StrictBool], Field(description="Boolean in group parameters")] = None, int64_group : Annotated[Optional[StrictInt], Field(description="Integer in group parameters")] = None, **kwargs) -> None: # noqa: E501 - ... - - @overload - def test_group_parameters(self, required_string_group : Annotated[StrictInt, Field(..., description="Required String in group parameters")], required_boolean_group : Annotated[StrictBool, Field(..., description="Required Boolean in group parameters")], required_int64_group : Annotated[StrictInt, Field(..., description="Required Integer in group parameters")], string_group : Annotated[Optional[StrictInt], Field(description="String in group parameters")] = None, boolean_group : Annotated[Optional[StrictBool], Field(description="Boolean in group parameters")] = None, int64_group : Annotated[Optional[StrictInt], Field(description="Integer in group parameters")] = None, async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def test_group_parameters(self, required_string_group : Annotated[StrictInt, Field(..., description="Required String in group parameters")], required_boolean_group : Annotated[StrictBool, Field(..., description="Required Boolean in group parameters")], required_int64_group : Annotated[StrictInt, Field(..., description="Required Integer in group parameters")], string_group : Annotated[Optional[StrictInt], Field(description="String in group parameters")] = None, boolean_group : Annotated[Optional[StrictBool], Field(description="Boolean in group parameters")] = None, int64_group : Annotated[Optional[StrictInt], Field(description="Integer in group parameters")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def test_group_parameters(self, required_string_group : Annotated[StrictInt, Field(..., description="Required String in group parameters")], required_boolean_group : Annotated[StrictBool, Field(..., description="Required Boolean in group parameters")], required_int64_group : Annotated[StrictInt, Field(..., description="Required Integer in group parameters")], string_group : Annotated[Optional[StrictInt], Field(description="String in group parameters")] = None, boolean_group : Annotated[Optional[StrictBool], Field(description="Boolean in group parameters")] = None, int64_group : Annotated[Optional[StrictInt], Field(description="Integer in group parameters")] = None, **kwargs) -> None: # noqa: E501 """Fake endpoint to test group parameters (optional) # noqa: E501 Fake endpoint to test group parameters (optional) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group, boolean_group, int64_group, async_req=True) - >>> result = thread.get() :param required_string_group: Required String in group parameters (required) :type required_string_group: int @@ -2787,8 +2332,6 @@ def test_group_parameters(self, required_string_group : Annotated[StrictInt, Fie :type boolean_group: bool :param int64_group: Integer in group parameters :type int64_group: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2802,20 +2345,13 @@ def test_group_parameters(self, required_string_group : Annotated[StrictInt, Fie if '_preload_content' in kwargs: message = "Error! Please call the test_group_parameters_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, string_group, boolean_group, int64_group, **kwargs) # noqa: E501 + return await self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, string_group, boolean_group, int64_group, **kwargs) # noqa: E501 @validate_arguments - def test_group_parameters_with_http_info(self, required_string_group : Annotated[StrictInt, Field(..., description="Required String in group parameters")], required_boolean_group : Annotated[StrictBool, Field(..., description="Required Boolean in group parameters")], required_int64_group : Annotated[StrictInt, Field(..., description="Required Integer in group parameters")], string_group : Annotated[Optional[StrictInt], Field(description="String in group parameters")] = None, boolean_group : Annotated[Optional[StrictBool], Field(description="Boolean in group parameters")] = None, int64_group : Annotated[Optional[StrictInt], Field(description="Integer in group parameters")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def test_group_parameters_with_http_info(self, required_string_group : Annotated[StrictInt, Field(..., description="Required String in group parameters")], required_boolean_group : Annotated[StrictBool, Field(..., description="Required Boolean in group parameters")], required_int64_group : Annotated[StrictInt, Field(..., description="Required Integer in group parameters")], string_group : Annotated[Optional[StrictInt], Field(description="String in group parameters")] = None, boolean_group : Annotated[Optional[StrictBool], Field(description="Boolean in group parameters")] = None, int64_group : Annotated[Optional[StrictInt], Field(description="Integer in group parameters")] = None, **kwargs) -> ApiResponse: # noqa: E501 """Fake endpoint to test group parameters (optional) # noqa: E501 Fake endpoint to test group parameters (optional) # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, string_group, boolean_group, int64_group, async_req=True) - >>> result = thread.get() :param required_string_group: Required String in group parameters (required) :type required_string_group: int @@ -2829,8 +2365,6 @@ def test_group_parameters_with_http_info(self, required_string_group : Annotated :type boolean_group: bool :param int64_group: Integer in group parameters :type int64_group: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -2866,7 +2400,6 @@ def test_group_parameters_with_http_info(self, required_string_group : Annotated ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -2923,7 +2456,7 @@ def test_group_parameters_with_http_info(self, required_string_group : Annotated _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/fake', 'DELETE', _path_params, _query_params, @@ -2933,36 +2466,20 @@ def test_group_parameters_with_http_info(self, required_string_group : Annotated files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def test_inline_additional_properties(self, request_body : Annotated[Dict[str, StrictStr], Field(..., description="request body")], **kwargs) -> None: # noqa: E501 - ... - - @overload - def test_inline_additional_properties(self, request_body : Annotated[Dict[str, StrictStr], Field(..., description="request body")], async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def test_inline_additional_properties(self, request_body : Annotated[Dict[str, StrictStr], Field(..., description="request body")], async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def test_inline_additional_properties(self, request_body : Annotated[Dict[str, StrictStr], Field(..., description="request body")], **kwargs) -> None: # noqa: E501 """test inline additionalProperties # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_inline_additional_properties(request_body, async_req=True) - >>> result = thread.get() :param request_body: request body (required) :type request_body: Dict[str, str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2976,25 +2493,16 @@ def test_inline_additional_properties(self, request_body : Annotated[Dict[str, S if '_preload_content' in kwargs: message = "Error! Please call the test_inline_additional_properties_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501 + return await self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501 @validate_arguments - def test_inline_additional_properties_with_http_info(self, request_body : Annotated[Dict[str, StrictStr], Field(..., description="request body")], **kwargs) -> ApiResponse: # noqa: E501 + async def test_inline_additional_properties_with_http_info(self, request_body : Annotated[Dict[str, StrictStr], Field(..., description="request body")], **kwargs) -> ApiResponse: # noqa: E501 """test inline additionalProperties # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_inline_additional_properties_with_http_info(request_body, async_req=True) - >>> result = thread.get() :param request_body: request body (required) :type request_body: Dict[str, str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -3025,7 +2533,6 @@ def test_inline_additional_properties_with_http_info(self, request_body : Annota ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -3074,7 +2581,7 @@ def test_inline_additional_properties_with_http_info(self, request_body : Annota _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/inline-additionalProperties', 'POST', _path_params, _query_params, @@ -3084,38 +2591,22 @@ def test_inline_additional_properties_with_http_info(self, request_body : Annota files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def test_json_form_data(self, param : Annotated[StrictStr, Field(..., description="field1")], param2 : Annotated[StrictStr, Field(..., description="field2")], **kwargs) -> None: # noqa: E501 - ... - - @overload - def test_json_form_data(self, param : Annotated[StrictStr, Field(..., description="field1")], param2 : Annotated[StrictStr, Field(..., description="field2")], async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def test_json_form_data(self, param : Annotated[StrictStr, Field(..., description="field1")], param2 : Annotated[StrictStr, Field(..., description="field2")], async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def test_json_form_data(self, param : Annotated[StrictStr, Field(..., description="field1")], param2 : Annotated[StrictStr, Field(..., description="field2")], **kwargs) -> None: # noqa: E501 """test json serialization of form data # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_json_form_data(param, param2, async_req=True) - >>> result = thread.get() :param param: field1 (required) :type param: str :param param2: field2 (required) :type param2: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3129,27 +2620,18 @@ def test_json_form_data(self, param : Annotated[StrictStr, Field(..., descriptio if '_preload_content' in kwargs: message = "Error! Please call the test_json_form_data_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 + return await self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 @validate_arguments - def test_json_form_data_with_http_info(self, param : Annotated[StrictStr, Field(..., description="field1")], param2 : Annotated[StrictStr, Field(..., description="field2")], **kwargs) -> ApiResponse: # noqa: E501 + async def test_json_form_data_with_http_info(self, param : Annotated[StrictStr, Field(..., description="field1")], param2 : Annotated[StrictStr, Field(..., description="field2")], **kwargs) -> ApiResponse: # noqa: E501 """test json serialization of form data # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_json_form_data_with_http_info(param, param2, async_req=True) - >>> result = thread.get() :param param: field1 (required) :type param: str :param param2: field2 (required) :type param2: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -3181,7 +2663,6 @@ def test_json_form_data_with_http_info(self, param : Annotated[StrictStr, Field( ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -3233,7 +2714,7 @@ def test_json_form_data_with_http_info(self, param : Annotated[StrictStr, Field( _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/jsonFormData', 'GET', _path_params, _query_params, @@ -3243,31 +2724,17 @@ def test_json_form_data_with_http_info(self, param : Annotated[StrictStr, Field( files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def test_query_parameter_collection_format(self, pipe : conlist(StrictStr), ioutil : conlist(StrictStr), http : conlist(StrictStr), url : conlist(StrictStr), context : conlist(StrictStr), allow_empty : StrictStr, language : Optional[Dict[str, StrictStr]] = None, **kwargs) -> None: # noqa: E501 - ... - - @overload - def test_query_parameter_collection_format(self, pipe : conlist(StrictStr), ioutil : conlist(StrictStr), http : conlist(StrictStr), url : conlist(StrictStr), context : conlist(StrictStr), allow_empty : StrictStr, language : Optional[Dict[str, StrictStr]] = None, async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def test_query_parameter_collection_format(self, pipe : conlist(StrictStr), ioutil : conlist(StrictStr), http : conlist(StrictStr), url : conlist(StrictStr), context : conlist(StrictStr), allow_empty : StrictStr, language : Optional[Dict[str, StrictStr]] = None, async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def test_query_parameter_collection_format(self, pipe : conlist(StrictStr), ioutil : conlist(StrictStr), http : conlist(StrictStr), url : conlist(StrictStr), context : conlist(StrictStr), allow_empty : StrictStr, language : Optional[Dict[str, StrictStr]] = None, **kwargs) -> None: # noqa: E501 """test_query_parameter_collection_format # noqa: E501 To test the collection format in query parameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_query_parameter_collection_format(pipe, ioutil, http, url, context, allow_empty, language, async_req=True) - >>> result = thread.get() :param pipe: (required) :type pipe: List[str] @@ -3283,8 +2750,6 @@ def test_query_parameter_collection_format(self, pipe : conlist(StrictStr), iout :type allow_empty: str :param language: :type language: Dict[str, str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3298,20 +2763,13 @@ def test_query_parameter_collection_format(self, pipe : conlist(StrictStr), iout if '_preload_content' in kwargs: message = "Error! Please call the test_query_parameter_collection_format_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.test_query_parameter_collection_format_with_http_info(pipe, ioutil, http, url, context, allow_empty, language, **kwargs) # noqa: E501 + return await self.test_query_parameter_collection_format_with_http_info(pipe, ioutil, http, url, context, allow_empty, language, **kwargs) # noqa: E501 @validate_arguments - def test_query_parameter_collection_format_with_http_info(self, pipe : conlist(StrictStr), ioutil : conlist(StrictStr), http : conlist(StrictStr), url : conlist(StrictStr), context : conlist(StrictStr), allow_empty : StrictStr, language : Optional[Dict[str, StrictStr]] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def test_query_parameter_collection_format_with_http_info(self, pipe : conlist(StrictStr), ioutil : conlist(StrictStr), http : conlist(StrictStr), url : conlist(StrictStr), context : conlist(StrictStr), allow_empty : StrictStr, language : Optional[Dict[str, StrictStr]] = None, **kwargs) -> ApiResponse: # noqa: E501 """test_query_parameter_collection_format # noqa: E501 To test the collection format in query parameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_query_parameter_collection_format_with_http_info(pipe, ioutil, http, url, context, allow_empty, language, async_req=True) - >>> result = thread.get() :param pipe: (required) :type pipe: List[str] @@ -3327,8 +2785,6 @@ def test_query_parameter_collection_format_with_http_info(self, pipe : conlist(S :type allow_empty: str :param language: :type language: Dict[str, str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -3365,7 +2821,6 @@ def test_query_parameter_collection_format_with_http_info(self, pipe : conlist(S ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -3430,7 +2885,7 @@ def test_query_parameter_collection_format_with_http_info(self, pipe : conlist(S _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/test-query-parameters', 'PUT', _path_params, _query_params, @@ -3440,7 +2895,6 @@ def test_query_parameter_collection_format_with_http_info(self, pipe : conlist(S files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_classname_tags123_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_classname_tags123_api.py index 6b9c88c1212f..6a63f0aed765 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_classname_tags123_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_classname_tags123_api.py @@ -44,29 +44,14 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @overload - async def test_classname(self, client : Annotated[Client, Field(..., description="client model")], **kwargs) -> Client: # noqa: E501 - ... - - @overload - def test_classname(self, client : Annotated[Client, Field(..., description="client model")], async_req: Optional[bool]=True, **kwargs) -> Client: # noqa: E501 - ... - @validate_arguments - def test_classname(self, client : Annotated[Client, Field(..., description="client model")], async_req: Optional[bool]=None, **kwargs) -> Union[Client, Awaitable[Client]]: # noqa: E501 + async def test_classname(self, client : Annotated[Client, Field(..., description="client model")], **kwargs) -> Client: # noqa: E501 """To test class name in snake case # noqa: E501 To test class name in snake case # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_classname(client, async_req=True) - >>> result = thread.get() :param client: client model (required) :type client: Client - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -80,25 +65,16 @@ def test_classname(self, client : Annotated[Client, Field(..., description="clie if '_preload_content' in kwargs: message = "Error! Please call the test_classname_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.test_classname_with_http_info(client, **kwargs) # noqa: E501 + return await self.test_classname_with_http_info(client, **kwargs) # noqa: E501 @validate_arguments - def test_classname_with_http_info(self, client : Annotated[Client, Field(..., description="client model")], **kwargs) -> ApiResponse: # noqa: E501 + async def test_classname_with_http_info(self, client : Annotated[Client, Field(..., description="client model")], **kwargs) -> ApiResponse: # noqa: E501 """To test class name in snake case # noqa: E501 To test class name in snake case # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.test_classname_with_http_info(client, async_req=True) - >>> result = thread.get() :param client: client model (required) :type client: Client - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -129,7 +105,6 @@ def test_classname_with_http_info(self, client : Annotated[Client, Field(..., de ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -184,7 +159,7 @@ def test_classname_with_http_info(self, client : Annotated[Client, Field(..., de '200': "Client", } - return self.api_client.call_api( + return await self.api_client.call_api( '/fake_classname_test', 'PATCH', _path_params, _query_params, @@ -194,7 +169,6 @@ def test_classname_with_http_info(self, client : Annotated[Client, Field(..., de files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py index 72e29e7d0429..3eb04cb7cefc 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py @@ -47,29 +47,14 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @overload - async def add_pet(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], **kwargs) -> None: # noqa: E501 - ... - - @overload - def add_pet(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def add_pet(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def add_pet(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], **kwargs) -> None: # noqa: E501 """Add a new pet to the store # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.add_pet(pet, async_req=True) - >>> result = thread.get() :param pet: Pet object that needs to be added to the store (required) :type pet: Pet - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -83,25 +68,16 @@ def add_pet(self, pet : Annotated[Pet, Field(..., description="Pet object that n if '_preload_content' in kwargs: message = "Error! Please call the add_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.add_pet_with_http_info(pet, **kwargs) # noqa: E501 + return await self.add_pet_with_http_info(pet, **kwargs) # noqa: E501 @validate_arguments - def add_pet_with_http_info(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], **kwargs) -> ApiResponse: # noqa: E501 + async def add_pet_with_http_info(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], **kwargs) -> ApiResponse: # noqa: E501 """Add a new pet to the store # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.add_pet_with_http_info(pet, async_req=True) - >>> result = thread.get() :param pet: Pet object that needs to be added to the store (required) :type pet: Pet - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -132,7 +108,6 @@ def add_pet_with_http_info(self, pet : Annotated[Pet, Field(..., description="Pe ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -181,7 +156,7 @@ def add_pet_with_http_info(self, pet : Annotated[Pet, Field(..., description="Pe _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/pet', 'POST', _path_params, _query_params, @@ -191,38 +166,22 @@ def add_pet_with_http_info(self, pet : Annotated[Pet, Field(..., description="Pe files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def delete_pet(self, pet_id : Annotated[StrictInt, Field(..., description="Pet id to delete")], api_key : Optional[StrictStr] = None, **kwargs) -> None: # noqa: E501 - ... - - @overload - def delete_pet(self, pet_id : Annotated[StrictInt, Field(..., description="Pet id to delete")], api_key : Optional[StrictStr] = None, async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def delete_pet(self, pet_id : Annotated[StrictInt, Field(..., description="Pet id to delete")], api_key : Optional[StrictStr] = None, async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def delete_pet(self, pet_id : Annotated[StrictInt, Field(..., description="Pet id to delete")], api_key : Optional[StrictStr] = None, **kwargs) -> None: # noqa: E501 """Deletes a pet # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_pet(pet_id, api_key, async_req=True) - >>> result = thread.get() :param pet_id: Pet id to delete (required) :type pet_id: int :param api_key: :type api_key: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -236,27 +195,18 @@ def delete_pet(self, pet_id : Annotated[StrictInt, Field(..., description="Pet i if '_preload_content' in kwargs: message = "Error! Please call the delete_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.delete_pet_with_http_info(pet_id, api_key, **kwargs) # noqa: E501 + return await self.delete_pet_with_http_info(pet_id, api_key, **kwargs) # noqa: E501 @validate_arguments - def delete_pet_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., description="Pet id to delete")], api_key : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def delete_pet_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., description="Pet id to delete")], api_key : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501 """Deletes a pet # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_pet_with_http_info(pet_id, api_key, async_req=True) - >>> result = thread.get() :param pet_id: Pet id to delete (required) :type pet_id: int :param api_key: :type api_key: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -288,7 +238,6 @@ def delete_pet_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., des ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -333,7 +282,7 @@ def delete_pet_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., des _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/pet/{petId}', 'DELETE', _path_params, _query_params, @@ -343,36 +292,20 @@ def delete_pet_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., des files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def find_pets_by_status(self, status : Annotated[conlist(StrictStr), Field(..., description="Status values that need to be considered for filter")], **kwargs) -> List[Pet]: # noqa: E501 - ... - - @overload - def find_pets_by_status(self, status : Annotated[conlist(StrictStr), Field(..., description="Status values that need to be considered for filter")], async_req: Optional[bool]=True, **kwargs) -> List[Pet]: # noqa: E501 - ... - @validate_arguments - def find_pets_by_status(self, status : Annotated[conlist(StrictStr), Field(..., description="Status values that need to be considered for filter")], async_req: Optional[bool]=None, **kwargs) -> Union[List[Pet], Awaitable[List[Pet]]]: # noqa: E501 + async def find_pets_by_status(self, status : Annotated[conlist(StrictStr), Field(..., description="Status values that need to be considered for filter")], **kwargs) -> List[Pet]: # noqa: E501 """Finds Pets by status # noqa: E501 Multiple status values can be provided with comma separated strings # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.find_pets_by_status(status, async_req=True) - >>> result = thread.get() :param status: Status values that need to be considered for filter (required) :type status: List[str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -386,25 +319,16 @@ def find_pets_by_status(self, status : Annotated[conlist(StrictStr), Field(..., if '_preload_content' in kwargs: message = "Error! Please call the find_pets_by_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 + return await self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 @validate_arguments - def find_pets_by_status_with_http_info(self, status : Annotated[conlist(StrictStr), Field(..., description="Status values that need to be considered for filter")], **kwargs) -> ApiResponse: # noqa: E501 + async def find_pets_by_status_with_http_info(self, status : Annotated[conlist(StrictStr), Field(..., description="Status values that need to be considered for filter")], **kwargs) -> ApiResponse: # noqa: E501 """Finds Pets by status # noqa: E501 Multiple status values can be provided with comma separated strings # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.find_pets_by_status_with_http_info(status, async_req=True) - >>> result = thread.get() :param status: Status values that need to be considered for filter (required) :type status: List[str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -435,7 +359,6 @@ def find_pets_by_status_with_http_info(self, status : Annotated[conlist(StrictSt ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -485,7 +408,7 @@ def find_pets_by_status_with_http_info(self, status : Annotated[conlist(StrictSt '400': None, } - return self.api_client.call_api( + return await self.api_client.call_api( '/pet/findByStatus', 'GET', _path_params, _query_params, @@ -495,36 +418,20 @@ def find_pets_by_status_with_http_info(self, status : Annotated[conlist(StrictSt files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def find_pets_by_tags(self, tags : Annotated[conlist(StrictStr, unique_items=True), Field(..., description="Tags to filter by")], **kwargs) -> List[Pet]: # noqa: E501 - ... - - @overload - def find_pets_by_tags(self, tags : Annotated[conlist(StrictStr, unique_items=True), Field(..., description="Tags to filter by")], async_req: Optional[bool]=True, **kwargs) -> List[Pet]: # noqa: E501 - ... - @validate_arguments - def find_pets_by_tags(self, tags : Annotated[conlist(StrictStr, unique_items=True), Field(..., description="Tags to filter by")], async_req: Optional[bool]=None, **kwargs) -> Union[List[Pet], Awaitable[List[Pet]]]: # noqa: E501 + async def find_pets_by_tags(self, tags : Annotated[conlist(StrictStr, unique_items=True), Field(..., description="Tags to filter by")], **kwargs) -> List[Pet]: # noqa: E501 """(Deprecated) Finds Pets by tags # noqa: E501 Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.find_pets_by_tags(tags, async_req=True) - >>> result = thread.get() :param tags: Tags to filter by (required) :type tags: List[str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -538,25 +445,16 @@ def find_pets_by_tags(self, tags : Annotated[conlist(StrictStr, unique_items=Tru if '_preload_content' in kwargs: message = "Error! Please call the find_pets_by_tags_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 + return await self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 @validate_arguments - def find_pets_by_tags_with_http_info(self, tags : Annotated[conlist(StrictStr, unique_items=True), Field(..., description="Tags to filter by")], **kwargs) -> ApiResponse: # noqa: E501 + async def find_pets_by_tags_with_http_info(self, tags : Annotated[conlist(StrictStr, unique_items=True), Field(..., description="Tags to filter by")], **kwargs) -> ApiResponse: # noqa: E501 """(Deprecated) Finds Pets by tags # noqa: E501 Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.find_pets_by_tags_with_http_info(tags, async_req=True) - >>> result = thread.get() :param tags: Tags to filter by (required) :type tags: List[str] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -589,7 +487,6 @@ def find_pets_by_tags_with_http_info(self, tags : Annotated[conlist(StrictStr, u ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -639,7 +536,7 @@ def find_pets_by_tags_with_http_info(self, tags : Annotated[conlist(StrictStr, u '400': None, } - return self.api_client.call_api( + return await self.api_client.call_api( '/pet/findByTags', 'GET', _path_params, _query_params, @@ -649,36 +546,20 @@ def find_pets_by_tags_with_http_info(self, tags : Annotated[conlist(StrictStr, u files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def get_pet_by_id(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to return")], **kwargs) -> Pet: # noqa: E501 - ... - - @overload - def get_pet_by_id(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to return")], async_req: Optional[bool]=True, **kwargs) -> Pet: # noqa: E501 - ... - @validate_arguments - def get_pet_by_id(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to return")], async_req: Optional[bool]=None, **kwargs) -> Union[Pet, Awaitable[Pet]]: # noqa: E501 + async def get_pet_by_id(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to return")], **kwargs) -> Pet: # noqa: E501 """Find pet by ID # noqa: E501 Returns a single pet # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_pet_by_id(pet_id, async_req=True) - >>> result = thread.get() :param pet_id: ID of pet to return (required) :type pet_id: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -692,25 +573,16 @@ def get_pet_by_id(self, pet_id : Annotated[StrictInt, Field(..., description="ID if '_preload_content' in kwargs: message = "Error! Please call the get_pet_by_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 + return await self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 @validate_arguments - def get_pet_by_id_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to return")], **kwargs) -> ApiResponse: # noqa: E501 + async def get_pet_by_id_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to return")], **kwargs) -> ApiResponse: # noqa: E501 """Find pet by ID # noqa: E501 Returns a single pet # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_pet_by_id_with_http_info(pet_id, async_req=True) - >>> result = thread.get() :param pet_id: ID of pet to return (required) :type pet_id: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -741,7 +613,6 @@ def get_pet_by_id_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -791,7 +662,7 @@ def get_pet_by_id_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., '404': None, } - return self.api_client.call_api( + return await self.api_client.call_api( '/pet/{petId}', 'GET', _path_params, _query_params, @@ -801,36 +672,20 @@ def get_pet_by_id_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def update_pet(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], **kwargs) -> None: # noqa: E501 - ... - - @overload - def update_pet(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def update_pet(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def update_pet(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], **kwargs) -> None: # noqa: E501 """Update an existing pet # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_pet(pet, async_req=True) - >>> result = thread.get() :param pet: Pet object that needs to be added to the store (required) :type pet: Pet - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -844,25 +699,16 @@ def update_pet(self, pet : Annotated[Pet, Field(..., description="Pet object tha if '_preload_content' in kwargs: message = "Error! Please call the update_pet_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.update_pet_with_http_info(pet, **kwargs) # noqa: E501 + return await self.update_pet_with_http_info(pet, **kwargs) # noqa: E501 @validate_arguments - def update_pet_with_http_info(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], **kwargs) -> ApiResponse: # noqa: E501 + async def update_pet_with_http_info(self, pet : Annotated[Pet, Field(..., description="Pet object that needs to be added to the store")], **kwargs) -> ApiResponse: # noqa: E501 """Update an existing pet # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_pet_with_http_info(pet, async_req=True) - >>> result = thread.get() :param pet: Pet object that needs to be added to the store (required) :type pet: Pet - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -893,7 +739,6 @@ def update_pet_with_http_info(self, pet : Annotated[Pet, Field(..., description= ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -942,7 +787,7 @@ def update_pet_with_http_info(self, pet : Annotated[Pet, Field(..., description= _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/pet', 'PUT', _path_params, _query_params, @@ -952,31 +797,17 @@ def update_pet_with_http_info(self, pet : Annotated[Pet, Field(..., description= files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def update_pet_with_form(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet that needs to be updated")], name : Annotated[Optional[StrictStr], Field(description="Updated name of the pet")] = None, status : Annotated[Optional[StrictStr], Field(description="Updated status of the pet")] = None, **kwargs) -> None: # noqa: E501 - ... - - @overload - def update_pet_with_form(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet that needs to be updated")], name : Annotated[Optional[StrictStr], Field(description="Updated name of the pet")] = None, status : Annotated[Optional[StrictStr], Field(description="Updated status of the pet")] = None, async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def update_pet_with_form(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet that needs to be updated")], name : Annotated[Optional[StrictStr], Field(description="Updated name of the pet")] = None, status : Annotated[Optional[StrictStr], Field(description="Updated status of the pet")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def update_pet_with_form(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet that needs to be updated")], name : Annotated[Optional[StrictStr], Field(description="Updated name of the pet")] = None, status : Annotated[Optional[StrictStr], Field(description="Updated status of the pet")] = None, **kwargs) -> None: # noqa: E501 """Updates a pet in the store with form data # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_pet_with_form(pet_id, name, status, async_req=True) - >>> result = thread.get() :param pet_id: ID of pet that needs to be updated (required) :type pet_id: int @@ -984,8 +815,6 @@ def update_pet_with_form(self, pet_id : Annotated[StrictInt, Field(..., descript :type name: str :param status: Updated status of the pet :type status: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -999,20 +828,13 @@ def update_pet_with_form(self, pet_id : Annotated[StrictInt, Field(..., descript if '_preload_content' in kwargs: message = "Error! Please call the update_pet_with_form_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.update_pet_with_form_with_http_info(pet_id, name, status, **kwargs) # noqa: E501 + return await self.update_pet_with_form_with_http_info(pet_id, name, status, **kwargs) # noqa: E501 @validate_arguments - def update_pet_with_form_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet that needs to be updated")], name : Annotated[Optional[StrictStr], Field(description="Updated name of the pet")] = None, status : Annotated[Optional[StrictStr], Field(description="Updated status of the pet")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def update_pet_with_form_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet that needs to be updated")], name : Annotated[Optional[StrictStr], Field(description="Updated name of the pet")] = None, status : Annotated[Optional[StrictStr], Field(description="Updated status of the pet")] = None, **kwargs) -> ApiResponse: # noqa: E501 """Updates a pet in the store with form data # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_pet_with_form_with_http_info(pet_id, name, status, async_req=True) - >>> result = thread.get() :param pet_id: ID of pet that needs to be updated (required) :type pet_id: int @@ -1020,8 +842,6 @@ def update_pet_with_form_with_http_info(self, pet_id : Annotated[StrictInt, Fiel :type name: str :param status: Updated status of the pet :type status: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -1054,7 +874,6 @@ def update_pet_with_form_with_http_info(self, pet_id : Annotated[StrictInt, Fiel ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -1109,7 +928,7 @@ def update_pet_with_form_with_http_info(self, pet_id : Annotated[StrictInt, Fiel _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/pet/{petId}', 'POST', _path_params, _query_params, @@ -1119,31 +938,17 @@ def update_pet_with_form_with_http_info(self, pet_id : Annotated[StrictInt, Fiel files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def upload_file(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to update")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, file : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="file to upload")] = None, **kwargs) -> ApiResponse: # noqa: E501 - ... - - @overload - def upload_file(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to update")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, file : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="file to upload")] = None, async_req: Optional[bool]=True, **kwargs) -> ApiResponse: # noqa: E501 - ... - @validate_arguments - def upload_file(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to update")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, file : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="file to upload")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[ApiResponse, Awaitable[ApiResponse]]: # noqa: E501 + async def upload_file(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to update")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, file : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="file to upload")] = None, **kwargs) -> ApiResponse: # noqa: E501 """uploads an image # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.upload_file(pet_id, additional_metadata, file, async_req=True) - >>> result = thread.get() :param pet_id: ID of pet to update (required) :type pet_id: int @@ -1151,8 +956,6 @@ def upload_file(self, pet_id : Annotated[StrictInt, Field(..., description="ID o :type additional_metadata: str :param file: file to upload :type file: bytearray - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1166,20 +969,13 @@ def upload_file(self, pet_id : Annotated[StrictInt, Field(..., description="ID o if '_preload_content' in kwargs: message = "Error! Please call the upload_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.upload_file_with_http_info(pet_id, additional_metadata, file, **kwargs) # noqa: E501 + return await self.upload_file_with_http_info(pet_id, additional_metadata, file, **kwargs) # noqa: E501 @validate_arguments - def upload_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to update")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, file : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="file to upload")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def upload_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to update")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, file : Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="file to upload")] = None, **kwargs) -> ApiResponse: # noqa: E501 """uploads an image # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.upload_file_with_http_info(pet_id, additional_metadata, file, async_req=True) - >>> result = thread.get() :param pet_id: ID of pet to update (required) :type pet_id: int @@ -1187,8 +983,6 @@ def upload_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., de :type additional_metadata: str :param file: file to upload :type file: bytearray - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -1221,7 +1015,6 @@ def upload_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., de ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -1282,7 +1075,7 @@ def upload_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., de '200': "ApiResponse", } - return self.api_client.call_api( + return await self.api_client.call_api( '/pet/{petId}/uploadImage', 'POST', _path_params, _query_params, @@ -1292,31 +1085,17 @@ def upload_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., de files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def upload_file_with_required_file(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to update")], required_file : Annotated[Union[StrictBytes, StrictStr], Field(..., description="file to upload")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, **kwargs) -> ApiResponse: # noqa: E501 - ... - - @overload - def upload_file_with_required_file(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to update")], required_file : Annotated[Union[StrictBytes, StrictStr], Field(..., description="file to upload")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, async_req: Optional[bool]=True, **kwargs) -> ApiResponse: # noqa: E501 - ... - @validate_arguments - def upload_file_with_required_file(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to update")], required_file : Annotated[Union[StrictBytes, StrictStr], Field(..., description="file to upload")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[ApiResponse, Awaitable[ApiResponse]]: # noqa: E501 + async def upload_file_with_required_file(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to update")], required_file : Annotated[Union[StrictBytes, StrictStr], Field(..., description="file to upload")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, **kwargs) -> ApiResponse: # noqa: E501 """uploads an image (required) # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.upload_file_with_required_file(pet_id, required_file, additional_metadata, async_req=True) - >>> result = thread.get() :param pet_id: ID of pet to update (required) :type pet_id: int @@ -1324,8 +1103,6 @@ def upload_file_with_required_file(self, pet_id : Annotated[StrictInt, Field(... :type required_file: bytearray :param additional_metadata: Additional data to pass to server :type additional_metadata: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1339,20 +1116,13 @@ def upload_file_with_required_file(self, pet_id : Annotated[StrictInt, Field(... if '_preload_content' in kwargs: message = "Error! Please call the upload_file_with_required_file_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.upload_file_with_required_file_with_http_info(pet_id, required_file, additional_metadata, **kwargs) # noqa: E501 + return await self.upload_file_with_required_file_with_http_info(pet_id, required_file, additional_metadata, **kwargs) # noqa: E501 @validate_arguments - def upload_file_with_required_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to update")], required_file : Annotated[Union[StrictBytes, StrictStr], Field(..., description="file to upload")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, **kwargs) -> ApiResponse: # noqa: E501 + async def upload_file_with_required_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., description="ID of pet to update")], required_file : Annotated[Union[StrictBytes, StrictStr], Field(..., description="file to upload")], additional_metadata : Annotated[Optional[StrictStr], Field(description="Additional data to pass to server")] = None, **kwargs) -> ApiResponse: # noqa: E501 """uploads an image (required) # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.upload_file_with_required_file_with_http_info(pet_id, required_file, additional_metadata, async_req=True) - >>> result = thread.get() :param pet_id: ID of pet to update (required) :type pet_id: int @@ -1360,8 +1130,6 @@ def upload_file_with_required_file_with_http_info(self, pet_id : Annotated[Stric :type required_file: bytearray :param additional_metadata: Additional data to pass to server :type additional_metadata: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -1394,7 +1162,6 @@ def upload_file_with_required_file_with_http_info(self, pet_id : Annotated[Stric ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -1455,7 +1222,7 @@ def upload_file_with_required_file_with_http_info(self, pet_id : Annotated[Stric '200': "ApiResponse", } - return self.api_client.call_api( + return await self.api_client.call_api( '/fake/{petId}/uploadImageWithRequiredFile', 'POST', _path_params, _query_params, @@ -1465,7 +1232,6 @@ def upload_file_with_required_file_with_http_info(self, pet_id : Annotated[Stric files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py index e52b31ee5e13..f103deea2915 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py @@ -46,29 +46,14 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @overload - async def delete_order(self, order_id : Annotated[StrictStr, Field(..., description="ID of the order that needs to be deleted")], **kwargs) -> None: # noqa: E501 - ... - - @overload - def delete_order(self, order_id : Annotated[StrictStr, Field(..., description="ID of the order that needs to be deleted")], async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def delete_order(self, order_id : Annotated[StrictStr, Field(..., description="ID of the order that needs to be deleted")], async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def delete_order(self, order_id : Annotated[StrictStr, Field(..., description="ID of the order that needs to be deleted")], **kwargs) -> None: # noqa: E501 """Delete purchase order by ID # noqa: E501 For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_order(order_id, async_req=True) - >>> result = thread.get() :param order_id: ID of the order that needs to be deleted (required) :type order_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -82,25 +67,16 @@ def delete_order(self, order_id : Annotated[StrictStr, Field(..., description="I if '_preload_content' in kwargs: message = "Error! Please call the delete_order_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 + return await self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 @validate_arguments - def delete_order_with_http_info(self, order_id : Annotated[StrictStr, Field(..., description="ID of the order that needs to be deleted")], **kwargs) -> ApiResponse: # noqa: E501 + async def delete_order_with_http_info(self, order_id : Annotated[StrictStr, Field(..., description="ID of the order that needs to be deleted")], **kwargs) -> ApiResponse: # noqa: E501 """Delete purchase order by ID # noqa: E501 For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_order_with_http_info(order_id, async_req=True) - >>> result = thread.get() :param order_id: ID of the order that needs to be deleted (required) :type order_id: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -131,7 +107,6 @@ def delete_order_with_http_info(self, order_id : Annotated[StrictStr, Field(..., ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -173,7 +148,7 @@ def delete_order_with_http_info(self, order_id : Annotated[StrictStr, Field(..., _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/store/order/{order_id}', 'DELETE', _path_params, _query_params, @@ -183,34 +158,18 @@ def delete_order_with_http_info(self, order_id : Annotated[StrictStr, Field(..., files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def get_inventory(self, **kwargs) -> Dict[str, int]: # noqa: E501 - ... - - @overload - def get_inventory(self, async_req: Optional[bool]=True, **kwargs) -> Dict[str, int]: # noqa: E501 - ... - @validate_arguments - def get_inventory(self, async_req: Optional[bool]=None, **kwargs) -> Union[Dict[str, int], Awaitable[Dict[str, int]]]: # noqa: E501 + async def get_inventory(self, **kwargs) -> Dict[str, int]: # noqa: E501 """Returns pet inventories by status # noqa: E501 Returns a map of status codes to quantities # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_inventory(async_req=True) - >>> result = thread.get() - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -224,23 +183,14 @@ def get_inventory(self, async_req: Optional[bool]=None, **kwargs) -> Union[Dict[ if '_preload_content' in kwargs: message = "Error! Please call the get_inventory_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.get_inventory_with_http_info(**kwargs) # noqa: E501 + return await self.get_inventory_with_http_info(**kwargs) # noqa: E501 @validate_arguments - def get_inventory_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + async def get_inventory_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Returns pet inventories by status # noqa: E501 Returns a map of status codes to quantities # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_inventory_with_http_info(async_req=True) - >>> result = thread.get() - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -270,7 +220,6 @@ def get_inventory_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -315,7 +264,7 @@ def get_inventory_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 '200': "Dict[str, int]", } - return self.api_client.call_api( + return await self.api_client.call_api( '/store/inventory', 'GET', _path_params, _query_params, @@ -325,36 +274,20 @@ def get_inventory_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def get_order_by_id(self, order_id : Annotated[conint(strict=True, le=5, ge=1), Field(..., description="ID of pet that needs to be fetched")], **kwargs) -> Order: # noqa: E501 - ... - - @overload - def get_order_by_id(self, order_id : Annotated[conint(strict=True, le=5, ge=1), Field(..., description="ID of pet that needs to be fetched")], async_req: Optional[bool]=True, **kwargs) -> Order: # noqa: E501 - ... - @validate_arguments - def get_order_by_id(self, order_id : Annotated[conint(strict=True, le=5, ge=1), Field(..., description="ID of pet that needs to be fetched")], async_req: Optional[bool]=None, **kwargs) -> Union[Order, Awaitable[Order]]: # noqa: E501 + async def get_order_by_id(self, order_id : Annotated[conint(strict=True, le=5, ge=1), Field(..., description="ID of pet that needs to be fetched")], **kwargs) -> Order: # noqa: E501 """Find purchase order by ID # noqa: E501 For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_order_by_id(order_id, async_req=True) - >>> result = thread.get() :param order_id: ID of pet that needs to be fetched (required) :type order_id: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -368,25 +301,16 @@ def get_order_by_id(self, order_id : Annotated[conint(strict=True, le=5, ge=1), if '_preload_content' in kwargs: message = "Error! Please call the get_order_by_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 + return await self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 @validate_arguments - def get_order_by_id_with_http_info(self, order_id : Annotated[conint(strict=True, le=5, ge=1), Field(..., description="ID of pet that needs to be fetched")], **kwargs) -> ApiResponse: # noqa: E501 + async def get_order_by_id_with_http_info(self, order_id : Annotated[conint(strict=True, le=5, ge=1), Field(..., description="ID of pet that needs to be fetched")], **kwargs) -> ApiResponse: # noqa: E501 """Find purchase order by ID # noqa: E501 For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_order_by_id_with_http_info(order_id, async_req=True) - >>> result = thread.get() :param order_id: ID of pet that needs to be fetched (required) :type order_id: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -417,7 +341,6 @@ def get_order_by_id_with_http_info(self, order_id : Annotated[conint(strict=True ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -467,7 +390,7 @@ def get_order_by_id_with_http_info(self, order_id : Annotated[conint(strict=True '404': None, } - return self.api_client.call_api( + return await self.api_client.call_api( '/store/order/{order_id}', 'GET', _path_params, _query_params, @@ -477,36 +400,20 @@ def get_order_by_id_with_http_info(self, order_id : Annotated[conint(strict=True files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def place_order(self, order : Annotated[Order, Field(..., description="order placed for purchasing the pet")], **kwargs) -> Order: # noqa: E501 - ... - - @overload - def place_order(self, order : Annotated[Order, Field(..., description="order placed for purchasing the pet")], async_req: Optional[bool]=True, **kwargs) -> Order: # noqa: E501 - ... - @validate_arguments - def place_order(self, order : Annotated[Order, Field(..., description="order placed for purchasing the pet")], async_req: Optional[bool]=None, **kwargs) -> Union[Order, Awaitable[Order]]: # noqa: E501 + async def place_order(self, order : Annotated[Order, Field(..., description="order placed for purchasing the pet")], **kwargs) -> Order: # noqa: E501 """Place an order for a pet # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.place_order(order, async_req=True) - >>> result = thread.get() :param order: order placed for purchasing the pet (required) :type order: Order - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -520,25 +427,16 @@ def place_order(self, order : Annotated[Order, Field(..., description="order pla if '_preload_content' in kwargs: message = "Error! Please call the place_order_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.place_order_with_http_info(order, **kwargs) # noqa: E501 + return await self.place_order_with_http_info(order, **kwargs) # noqa: E501 @validate_arguments - def place_order_with_http_info(self, order : Annotated[Order, Field(..., description="order placed for purchasing the pet")], **kwargs) -> ApiResponse: # noqa: E501 + async def place_order_with_http_info(self, order : Annotated[Order, Field(..., description="order placed for purchasing the pet")], **kwargs) -> ApiResponse: # noqa: E501 """Place an order for a pet # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.place_order_with_http_info(order, async_req=True) - >>> result = thread.get() :param order: order placed for purchasing the pet (required) :type order: Order - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -569,7 +467,6 @@ def place_order_with_http_info(self, order : Annotated[Order, Field(..., descrip ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -625,7 +522,7 @@ def place_order_with_http_info(self, order : Annotated[Order, Field(..., descrip '400': None, } - return self.api_client.call_api( + return await self.api_client.call_api( '/store/order', 'POST', _path_params, _query_params, @@ -635,7 +532,6 @@ def place_order_with_http_info(self, order : Annotated[Order, Field(..., descrip files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py index 3c059d73339f..9591e1ccc63f 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py @@ -44,29 +44,14 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @overload - async def create_user(self, user : Annotated[User, Field(..., description="Created user object")], **kwargs) -> None: # noqa: E501 - ... - - @overload - def create_user(self, user : Annotated[User, Field(..., description="Created user object")], async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def create_user(self, user : Annotated[User, Field(..., description="Created user object")], async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def create_user(self, user : Annotated[User, Field(..., description="Created user object")], **kwargs) -> None: # noqa: E501 """Create user # noqa: E501 This can only be done by the logged in user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_user(user, async_req=True) - >>> result = thread.get() :param user: Created user object (required) :type user: User - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -80,25 +65,16 @@ def create_user(self, user : Annotated[User, Field(..., description="Created use if '_preload_content' in kwargs: message = "Error! Please call the create_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.create_user_with_http_info(user, **kwargs) # noqa: E501 + return await self.create_user_with_http_info(user, **kwargs) # noqa: E501 @validate_arguments - def create_user_with_http_info(self, user : Annotated[User, Field(..., description="Created user object")], **kwargs) -> ApiResponse: # noqa: E501 + async def create_user_with_http_info(self, user : Annotated[User, Field(..., description="Created user object")], **kwargs) -> ApiResponse: # noqa: E501 """Create user # noqa: E501 This can only be done by the logged in user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_user_with_http_info(user, async_req=True) - >>> result = thread.get() :param user: Created user object (required) :type user: User - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -143,7 +119,6 @@ def create_user_with_http_info(self, user : Annotated[User, Field(..., descripti ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -192,7 +167,7 @@ def create_user_with_http_info(self, user : Annotated[User, Field(..., descripti _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/user', 'POST', _path_params, _query_params, @@ -202,7 +177,6 @@ def create_user_with_http_info(self, user : Annotated[User, Field(..., descripti files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), @@ -210,29 +184,14 @@ def create_user_with_http_info(self, user : Annotated[User, Field(..., descripti collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def create_users_with_array_input(self, user : Annotated[conlist(User), Field(..., description="List of user object")], **kwargs) -> None: # noqa: E501 - ... - - @overload - def create_users_with_array_input(self, user : Annotated[conlist(User), Field(..., description="List of user object")], async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def create_users_with_array_input(self, user : Annotated[conlist(User), Field(..., description="List of user object")], async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def create_users_with_array_input(self, user : Annotated[conlist(User), Field(..., description="List of user object")], **kwargs) -> None: # noqa: E501 """Creates list of users with given input array # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_users_with_array_input(user, async_req=True) - >>> result = thread.get() :param user: List of user object (required) :type user: List[User] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -246,25 +205,16 @@ def create_users_with_array_input(self, user : Annotated[conlist(User), Field(.. if '_preload_content' in kwargs: message = "Error! Please call the create_users_with_array_input_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501 + return await self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501 @validate_arguments - def create_users_with_array_input_with_http_info(self, user : Annotated[conlist(User), Field(..., description="List of user object")], **kwargs) -> ApiResponse: # noqa: E501 + async def create_users_with_array_input_with_http_info(self, user : Annotated[conlist(User), Field(..., description="List of user object")], **kwargs) -> ApiResponse: # noqa: E501 """Creates list of users with given input array # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_users_with_array_input_with_http_info(user, async_req=True) - >>> result = thread.get() :param user: List of user object (required) :type user: List[User] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -295,7 +245,6 @@ def create_users_with_array_input_with_http_info(self, user : Annotated[conlist( ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -344,7 +293,7 @@ def create_users_with_array_input_with_http_info(self, user : Annotated[conlist( _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/user/createWithArray', 'POST', _path_params, _query_params, @@ -354,36 +303,20 @@ def create_users_with_array_input_with_http_info(self, user : Annotated[conlist( files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def create_users_with_list_input(self, user : Annotated[conlist(User), Field(..., description="List of user object")], **kwargs) -> None: # noqa: E501 - ... - - @overload - def create_users_with_list_input(self, user : Annotated[conlist(User), Field(..., description="List of user object")], async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def create_users_with_list_input(self, user : Annotated[conlist(User), Field(..., description="List of user object")], async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def create_users_with_list_input(self, user : Annotated[conlist(User), Field(..., description="List of user object")], **kwargs) -> None: # noqa: E501 """Creates list of users with given input array # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_users_with_list_input(user, async_req=True) - >>> result = thread.get() :param user: List of user object (required) :type user: List[User] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -397,25 +330,16 @@ def create_users_with_list_input(self, user : Annotated[conlist(User), Field(... if '_preload_content' in kwargs: message = "Error! Please call the create_users_with_list_input_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501 + return await self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501 @validate_arguments - def create_users_with_list_input_with_http_info(self, user : Annotated[conlist(User), Field(..., description="List of user object")], **kwargs) -> ApiResponse: # noqa: E501 + async def create_users_with_list_input_with_http_info(self, user : Annotated[conlist(User), Field(..., description="List of user object")], **kwargs) -> ApiResponse: # noqa: E501 """Creates list of users with given input array # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_users_with_list_input_with_http_info(user, async_req=True) - >>> result = thread.get() :param user: List of user object (required) :type user: List[User] - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -446,7 +370,6 @@ def create_users_with_list_input_with_http_info(self, user : Annotated[conlist(U ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -495,7 +418,7 @@ def create_users_with_list_input_with_http_info(self, user : Annotated[conlist(U _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/user/createWithList', 'POST', _path_params, _query_params, @@ -505,36 +428,20 @@ def create_users_with_list_input_with_http_info(self, user : Annotated[conlist(U files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def delete_user(self, username : Annotated[StrictStr, Field(..., description="The name that needs to be deleted")], **kwargs) -> None: # noqa: E501 - ... - - @overload - def delete_user(self, username : Annotated[StrictStr, Field(..., description="The name that needs to be deleted")], async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def delete_user(self, username : Annotated[StrictStr, Field(..., description="The name that needs to be deleted")], async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def delete_user(self, username : Annotated[StrictStr, Field(..., description="The name that needs to be deleted")], **kwargs) -> None: # noqa: E501 """Delete user # noqa: E501 This can only be done by the logged in user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_user(username, async_req=True) - >>> result = thread.get() :param username: The name that needs to be deleted (required) :type username: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -548,25 +455,16 @@ def delete_user(self, username : Annotated[StrictStr, Field(..., description="Th if '_preload_content' in kwargs: message = "Error! Please call the delete_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.delete_user_with_http_info(username, **kwargs) # noqa: E501 + return await self.delete_user_with_http_info(username, **kwargs) # noqa: E501 @validate_arguments - def delete_user_with_http_info(self, username : Annotated[StrictStr, Field(..., description="The name that needs to be deleted")], **kwargs) -> ApiResponse: # noqa: E501 + async def delete_user_with_http_info(self, username : Annotated[StrictStr, Field(..., description="The name that needs to be deleted")], **kwargs) -> ApiResponse: # noqa: E501 """Delete user # noqa: E501 This can only be done by the logged in user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_user_with_http_info(username, async_req=True) - >>> result = thread.get() :param username: The name that needs to be deleted (required) :type username: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -597,7 +495,6 @@ def delete_user_with_http_info(self, username : Annotated[StrictStr, Field(..., ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -639,7 +536,7 @@ def delete_user_with_http_info(self, username : Annotated[StrictStr, Field(..., _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/user/{username}', 'DELETE', _path_params, _query_params, @@ -649,36 +546,20 @@ def delete_user_with_http_info(self, username : Annotated[StrictStr, Field(..., files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def get_user_by_name(self, username : Annotated[StrictStr, Field(..., description="The name that needs to be fetched. Use user1 for testing.")], **kwargs) -> User: # noqa: E501 - ... - - @overload - def get_user_by_name(self, username : Annotated[StrictStr, Field(..., description="The name that needs to be fetched. Use user1 for testing.")], async_req: Optional[bool]=True, **kwargs) -> User: # noqa: E501 - ... - @validate_arguments - def get_user_by_name(self, username : Annotated[StrictStr, Field(..., description="The name that needs to be fetched. Use user1 for testing.")], async_req: Optional[bool]=None, **kwargs) -> Union[User, Awaitable[User]]: # noqa: E501 + async def get_user_by_name(self, username : Annotated[StrictStr, Field(..., description="The name that needs to be fetched. Use user1 for testing.")], **kwargs) -> User: # noqa: E501 """Get user by user name # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_user_by_name(username, async_req=True) - >>> result = thread.get() :param username: The name that needs to be fetched. Use user1 for testing. (required) :type username: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -692,25 +573,16 @@ def get_user_by_name(self, username : Annotated[StrictStr, Field(..., descriptio if '_preload_content' in kwargs: message = "Error! Please call the get_user_by_name_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 + return await self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 @validate_arguments - def get_user_by_name_with_http_info(self, username : Annotated[StrictStr, Field(..., description="The name that needs to be fetched. Use user1 for testing.")], **kwargs) -> ApiResponse: # noqa: E501 + async def get_user_by_name_with_http_info(self, username : Annotated[StrictStr, Field(..., description="The name that needs to be fetched. Use user1 for testing.")], **kwargs) -> ApiResponse: # noqa: E501 """Get user by user name # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_user_by_name_with_http_info(username, async_req=True) - >>> result = thread.get() :param username: The name that needs to be fetched. Use user1 for testing. (required) :type username: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -741,7 +613,6 @@ def get_user_by_name_with_http_info(self, username : Annotated[StrictStr, Field( ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -791,7 +662,7 @@ def get_user_by_name_with_http_info(self, username : Annotated[StrictStr, Field( '404': None, } - return self.api_client.call_api( + return await self.api_client.call_api( '/user/{username}', 'GET', _path_params, _query_params, @@ -801,38 +672,22 @@ def get_user_by_name_with_http_info(self, username : Annotated[StrictStr, Field( files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def login_user(self, username : Annotated[StrictStr, Field(..., description="The user name for login")], password : Annotated[StrictStr, Field(..., description="The password for login in clear text")], **kwargs) -> str: # noqa: E501 - ... - - @overload - def login_user(self, username : Annotated[StrictStr, Field(..., description="The user name for login")], password : Annotated[StrictStr, Field(..., description="The password for login in clear text")], async_req: Optional[bool]=True, **kwargs) -> str: # noqa: E501 - ... - @validate_arguments - def login_user(self, username : Annotated[StrictStr, Field(..., description="The user name for login")], password : Annotated[StrictStr, Field(..., description="The password for login in clear text")], async_req: Optional[bool]=None, **kwargs) -> Union[str, Awaitable[str]]: # noqa: E501 + async def login_user(self, username : Annotated[StrictStr, Field(..., description="The user name for login")], password : Annotated[StrictStr, Field(..., description="The password for login in clear text")], **kwargs) -> str: # noqa: E501 """Logs user into the system # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.login_user(username, password, async_req=True) - >>> result = thread.get() :param username: The user name for login (required) :type username: str :param password: The password for login in clear text (required) :type password: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -846,27 +701,18 @@ def login_user(self, username : Annotated[StrictStr, Field(..., description="The if '_preload_content' in kwargs: message = "Error! Please call the login_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 + return await self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 @validate_arguments - def login_user_with_http_info(self, username : Annotated[StrictStr, Field(..., description="The user name for login")], password : Annotated[StrictStr, Field(..., description="The password for login in clear text")], **kwargs) -> ApiResponse: # noqa: E501 + async def login_user_with_http_info(self, username : Annotated[StrictStr, Field(..., description="The user name for login")], password : Annotated[StrictStr, Field(..., description="The password for login in clear text")], **kwargs) -> ApiResponse: # noqa: E501 """Logs user into the system # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.login_user_with_http_info(username, password, async_req=True) - >>> result = thread.get() :param username: The user name for login (required) :type username: str :param password: The password for login in clear text (required) :type password: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -898,7 +744,6 @@ def login_user_with_http_info(self, username : Annotated[StrictStr, Field(..., d ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -950,7 +795,7 @@ def login_user_with_http_info(self, username : Annotated[StrictStr, Field(..., d '400': None, } - return self.api_client.call_api( + return await self.api_client.call_api( '/user/login', 'GET', _path_params, _query_params, @@ -960,34 +805,18 @@ def login_user_with_http_info(self, username : Annotated[StrictStr, Field(..., d files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def logout_user(self, **kwargs) -> None: # noqa: E501 - ... - - @overload - def logout_user(self, async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def logout_user(self, async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def logout_user(self, **kwargs) -> None: # noqa: E501 """Logs out current logged in user session # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.logout_user(async_req=True) - >>> result = thread.get() - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1001,23 +830,14 @@ def logout_user(self, async_req: Optional[bool]=None, **kwargs) -> Union[None, A if '_preload_content' in kwargs: message = "Error! Please call the logout_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.logout_user_with_http_info(**kwargs) # noqa: E501 + return await self.logout_user_with_http_info(**kwargs) # noqa: E501 @validate_arguments - def logout_user_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 + async def logout_user_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Logs out current logged in user session # noqa: E501 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.logout_user_with_http_info(async_req=True) - >>> result = thread.get() - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -1047,7 +867,6 @@ def logout_user_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -1086,7 +905,7 @@ def logout_user_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/user/logout', 'GET', _path_params, _query_params, @@ -1096,38 +915,22 @@ def logout_user_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) - @overload - async def update_user(self, username : Annotated[StrictStr, Field(..., description="name that need to be deleted")], user : Annotated[User, Field(..., description="Updated user object")], **kwargs) -> None: # noqa: E501 - ... - - @overload - def update_user(self, username : Annotated[StrictStr, Field(..., description="name that need to be deleted")], user : Annotated[User, Field(..., description="Updated user object")], async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501 - ... - @validate_arguments - def update_user(self, username : Annotated[StrictStr, Field(..., description="name that need to be deleted")], user : Annotated[User, Field(..., description="Updated user object")], async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501 + async def update_user(self, username : Annotated[StrictStr, Field(..., description="name that need to be deleted")], user : Annotated[User, Field(..., description="Updated user object")], **kwargs) -> None: # noqa: E501 """Updated user # noqa: E501 This can only be done by the logged in user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_user(username, user, async_req=True) - >>> result = thread.get() :param username: name that need to be deleted (required) :type username: str :param user: Updated user object (required) :type user: User - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1141,27 +944,18 @@ def update_user(self, username : Annotated[StrictStr, Field(..., description="na if '_preload_content' in kwargs: message = "Error! Please call the update_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - if async_req is not None: - kwargs['async_req'] = async_req - return self.update_user_with_http_info(username, user, **kwargs) # noqa: E501 + return await self.update_user_with_http_info(username, user, **kwargs) # noqa: E501 @validate_arguments - def update_user_with_http_info(self, username : Annotated[StrictStr, Field(..., description="name that need to be deleted")], user : Annotated[User, Field(..., description="Updated user object")], **kwargs) -> ApiResponse: # noqa: E501 + async def update_user_with_http_info(self, username : Annotated[StrictStr, Field(..., description="name that need to be deleted")], user : Annotated[User, Field(..., description="Updated user object")], **kwargs) -> ApiResponse: # noqa: E501 """Updated user # noqa: E501 This can only be done by the logged in user. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.update_user_with_http_info(username, user, async_req=True) - >>> result = thread.get() :param username: name that need to be deleted (required) :type username: str :param user: Updated user object (required) :type user: User - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. @@ -1193,7 +987,6 @@ def update_user_with_http_info(self, username : Annotated[StrictStr, Field(..., ] _all_params.extend( [ - 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', @@ -1245,7 +1038,7 @@ def update_user_with_http_info(self, username : Annotated[StrictStr, Field(..., _response_types_map = {} - return self.api_client.call_api( + return await self.api_client.call_api( '/user/{username}', 'PUT', _path_params, _query_params, @@ -1255,7 +1048,6 @@ def update_user_with_http_info(self, username : Annotated[StrictStr, Field(..., files=_files, response_types_map=_response_types_map, auth_settings=_auth_settings, - async_req=_params.get('async_req'), _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 _preload_content=_params.get('_preload_content', True), _request_timeout=_params.get('_request_timeout'), diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py index d83891811e5b..733ddaed7c3e 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py @@ -17,7 +17,6 @@ from dateutil.parser import parse import json import mimetypes -from multiprocessing.pool import ThreadPool import os import re import tempfile @@ -45,8 +44,6 @@ class ApiClient: the API. :param cookie: a cookie to include in the header when making calls to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. """ PRIMITIVE_TYPES = (float, bool, bytes, str, int) @@ -63,12 +60,11 @@ class ApiClient: _pool = None def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=1) -> None: + cookie=None) -> None: # use default configuration if none is provided if configuration is None: configuration = Configuration.get_default() self.configuration = configuration - self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} @@ -87,22 +83,6 @@ async def __aexit__(self, exc_type, exc_value, traceback): async def close(self): await self.rest_client.close() - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool @property def user_agent(self): @@ -223,7 +203,7 @@ async def __call_api( self.last_response = response_data - return_data = None # assuming derialization is not needed + return_data = None # assuming deserialization is not needed # data needs deserialization or returns HTTP data (deserialized) only if _preload_content or _return_http_data_only: response_type = response_types_map.get(str(response_data.status), None) @@ -358,17 +338,15 @@ def __deserialize(self, data, klass): else: return self.__deserialize_model(data, klass) - def call_api(self, resource_path, method, + async def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_types_map=None, auth_settings=None, - async_req=None, _return_http_data_only=None, + _return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None, _host=None, _request_auth=None): """Makes the HTTP request (synchronous) and returns deserialized data. - To make an async_req request, set the async_req parameter. - :param resource_path: Path to method endpoint. :param method: Method to call. :param path_params: Path parameters in the url. @@ -382,7 +360,6 @@ def call_api(self, resource_path, method, :param response: Response data type. :param files dict: key -> filename, value -> filepath, for `multipart/form-data`. - :param async_req bool: execute request asynchronously :param _return_http_data_only: response data instead of ApiResponse object with status code, headers, etc :param _preload_content: if False, the ApiResponse.data will @@ -400,58 +377,52 @@ def call_api(self, resource_path, method, in the spec for a single request. :type _request_token: dict, optional :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. + The response. """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_types_map, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host, - _request_auth) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_types_map, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, _request_auth)) - - def request(self, method, url, query_params=None, headers=None, + args = ( + resource_path, + method, + path_params, + query_params, + header_params, + body, + post_params, + files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, + _request_auth, + ) + return await self.__call_api(*args) + + async def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, _request_timeout=None): """Makes the HTTP request using RESTClient.""" if method == "GET": - return self.rest_client.get_request(url, + return await self.rest_client.get_request(url, query_params=query_params, _preload_content=_preload_content, _request_timeout=_request_timeout, headers=headers) elif method == "HEAD": - return self.rest_client.head_request(url, + return await self.rest_client.head_request(url, query_params=query_params, _preload_content=_preload_content, _request_timeout=_request_timeout, headers=headers) elif method == "OPTIONS": - return self.rest_client.options_request(url, + return await self.rest_client.options_request(url, query_params=query_params, headers=headers, _preload_content=_preload_content, _request_timeout=_request_timeout) elif method == "POST": - return self.rest_client.post_request(url, + return await self.rest_client.post_request(url, query_params=query_params, headers=headers, post_params=post_params, @@ -459,7 +430,7 @@ def request(self, method, url, query_params=None, headers=None, _request_timeout=_request_timeout, body=body) elif method == "PUT": - return self.rest_client.put_request(url, + return await self.rest_client.put_request(url, query_params=query_params, headers=headers, post_params=post_params, @@ -467,7 +438,7 @@ def request(self, method, url, query_params=None, headers=None, _request_timeout=_request_timeout, body=body) elif method == "PATCH": - return self.rest_client.patch_request(url, + return await self.rest_client.patch_request(url, query_params=query_params, headers=headers, post_params=post_params, @@ -475,7 +446,7 @@ def request(self, method, url, query_params=None, headers=None, _request_timeout=_request_timeout, body=body) elif method == "DELETE": - return self.rest_client.delete_request(url, + return await self.rest_client.delete_request(url, query_params=query_params, headers=headers, _preload_content=_preload_content, diff --git a/samples/openapi3/client/petstore/python-aiohttp/tests/test_api_client.py b/samples/openapi3/client/petstore/python-aiohttp/tests/test_api_client.py index bf4ab329f296..d3daa10d51ce 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/tests/test_api_client.py +++ b/samples/openapi3/client/petstore/python-aiohttp/tests/test_api_client.py @@ -15,13 +15,8 @@ class TestApiClient(unittest.TestCase): async def test_context_manager_closes_client(self): async with petstore_api.ApiClient() as client: - # thread pool - self.assertIsNotNone(client.pool) - pool_ref = weakref.ref(client._pool) - self.assertIsNotNone(pool_ref()) # pool_manager self.assertFalse(client.rest_client.pool_manager.closed) rest_pool_ref = client.rest_client.pool_manager - self.assertIsNone(pool_ref()) self.assertTrue(rest_pool_ref.closed) diff --git a/samples/openapi3/client/petstore/python-aiohttp/tests/util.py b/samples/openapi3/client/petstore/python-aiohttp/tests/util.py index 8edec7570093..4ab082872660 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/tests/util.py +++ b/samples/openapi3/client/petstore/python-aiohttp/tests/util.py @@ -11,7 +11,8 @@ def id_gen(bits=32): def async_test(f): def wrapper(*args, **kwargs): - coro = asyncio.coroutine(f) + # coro = asyncio.coroutine(f) + coro = f future = coro(*args, **kwargs) loop = asyncio.get_event_loop() loop.run_until_complete(future) diff --git a/samples/openapi3/client/petstore/python/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py index d5f9031e32ca..9579cce1349c 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -222,7 +222,7 @@ def __call_api( self.last_response = response_data - return_data = None # assuming derialization is not needed + return_data = None # assuming deserialization is not needed # data needs deserialization or returns HTTP data (deserialized) only if _preload_content or _return_http_data_only: response_type = response_types_map.get(str(response_data.status), None) @@ -405,27 +405,28 @@ def call_api(self, resource_path, method, If parameter async_req is False or missing, then the method will return the response directly. """ + args = ( + resource_path, + method, + path_params, + query_params, + header_params, + body, + post_params, + files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, + _request_auth, + ) if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_types_map, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host, - _request_auth) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_types_map, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, _request_auth)) + return self.__call_api(*args) + + return self.pool.apply_async(self.__call_api, args) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, From f530496f2187ae8c859c91d7e65596f18893edc6 Mon Sep 17 00:00:00 2001 From: MachineUserPTV <106260894+MachineUserPTV@users.noreply.github.com> Date: Wed, 20 Sep 2023 08:57:33 +0200 Subject: [PATCH 34/59] =?UTF-8?q?[dotnetcore]=20Implement=20QueryParameter?= =?UTF-8?q?=20deepObject=20style=20is=20missing=20for=E2=80=A6=20(#15945)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [dotnetcore] Implement QueryParameter deepObject style is missing for async function * Add some csharp-restsharp tests * add and fix tests * restore missing files * remove test with datetime problem --------- Co-authored-by: Oliver Krug --- .../src/main/resources/csharp/api.mustache | 23 ++++++ .../CSharpClientDeepObjectTest.java | 6 ++ .../Org.OpenAPITools.Test/Api/BodyApiTests.cs | 8 +- .../src/Org.OpenAPITools.Test/CustomTest.cs | 68 +++++++++++++++ .../EchoServerResponseParser.cs | 82 +++++++++++++++++++ .../src/Org.OpenAPITools/Api/QueryApi.cs | 26 +++++- 6 files changed, 207 insertions(+), 6 deletions(-) create mode 100644 samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/CustomTest.cs create mode 100644 samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/EchoServerResponseParser.cs diff --git a/modules/openapi-generator/src/main/resources/csharp/api.mustache b/modules/openapi-generator/src/main/resources/csharp/api.mustache index ddfa74e9d5f3..63fdd07f19b4 100644 --- a/modules/openapi-generator/src/main/resources/csharp/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/api.mustache @@ -586,12 +586,35 @@ namespace {{packageName}}.{{apiPackage}} {{/pathParams}} {{#queryParams}} {{#required}} + {{#isDeepObject}} + {{#items.vars}} + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + {{/items.vars}} + {{^items}} + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); + {{/items}} + {{/isDeepObject}} + {{^isDeepObject}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + {{/isDeepObject}} {{/required}} {{^required}} if ({{paramName}} != null) { + {{#isDeepObject}} + {{#items.vars}} + if ({{paramName}}.{{name}} != null) + { + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}]", {{paramName}}.{{name}})); + } + {{/items.vars}} + {{^items}} + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); + {{/items}} + {{/isDeepObject}} + {{^isDeepObject}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); + {{/isDeepObject}} } {{/required}} {{/queryParams}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpClientDeepObjectTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpClientDeepObjectTest.java index 55b9ad846ae5..bfacb03a4729 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpClientDeepObjectTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpClientDeepObjectTest.java @@ -19,6 +19,7 @@ import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.parser.core.models.ParseOptions; +import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.ClientOptInput; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.DefaultGenerator; @@ -27,9 +28,11 @@ import java.io.File; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; +import static org.junit.Assert.assertEquals; import static org.openapitools.codegen.TestUtils.assertFileContains; public class CSharpClientDeepObjectTest { @@ -62,5 +65,8 @@ public void deepObject() throws IOException { "options[id]", "options[name]", "options[category]", "options[tags]", "options[status]", "options[photoUrls]", "inputOptions[a]", "inputOptions[b]", "inputOptions[c]"); + String content = new String(Files.readAllBytes(Paths.get(outputPath + "/src/Org.OpenAPITools/Api/DefaultApi.cs")), StandardCharsets.UTF_8); + int counter = StringUtils.countMatches(content,"inputOptions[a]"); + assertEquals(2, counter); } } diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/BodyApiTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/BodyApiTests.cs index 8ea3a5dd65f3..06da198a3efa 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/BodyApiTests.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/BodyApiTests.cs @@ -19,6 +19,7 @@ using Org.OpenAPITools.Client; using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; // uncomment below to import models //using Org.OpenAPITools.Model; @@ -96,10 +97,9 @@ public void TestEchoBodyFreeFormObjectResponseStringTest() [Fact] public void TestEchoBodyPetTest() { - // TODO uncomment below to test the method and replace null with proper value - //Pet? pet = null; - //var response = instance.TestEchoBodyPet(pet); - //Assert.IsType(response); + Pet? pet = new Pet(123, "cat", new Category() { Id = 12, Name = "Test" }, new List(){"http://google.com"},null, null); + var response = instance.TestEchoBodyPet(pet); + Assert.IsType(response); } /// diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/CustomTest.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/CustomTest.cs new file mode 100644 index 000000000000..ec244da09268 --- /dev/null +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/CustomTest.cs @@ -0,0 +1,68 @@ +using Newtonsoft.Json.Linq; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml; +using Xunit; + +namespace Org.OpenAPITools.Test +{ + public class CustomTest + { + private QueryApi api = new QueryApi(); + private BodyApi bodyApi = new BodyApi(); + + [Fact] + public void TestEchoBodyPet() + { + Pet queryObject = new Pet(12345L, "Hello World", new Category(987L, "new category"), new List { "http://a.com", "http://b.com" }); + Pet p = bodyApi.TestEchoBodyPet(queryObject); + Assert.NotNull(p); + Assert.Equal("Hello World", p.Name); + Assert.Equal(12345L, p.Id); + + // response is empty body + Pet p2 = bodyApi.TestEchoBodyPet(null); + Assert.Null(p2); + } + + /** + * Test query parameter(s) + *

            + * Test query parameter(s) + * + * @throws ApiException if the Api call fails + */ + [Fact] + public void TestQueryStyleFormExplodeTrueObjectTest() + { + Pet queryObject = new Pet(12345L, "Hello World", new Category(987L, "new category"), new List { "http://a.com", "http://b.com" }); + String response = api.TestQueryStyleFormExplodeTrueObject(queryObject); + EchoServerResponseParser p = new EchoServerResponseParser(response); + Assert.Equal("/query/style_form/explode_true/object?query_object=class%20Pet%20%7b%0a%20%20Id%3a%2012345%0a%20%20Name%3a%20Hello%20World%0a%20%20Category%3a%20class%20Category%20%7b%0a%20%20Id%3a%20987%0a%20%20Name%3a%20new%20category%0a%7d%0a%0a%20%20PhotoUrls%3a%20System.Collections.Generic.List%601%5bSystem.String%5d%0a%20%20Tags%3a%20%0a%20%20Status%3a%20%0a%7d%0a", p.path); + } + + [Fact] + public void testQueryStyleDeepObjectExplodeTrueObjectTest() + { + Pet queryObject = new Pet(12345L, "Hello World", new Category(987L, "new category"), new List { "http://a.com", "http://b.com" }); + String response = api.TestQueryStyleDeepObjectExplodeTrueObject(queryObject); + EchoServerResponseParser p = new EchoServerResponseParser(response); + Assert.Equal("/query/style_deepObject/explode_true/object?queryObject%5bid%5d=12345&queryObject%5bname%5d=Hello%20World&queryObject%5bcategory%5d=class%20Category%20%7b%0a%20%20Id%3a%20987%0a%20%20Name%3a%20new%20category%0a%7d%0a&queryObject%5bphotoUrls%5d=http%3a%2f%2fa.com%2chttp%3a%2f%2fb.com", p.path); + } + + + [Fact] + public void testQueryStyleDeepObjectExplodeTrueObjectAsyncTest() + { + Pet queryObject = new Pet(12345L, "Hello World", new Category(987L, "new category"), new List { "http://a.com", "http://b.com" }); + Task responseTask = api.TestQueryStyleDeepObjectExplodeTrueObjectAsync(queryObject); + EchoServerResponseParser p = new EchoServerResponseParser(responseTask.Result); + Assert.Equal("/query/style_deepObject/explode_true/object?queryObject%5bid%5d=12345&queryObject%5bname%5d=Hello%20World&queryObject%5bcategory%5d=class%20Category%20%7b%0a%20%20Id%3a%20987%0a%20%20Name%3a%20new%20category%0a%7d%0a&queryObject%5bphotoUrls%5d=http%3a%2f%2fa.com%2chttp%3a%2f%2fb.com", p.path); + } + } +} diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/EchoServerResponseParser.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/EchoServerResponseParser.cs new file mode 100644 index 000000000000..f87dae4ed12e --- /dev/null +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/EchoServerResponseParser.cs @@ -0,0 +1,82 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using static System.Net.Mime.MediaTypeNames; + +namespace Org.OpenAPITools.Test +{ + public class EchoServerResponseParser + { + public String method; // e.g. GET + public String path; // e.g. /query/style_form/explode_true/object?id=12345 + public String protocol; // e.g. HTTP/1.1 + public Dictionary headers = new Dictionary(); + public String body; // e.g. Hello World! + + public EchoServerResponseParser(String response) + { + if (response == null) + { + throw new SystemException("Echo server response cannot be null"); + } + + String[] lines = Regex.Split(response, "\r\n|\r|\n"); + bool firstLine = true; + bool bodyStart = false; + StringBuilder bodyBuilder = new StringBuilder(); + + foreach (String line in lines) + { + if (firstLine) + { + String[] items = line.Split(" "); + this.method = items[0]; + this.path = items[1]; + this.protocol = items[2]; + firstLine = false; + continue; + } + + if (bodyStart) + { + bodyBuilder.Append(line); + bodyBuilder.Append("\n"); + } + + if (String.IsNullOrEmpty(line)) + { + bodyStart = true; + continue; + } + + // store the header key-value pair in headers + String[] keyValue = line.Split(": "); + if (keyValue.Length == 2) + { // skip blank line, non key-value pair + this.headers.Add(keyValue[0], keyValue[1]); + } + } + + body = bodyBuilder.ToString(); + } + } +} diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs index 8df37880db3d..bf827a8f87c0 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs @@ -1157,7 +1157,30 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory if (queryObject != null) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject)); + if (queryObject.Id != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[id]", queryObject.Id)); + } + if (queryObject.Name != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[name]", queryObject.Name)); + } + if (queryObject.Category != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[category]", queryObject.Category)); + } + if (queryObject.PhotoUrls != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[photoUrls]", queryObject.PhotoUrls)); + } + if (queryObject.Tags != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[tags]", queryObject.Tags)); + } + if (queryObject.Status != null) + { + localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[status]", queryObject.Status)); + } } localVarRequestOptions.Operation = "QueryApi.TestQueryStyleDeepObjectExplodeTrueObject"; @@ -1294,7 +1317,6 @@ public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory if (queryObject != null) { - localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject)); } localVarRequestOptions.Operation = "QueryApi.TestQueryStyleDeepObjectExplodeTrueObjectAllOf"; From 25b67dd6bf264171d3f6e2e131d2b4bb1e3a8b14 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 20 Sep 2023 15:21:44 +0800 Subject: [PATCH 35/59] Run tests for C# Echo API client in CI (#16626) * run tests for C# echo api client in ci * trigger build failure * Revert "trigger build failure" This reverts commit 844ec9a3d2d00a989e3bb961d84587ecba0e9589. --- .../workflows/samples-dotnet6-client-echo-api.yaml | 4 +++- .../src/Org.OpenAPITools.Test/CustomTest.cs | 12 ++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/samples-dotnet6-client-echo-api.yaml b/.github/workflows/samples-dotnet6-client-echo-api.yaml index 17754bb8aded..a0dcb8a58c2a 100644 --- a/.github/workflows/samples-dotnet6-client-echo-api.yaml +++ b/.github/workflows/samples-dotnet6-client-echo-api.yaml @@ -28,4 +28,6 @@ jobs: (cd http-echo-server && npm install && npm start &) - name: Build working-directory: ${{ matrix.sample }} - run: dotnet build Org.OpenAPITools.sln + run: | + dotnet build Org.OpenAPITools.sln + dotnet test Org.OpenAPITools.sln diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/CustomTest.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/CustomTest.cs index ec244da09268..06b930205b5c 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/CustomTest.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/CustomTest.cs @@ -31,12 +31,12 @@ public void TestEchoBodyPet() } /** - * Test query parameter(s) - *

            - * Test query parameter(s) - * - * @throws ApiException if the Api call fails - */ + * Test query parameter(s) + *

            + * Test query parameter(s) + * + * @throws ApiException if the Api call fails + */ [Fact] public void TestQueryStyleFormExplodeTrueObjectTest() { From 16c6cff28f0d7a5afc9d042deb072fc91ae77013 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 20 Sep 2023 17:05:55 +0800 Subject: [PATCH 36/59] fix required parameter check (#16628) --- .../src/main/resources/python/api.mustache | 6 +-- .../python/openapi_client/api/body_api.py | 2 +- .../python/openapi_client/api/form_api.py | 18 ++++----- .../python/openapi_client/api/header_api.py | 6 +-- .../python/openapi_client/api/path_api.py | 4 +- .../petstore_api/api/fake_api.py | 40 +++++++++---------- .../petstore_api/api/pet_api.py | 24 +++++------ .../petstore_api/api/store_api.py | 4 +- .../petstore_api/api/user_api.py | 6 +-- .../python/petstore_api/api/fake_api.py | 40 +++++++++---------- .../python/petstore_api/api/pet_api.py | 24 +++++------ .../python/petstore_api/api/store_api.py | 4 +- .../python/petstore_api/api/user_api.py | 6 +-- 13 files changed, 92 insertions(+), 92 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/api.mustache b/modules/openapi-generator/src/main/resources/python/api.mustache index 2b5c37ff50a4..be804beec015 100644 --- a/modules/openapi-generator/src/main/resources/python/api.mustache +++ b/modules/openapi-generator/src/main/resources/python/api.mustache @@ -187,7 +187,7 @@ class {{classname}}: # process the path parameters _path_params = {} {{#pathParams}} - if _params['{{paramName}}']: + if _params['{{paramName}}'] is not None: _path_params['{{baseName}}'] = _params['{{paramName}}'] {{#isArray}} _collection_formats['{{baseName}}'] = '{{collectionFormat}}' @@ -224,7 +224,7 @@ class {{classname}}: # process the header parameters _header_params = dict(_params.get('_headers', {})) {{#headerParams}} - if _params['{{paramName}}']: + if _params['{{paramName}}'] is not None: _header_params['{{baseName}}'] = _params['{{paramName}}'] {{#isArray}} _collection_formats['{{baseName}}'] = '{{collectionFormat}}' @@ -235,7 +235,7 @@ class {{classname}}: _form_params = [] _files = {} {{#formParams}} - if _params['{{paramName}}']: + if _params['{{paramName}}'] is not None: {{^isFile}} _form_params.append(('{{{baseName}}}', _params['{{paramName}}'])) {{/isFile}} diff --git a/samples/client/echo_api/python/openapi_client/api/body_api.py b/samples/client/echo_api/python/openapi_client/api/body_api.py index 553feae23a3c..ebb8111b7725 100644 --- a/samples/client/echo_api/python/openapi_client/api/body_api.py +++ b/samples/client/echo_api/python/openapi_client/api/body_api.py @@ -438,7 +438,7 @@ def test_body_multipart_formdata_array_of_binary_with_http_info(self, files : co # process the form parameters _form_params = [] _files = {} - if _params['files']: + if _params['files'] is not None: _files['files'] = _params['files'] _collection_formats['files'] = 'csv' diff --git a/samples/client/echo_api/python/openapi_client/api/form_api.py b/samples/client/echo_api/python/openapi_client/api/form_api.py index 0071725761d6..7b0f9720c6c9 100644 --- a/samples/client/echo_api/python/openapi_client/api/form_api.py +++ b/samples/client/echo_api/python/openapi_client/api/form_api.py @@ -161,13 +161,13 @@ def test_form_integer_boolean_string_with_http_info(self, integer_form : Optiona # process the form parameters _form_params = [] _files = {} - if _params['integer_form']: + if _params['integer_form'] is not None: _form_params.append(('integer_form', _params['integer_form'])) - if _params['boolean_form']: + if _params['boolean_form'] is not None: _form_params.append(('boolean_form', _params['boolean_form'])) - if _params['string_form']: + if _params['string_form'] is not None: _form_params.append(('string_form', _params['string_form'])) # process the body parameter @@ -339,22 +339,22 @@ def test_form_oneof_with_http_info(self, form1 : Optional[StrictStr] = None, for # process the form parameters _form_params = [] _files = {} - if _params['form1']: + if _params['form1'] is not None: _form_params.append(('form1', _params['form1'])) - if _params['form2']: + if _params['form2'] is not None: _form_params.append(('form2', _params['form2'])) - if _params['form3']: + if _params['form3'] is not None: _form_params.append(('form3', _params['form3'])) - if _params['form4']: + if _params['form4'] is not None: _form_params.append(('form4', _params['form4'])) - if _params['id']: + if _params['id'] is not None: _form_params.append(('id', _params['id'])) - if _params['name']: + if _params['name'] is not None: _form_params.append(('name', _params['name'])) # process the body parameter diff --git a/samples/client/echo_api/python/openapi_client/api/header_api.py b/samples/client/echo_api/python/openapi_client/api/header_api.py index 7f9dc25354f5..e9ebc11e9cd9 100644 --- a/samples/client/echo_api/python/openapi_client/api/header_api.py +++ b/samples/client/echo_api/python/openapi_client/api/header_api.py @@ -158,13 +158,13 @@ def test_header_integer_boolean_string_with_http_info(self, integer_header : Opt _query_params = [] # process the header parameters _header_params = dict(_params.get('_headers', {})) - if _params['integer_header']: + if _params['integer_header'] is not None: _header_params['integer_header'] = _params['integer_header'] - if _params['boolean_header']: + if _params['boolean_header'] is not None: _header_params['boolean_header'] = _params['boolean_header'] - if _params['string_header']: + if _params['string_header'] is not None: _header_params['string_header'] = _params['string_header'] # process the form parameters diff --git a/samples/client/echo_api/python/openapi_client/api/path_api.py b/samples/client/echo_api/python/openapi_client/api/path_api.py index 35d0c6a11b0d..a2798c4d604a 100644 --- a/samples/client/echo_api/python/openapi_client/api/path_api.py +++ b/samples/client/echo_api/python/openapi_client/api/path_api.py @@ -146,10 +146,10 @@ def tests_path_string_path_string_integer_path_integer_with_http_info(self, path # process the path parameters _path_params = {} - if _params['path_string']: + if _params['path_string'] is not None: _path_params['path_string'] = _params['path_string'] - if _params['path_integer']: + if _params['path_integer'] is not None: _path_params['path_integer'] = _params['path_integer'] diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py index 17c8a17a918c..9bb46314e7ea 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py @@ -509,7 +509,7 @@ async def fake_http_signature_test_with_http_info(self, pet : Annotated[Pet, Fie # process the header parameters _header_params = dict(_params.get('_headers', {})) - if _params['header_1']: + if _params['header_1'] is not None: _header_params['header_1'] = _params['header_1'] # process the form parameters @@ -2239,49 +2239,49 @@ async def test_endpoint_parameters_with_http_info(self, number : Annotated[confl # process the form parameters _form_params = [] _files = {} - if _params['integer']: + if _params['integer'] is not None: _form_params.append(('integer', _params['integer'])) - if _params['int32']: + if _params['int32'] is not None: _form_params.append(('int32', _params['int32'])) - if _params['int64']: + if _params['int64'] is not None: _form_params.append(('int64', _params['int64'])) - if _params['number']: + if _params['number'] is not None: _form_params.append(('number', _params['number'])) - if _params['float']: + if _params['float'] is not None: _form_params.append(('float', _params['float'])) - if _params['double']: + if _params['double'] is not None: _form_params.append(('double', _params['double'])) - if _params['string']: + if _params['string'] is not None: _form_params.append(('string', _params['string'])) - if _params['pattern_without_delimiter']: + if _params['pattern_without_delimiter'] is not None: _form_params.append(('pattern_without_delimiter', _params['pattern_without_delimiter'])) - if _params['byte']: + if _params['byte'] is not None: _form_params.append(('byte', _params['byte'])) - if _params['binary']: + if _params['binary'] is not None: _files['binary'] = _params['binary'] - if _params['byte_with_max_length']: + if _params['byte_with_max_length'] is not None: _form_params.append(('byte_with_max_length', _params['byte_with_max_length'])) - if _params['var_date']: + if _params['var_date'] is not None: _form_params.append(('date', _params['var_date'])) - if _params['date_time']: + if _params['date_time'] is not None: _form_params.append(('dateTime', _params['date_time'])) - if _params['password']: + if _params['password'] is not None: _form_params.append(('password', _params['password'])) - if _params['param_callback']: + if _params['param_callback'] is not None: _form_params.append(('callback', _params['param_callback'])) # process the body parameter @@ -2440,10 +2440,10 @@ async def test_group_parameters_with_http_info(self, required_string_group : Ann # process the header parameters _header_params = dict(_params.get('_headers', {})) - if _params['required_boolean_group']: + if _params['required_boolean_group'] is not None: _header_params['required_boolean_group'] = _params['required_boolean_group'] - if _params['boolean_group']: + if _params['boolean_group'] is not None: _header_params['boolean_group'] = _params['boolean_group'] # process the form parameters @@ -2694,10 +2694,10 @@ async def test_json_form_data_with_http_info(self, param : Annotated[StrictStr, # process the form parameters _form_params = [] _files = {} - if _params['param']: + if _params['param'] is not None: _form_params.append(('param', _params['param'])) - if _params['param2']: + if _params['param2'] is not None: _form_params.append(('param2', _params['param2'])) # process the body parameter diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py index 3eb04cb7cefc..cb4e3ee8896e 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/pet_api.py @@ -261,7 +261,7 @@ async def delete_pet_with_http_info(self, pet_id : Annotated[StrictInt, Field(.. # process the path parameters _path_params = {} - if _params['pet_id']: + if _params['pet_id'] is not None: _path_params['petId'] = _params['pet_id'] @@ -269,7 +269,7 @@ async def delete_pet_with_http_info(self, pet_id : Annotated[StrictInt, Field(.. _query_params = [] # process the header parameters _header_params = dict(_params.get('_headers', {})) - if _params['api_key']: + if _params['api_key'] is not None: _header_params['api_key'] = _params['api_key'] # process the form parameters @@ -636,7 +636,7 @@ async def get_pet_by_id_with_http_info(self, pet_id : Annotated[StrictInt, Field # process the path parameters _path_params = {} - if _params['pet_id']: + if _params['pet_id'] is not None: _path_params['petId'] = _params['pet_id'] @@ -897,7 +897,7 @@ async def update_pet_with_form_with_http_info(self, pet_id : Annotated[StrictInt # process the path parameters _path_params = {} - if _params['pet_id']: + if _params['pet_id'] is not None: _path_params['petId'] = _params['pet_id'] @@ -908,10 +908,10 @@ async def update_pet_with_form_with_http_info(self, pet_id : Annotated[StrictInt # process the form parameters _form_params = [] _files = {} - if _params['name']: + if _params['name'] is not None: _form_params.append(('name', _params['name'])) - if _params['status']: + if _params['status'] is not None: _form_params.append(('status', _params['status'])) # process the body parameter @@ -1038,7 +1038,7 @@ async def upload_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(. # process the path parameters _path_params = {} - if _params['pet_id']: + if _params['pet_id'] is not None: _path_params['petId'] = _params['pet_id'] @@ -1049,10 +1049,10 @@ async def upload_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(. # process the form parameters _form_params = [] _files = {} - if _params['additional_metadata']: + if _params['additional_metadata'] is not None: _form_params.append(('additionalMetadata', _params['additional_metadata'])) - if _params['file']: + if _params['file'] is not None: _files['file'] = _params['file'] # process the body parameter @@ -1185,7 +1185,7 @@ async def upload_file_with_required_file_with_http_info(self, pet_id : Annotated # process the path parameters _path_params = {} - if _params['pet_id']: + if _params['pet_id'] is not None: _path_params['petId'] = _params['pet_id'] @@ -1196,10 +1196,10 @@ async def upload_file_with_required_file_with_http_info(self, pet_id : Annotated # process the form parameters _form_params = [] _files = {} - if _params['additional_metadata']: + if _params['additional_metadata'] is not None: _form_params.append(('additionalMetadata', _params['additional_metadata'])) - if _params['required_file']: + if _params['required_file'] is not None: _files['requiredFile'] = _params['required_file'] # process the body parameter diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py index f103deea2915..a904a1f2c572 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/store_api.py @@ -130,7 +130,7 @@ async def delete_order_with_http_info(self, order_id : Annotated[StrictStr, Fiel # process the path parameters _path_params = {} - if _params['order_id']: + if _params['order_id'] is not None: _path_params['order_id'] = _params['order_id'] @@ -364,7 +364,7 @@ async def get_order_by_id_with_http_info(self, order_id : Annotated[conint(stric # process the path parameters _path_params = {} - if _params['order_id']: + if _params['order_id'] is not None: _path_params['order_id'] = _params['order_id'] diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py index 9591e1ccc63f..379693e4bd0b 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/user_api.py @@ -518,7 +518,7 @@ async def delete_user_with_http_info(self, username : Annotated[StrictStr, Field # process the path parameters _path_params = {} - if _params['username']: + if _params['username'] is not None: _path_params['username'] = _params['username'] @@ -636,7 +636,7 @@ async def get_user_by_name_with_http_info(self, username : Annotated[StrictStr, # process the path parameters _path_params = {} - if _params['username']: + if _params['username'] is not None: _path_params['username'] = _params['username'] @@ -1010,7 +1010,7 @@ async def update_user_with_http_info(self, username : Annotated[StrictStr, Field # process the path parameters _path_params = {} - if _params['username']: + if _params['username'] is not None: _path_params['username'] = _params['username'] diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py index 1bdbf4e06a91..fb80af75b0f2 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py @@ -571,7 +571,7 @@ def fake_http_signature_test_with_http_info(self, pet : Annotated[Pet, Field(... # process the header parameters _header_params = dict(_params.get('_headers', {})) - if _params['header_1']: + if _params['header_1'] is not None: _header_params['header_1'] = _params['header_1'] # process the form parameters @@ -2509,49 +2509,49 @@ def test_endpoint_parameters_with_http_info(self, number : Annotated[confloat(le # process the form parameters _form_params = [] _files = {} - if _params['integer']: + if _params['integer'] is not None: _form_params.append(('integer', _params['integer'])) - if _params['int32']: + if _params['int32'] is not None: _form_params.append(('int32', _params['int32'])) - if _params['int64']: + if _params['int64'] is not None: _form_params.append(('int64', _params['int64'])) - if _params['number']: + if _params['number'] is not None: _form_params.append(('number', _params['number'])) - if _params['float']: + if _params['float'] is not None: _form_params.append(('float', _params['float'])) - if _params['double']: + if _params['double'] is not None: _form_params.append(('double', _params['double'])) - if _params['string']: + if _params['string'] is not None: _form_params.append(('string', _params['string'])) - if _params['pattern_without_delimiter']: + if _params['pattern_without_delimiter'] is not None: _form_params.append(('pattern_without_delimiter', _params['pattern_without_delimiter'])) - if _params['byte']: + if _params['byte'] is not None: _form_params.append(('byte', _params['byte'])) - if _params['binary']: + if _params['binary'] is not None: _files['binary'] = _params['binary'] - if _params['byte_with_max_length']: + if _params['byte_with_max_length'] is not None: _form_params.append(('byte_with_max_length', _params['byte_with_max_length'])) - if _params['var_date']: + if _params['var_date'] is not None: _form_params.append(('date', _params['var_date'])) - if _params['date_time']: + if _params['date_time'] is not None: _form_params.append(('dateTime', _params['date_time'])) - if _params['password']: + if _params['password'] is not None: _form_params.append(('password', _params['password'])) - if _params['param_callback']: + if _params['param_callback'] is not None: _form_params.append(('callback', _params['param_callback'])) # process the body parameter @@ -2726,10 +2726,10 @@ def test_group_parameters_with_http_info(self, required_string_group : Annotated # process the header parameters _header_params = dict(_params.get('_headers', {})) - if _params['required_boolean_group']: + if _params['required_boolean_group'] is not None: _header_params['required_boolean_group'] = _params['required_boolean_group'] - if _params['boolean_group']: + if _params['boolean_group'] is not None: _header_params['boolean_group'] = _params['boolean_group'] # process the form parameters @@ -3012,10 +3012,10 @@ def test_json_form_data_with_http_info(self, param : Annotated[StrictStr, Field( # process the form parameters _form_params = [] _files = {} - if _params['param']: + if _params['param'] is not None: _form_params.append(('param', _params['param'])) - if _params['param2']: + if _params['param2'] is not None: _form_params.append(('param2', _params['param2'])) # process the body parameter diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py index f0eefd7ec890..44df5ee26605 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py @@ -291,7 +291,7 @@ def delete_pet_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., des # process the path parameters _path_params = {} - if _params['pet_id']: + if _params['pet_id'] is not None: _path_params['petId'] = _params['pet_id'] @@ -299,7 +299,7 @@ def delete_pet_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., des _query_params = [] # process the header parameters _header_params = dict(_params.get('_headers', {})) - if _params['api_key']: + if _params['api_key'] is not None: _header_params['api_key'] = _params['api_key'] # process the form parameters @@ -714,7 +714,7 @@ def get_pet_by_id_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., # process the path parameters _path_params = {} - if _params['pet_id']: + if _params['pet_id'] is not None: _path_params['petId'] = _params['pet_id'] @@ -1007,7 +1007,7 @@ def update_pet_with_form_with_http_info(self, pet_id : Annotated[StrictInt, Fiel # process the path parameters _path_params = {} - if _params['pet_id']: + if _params['pet_id'] is not None: _path_params['petId'] = _params['pet_id'] @@ -1018,10 +1018,10 @@ def update_pet_with_form_with_http_info(self, pet_id : Annotated[StrictInt, Fiel # process the form parameters _form_params = [] _files = {} - if _params['name']: + if _params['name'] is not None: _form_params.append(('name', _params['name'])) - if _params['status']: + if _params['status'] is not None: _form_params.append(('status', _params['status'])) # process the body parameter @@ -1164,7 +1164,7 @@ def upload_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., de # process the path parameters _path_params = {} - if _params['pet_id']: + if _params['pet_id'] is not None: _path_params['petId'] = _params['pet_id'] @@ -1175,10 +1175,10 @@ def upload_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., de # process the form parameters _form_params = [] _files = {} - if _params['additional_metadata']: + if _params['additional_metadata'] is not None: _form_params.append(('additionalMetadata', _params['additional_metadata'])) - if _params['file']: + if _params['file'] is not None: _files['file'] = _params['file'] # process the body parameter @@ -1327,7 +1327,7 @@ def upload_file_with_required_file_with_http_info(self, pet_id : Annotated[Stric # process the path parameters _path_params = {} - if _params['pet_id']: + if _params['pet_id'] is not None: _path_params['petId'] = _params['pet_id'] @@ -1338,10 +1338,10 @@ def upload_file_with_required_file_with_http_info(self, pet_id : Annotated[Stric # process the form parameters _form_params = [] _files = {} - if _params['additional_metadata']: + if _params['additional_metadata'] is not None: _form_params.append(('additionalMetadata', _params['additional_metadata'])) - if _params['required_file']: + if _params['required_file'] is not None: _files['requiredFile'] = _params['required_file'] # process the body parameter diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py index b5b845531fe6..ad1fc048da50 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py @@ -144,7 +144,7 @@ def delete_order_with_http_info(self, order_id : Annotated[StrictStr, Field(..., # process the path parameters _path_params = {} - if _params['order_id']: + if _params['order_id'] is not None: _path_params['order_id'] = _params['order_id'] @@ -410,7 +410,7 @@ def get_order_by_id_with_http_info(self, order_id : Annotated[conint(strict=True # process the path parameters _path_params = {} - if _params['order_id']: + if _params['order_id'] is not None: _path_params['order_id'] = _params['order_id'] diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py index 240a692ebcad..41ccd5601535 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py @@ -580,7 +580,7 @@ def delete_user_with_http_info(self, username : Annotated[StrictStr, Field(..., # process the path parameters _path_params = {} - if _params['username']: + if _params['username'] is not None: _path_params['username'] = _params['username'] @@ -714,7 +714,7 @@ def get_user_by_name_with_http_info(self, username : Annotated[StrictStr, Field( # process the path parameters _path_params = {} - if _params['username']: + if _params['username'] is not None: _path_params['username'] = _params['username'] @@ -1136,7 +1136,7 @@ def update_user_with_http_info(self, username : Annotated[StrictStr, Field(..., # process the path parameters _path_params = {} - if _params['username']: + if _params['username'] is not None: _path_params['username'] = _params['username'] From 9b39887eba56b317b70e09fbdf3f484a9bf5e80f Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 20 Sep 2023 17:06:55 +0800 Subject: [PATCH 37/59] move option to kotlin client (#16627) --- docs/generators/kotlin-server.md | 1 - docs/generators/kotlin-spring.md | 1 - docs/generators/kotlin-vertx.md | 1 - .../languages/AbstractKotlinCodegen.java | 36 ------------------- .../languages/KotlinClientCodegen.java | 35 ++++++++++++++++++ .../KotlinJvmVolleyModelCodegenTest.java | 4 +-- 6 files changed, 37 insertions(+), 41 deletions(-) diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index b0580d7318c1..692e14c1d726 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -39,7 +39,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |parcelizeModels|toggle "@Parcelize" for generated models| |null| |returnResponse|Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true. This option is currently supported only when using jaxrs-spec library.| |false| |serializableModel|boolean - toggle "implements Serializable" for generated models| |null| -|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson' or 'kotlinx_serialization'| |moshi| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| |sourceFolder|source folder for generated code| |src/main/kotlin| diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index 8c818cfc0bbc..7c68491bc1f1 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -41,7 +41,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |parcelizeModels|toggle "@Parcelize" for generated models| |null| |reactive|use coroutines for reactive behavior| |false| |serializableModel|boolean - toggle "implements Serializable" for generated models| |null| -|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson' or 'kotlinx_serialization'| |moshi| |serverPort|configuration the port in which the sever is to run on| |8080| |serviceImplementation|generate stub service implementations that extends service interfaces. If this is set to true service interfaces will also be generated| |false| |serviceInterface|generate service interfaces to go alongside controllers. In most cases this option would be used to update an existing project, so not to override implementations. Useful to help facilitate the generation gap pattern| |false| diff --git a/docs/generators/kotlin-vertx.md b/docs/generators/kotlin-vertx.md index daafb64eb39e..c73360d14870 100644 --- a/docs/generators/kotlin-vertx.md +++ b/docs/generators/kotlin-vertx.md @@ -28,7 +28,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl |packageName|Generated artifact package name.| |org.openapitools| |parcelizeModels|toggle "@Parcelize" for generated models| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |null| -|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson' or 'kotlinx_serialization'| |moshi| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| |sourceFolder|source folder for generated code| |src/main/kotlin| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java index 081909cab5db..d3f7fd6dbab4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java @@ -48,10 +48,6 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements CodegenConfig { - public static final String SERIALIZATION_LIBRARY_DESC = "What serialization library to use: 'moshi' (default), or 'gson' or 'jackson' or 'kotlinx_serialization'"; - - public enum SERIALIZATION_LIBRARY_TYPE {moshi, gson, jackson, kotlinx_serialization} - public static final String MODEL_MUTABLE = "modelMutable"; public static final String MODEL_MUTABLE_DESC = "Create mutable models"; public static final String ADDITIONAL_MODEL_TYPE_ANNOTATIONS = "additionalModelTypeAnnotations"; @@ -81,7 +77,6 @@ public enum SERIALIZATION_LIBRARY_TYPE {moshi, gson, jackson, kotlinx_serializat protected boolean nonPublicApi = false; protected CodegenConstants.ENUM_PROPERTY_NAMING_TYPE enumPropertyNaming = CodegenConstants.ENUM_PROPERTY_NAMING_TYPE.camelCase; - protected SERIALIZATION_LIBRARY_TYPE serializationLibrary = SERIALIZATION_LIBRARY_TYPE.moshi; // model classes cannot use the same property names defined in HashMap // ref: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-hash-map/ @@ -265,9 +260,6 @@ public AbstractKotlinCodegen() { CliOption enumPropertyNamingOpt = new CliOption(CodegenConstants.ENUM_PROPERTY_NAMING, CodegenConstants.ENUM_PROPERTY_NAMING_DESC); cliOptions.add(enumPropertyNamingOpt.defaultValue(enumPropertyNaming.name())); - CliOption serializationLibraryOpt = new CliOption(CodegenConstants.SERIALIZATION_LIBRARY, SERIALIZATION_LIBRARY_DESC); - cliOptions.add(serializationLibraryOpt.defaultValue(serializationLibrary.name())); - cliOptions.add(new CliOption(CodegenConstants.PARCELIZE_MODELS, CodegenConstants.PARCELIZE_MODELS_DESC)); cliOptions.add(new CliOption(CodegenConstants.SERIALIZABLE_MODEL, CodegenConstants.SERIALIZABLE_MODEL_DESC)); cliOptions.add(new CliOption(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG_DESC)); @@ -313,9 +305,6 @@ public CodegenConstants.ENUM_PROPERTY_NAMING_TYPE getEnumPropertyNaming() { return this.enumPropertyNaming; } - public SERIALIZATION_LIBRARY_TYPE getSerializationLibrary() { - return this.serializationLibrary; - } /** * Sets the naming convention for Kotlin enum properties @@ -334,24 +323,6 @@ public void setEnumPropertyNaming(final String enumPropertyNamingType) { } } - /** - * Sets the serialization engine for Kotlin - * - * @param enumSerializationLibrary The string representation of the serialization library as defined by - * {@link org.openapitools.codegen.languages.AbstractKotlinCodegen.SERIALIZATION_LIBRARY_TYPE} - */ - public void setSerializationLibrary(final String enumSerializationLibrary) { - try { - this.serializationLibrary = SERIALIZATION_LIBRARY_TYPE.valueOf(enumSerializationLibrary); - } catch (IllegalArgumentException ex) { - StringBuilder sb = new StringBuilder(enumSerializationLibrary + " is an invalid enum property naming option. Please choose from:"); - for (SERIALIZATION_LIBRARY_TYPE t : SERIALIZATION_LIBRARY_TYPE.values()) { - sb.append("\n ").append(t.name()); - } - throw new RuntimeException(sb.toString()); - } - } - /** * returns the OpenAPI type for the property * @@ -463,13 +434,6 @@ public void processOpts() { setEnumPropertyNaming((String) additionalProperties.get(CodegenConstants.ENUM_PROPERTY_NAMING)); } - if (additionalProperties.containsKey(CodegenConstants.SERIALIZATION_LIBRARY)) { - setSerializationLibrary((String) additionalProperties.get(CodegenConstants.SERIALIZATION_LIBRARY)); - additionalProperties.put(this.serializationLibrary.name(), true); - } else { - additionalProperties.put(this.serializationLibrary.name(), true); - } - if (additionalProperties.containsKey(CodegenConstants.SOURCE_FOLDER)) { this.setSourceFolder((String) additionalProperties.get(CodegenConstants.SOURCE_FOLDER)); } else { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java index 0639d27c6fbd..bd59663c2103 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java @@ -104,6 +104,9 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen { protected String authFolder; + protected SERIALIZATION_LIBRARY_TYPE serializationLibrary = SERIALIZATION_LIBRARY_TYPE.moshi; + public static final String SERIALIZATION_LIBRARY_DESC = "What serialization library to use: 'moshi' (default), or 'gson' or 'jackson' or 'kotlinx_serialization'"; + public enum SERIALIZATION_LIBRARY_TYPE {moshi, gson, jackson, kotlinx_serialization} public enum DateLibrary { STRING("string"), @@ -250,6 +253,9 @@ public KotlinClientCodegen() { cliOptions.add(CliOption.newBoolean(GENERATE_ROOM_MODELS, "Generate Android Room database models in addition to API models (JVM Volley library only)", false)); cliOptions.add(CliOption.newBoolean(SUPPORT_ANDROID_API_LEVEL_25_AND_BELLOW, "[WARNING] This flag will generate code that has a known security vulnerability. It uses `kotlin.io.createTempFile` instead of `java.nio.file.Files.createTempFile` in order to support Android API level 25 and bellow. For more info, please check the following links https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-23x4-m842-fmwf, https://github.com/OpenAPITools/openapi-generator/pull/9284")); + + CliOption serializationLibraryOpt = new CliOption(CodegenConstants.SERIALIZATION_LIBRARY, SERIALIZATION_LIBRARY_DESC); + cliOptions.add(serializationLibraryOpt.defaultValue(serializationLibrary.name())); } public CodegenType getTag() { @@ -321,6 +327,28 @@ public void setOmitGradleWrapper(boolean omitGradleWrapper) { this.omitGradleWrapper = omitGradleWrapper; } + public SERIALIZATION_LIBRARY_TYPE getSerializationLibrary() { + return this.serializationLibrary; + } + + /** + * Sets the serialization engine for Kotlin + * + * @param enumSerializationLibrary The string representation of the serialization library as defined by + * {@link org.openapitools.codegen.languages.AbstractKotlinCodegen.SERIALIZATION_LIBRARY_TYPE} + */ + public void setSerializationLibrary(final String enumSerializationLibrary) { + try { + this.serializationLibrary = SERIALIZATION_LIBRARY_TYPE.valueOf(enumSerializationLibrary); + } catch (IllegalArgumentException ex) { + StringBuilder sb = new StringBuilder(enumSerializationLibrary + " is an invalid enum property naming option. Please choose from:"); + for (SERIALIZATION_LIBRARY_TYPE t : SERIALIZATION_LIBRARY_TYPE.values()) { + sb.append("\n ").append(t.name()); + } + throw new RuntimeException(sb.toString()); + } + } + @Override public String modelFilename(String templateName, String modelName) { String suffix = modelTemplateFiles().get(templateName); @@ -403,6 +431,13 @@ public void processOpts() { setOmitGradleWrapper(Boolean.parseBoolean(additionalProperties.get(OMIT_GRADLE_WRAPPER).toString())); } + if (additionalProperties.containsKey(CodegenConstants.SERIALIZATION_LIBRARY)) { + setSerializationLibrary((String) additionalProperties.get(CodegenConstants.SERIALIZATION_LIBRARY)); + additionalProperties.put(this.serializationLibrary.name(), true); + } else { + additionalProperties.put(this.serializationLibrary.name(), true); + } + commonSupportingFiles(); switch (getLibrary()) { 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 c2700fd4d958..80103131a657 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 @@ -24,7 +24,7 @@ public void modelsWithRoomModels() throws IOException { KotlinClientCodegen codegen = new KotlinClientCodegen(); codegen.additionalProperties().put(KotlinClientCodegen.GENERATE_ROOM_MODELS, true); codegen.additionalProperties().put(KotlinClientCodegen.ROOM_MODEL_PACKAGE, "models.room"); - codegen.additionalProperties().put(CodegenConstants.SERIALIZATION_LIBRARY, AbstractKotlinCodegen.SERIALIZATION_LIBRARY_TYPE.gson.name()); + codegen.additionalProperties().put(CodegenConstants.SERIALIZATION_LIBRARY, KotlinClientCodegen.SERIALIZATION_LIBRARY_TYPE.gson.name()); String outputPath = checkModel(codegen, false); @@ -37,7 +37,7 @@ public void modelsWithRoomModels() throws IOException { public void modelsWithoutRoomModels() throws IOException { KotlinClientCodegen codegen = new KotlinClientCodegen(); codegen.additionalProperties().put(KotlinClientCodegen.GENERATE_ROOM_MODELS, false); - codegen.additionalProperties().put(CodegenConstants.SERIALIZATION_LIBRARY, AbstractKotlinCodegen.SERIALIZATION_LIBRARY_TYPE.gson.name()); + codegen.additionalProperties().put(CodegenConstants.SERIALIZATION_LIBRARY, KotlinClientCodegen.SERIALIZATION_LIBRARY_TYPE.gson.name()); String outputPath = checkModel(codegen, false); From 254b359a5692cfb2392305e8986602c050f96e2a Mon Sep 17 00:00:00 2001 From: Beppe Catanese <1771700+gcatanese@users.noreply.github.com> Date: Wed, 20 Sep 2023 11:35:30 +0200 Subject: [PATCH 38/59] Change default value of 'pathParamsAsVariables' config option (#16404) * Change default value for config option * Regenerate samples --- .../languages/PostmanCollectionCodegen.java | 2 +- .../postman/PostmanCollectionCodegenTest.java | 5 +++- .../schema/postman-collection/postman.json | 28 ++++++------------- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PostmanCollectionCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PostmanCollectionCodegen.java index 9eb9ef63a860..e0e1da0d77e4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PostmanCollectionCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PostmanCollectionCodegen.java @@ -35,7 +35,7 @@ public class PostmanCollectionCodegen extends DefaultCodegen implements CodegenC public static final String FOLDER_STRATEGY_DEFAULT_VALUE = "Tags"; // Select whether to create Postman variables for path templates public static final String PATH_PARAMS_AS_VARIABLES = "pathParamsAsVariables"; - public static final Boolean PATH_PARAMS_AS_VARIABLES_DEFAULT_VALUE = true; + public static final Boolean PATH_PARAMS_AS_VARIABLES_DEFAULT_VALUE = false; public static final String POSTMAN_FILE_DEFAULT_VALUE = "postman.json"; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/postman/PostmanCollectionCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/postman/PostmanCollectionCodegenTest.java index 374d591b549c..aa92b6a095fa 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/postman/PostmanCollectionCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/postman/PostmanCollectionCodegenTest.java @@ -130,6 +130,7 @@ public void testVariables() throws Exception { final CodegenConfigurator configurator = new CodegenConfigurator() .setGeneratorName("postman-collection") .setInputSpec("src/test/resources/3_0/postman-collection/SampleProject.yaml") + .addAdditionalProperty(PostmanCollectionCodegen.PATH_PARAMS_AS_VARIABLES, true) .setOutputDir(output.getAbsolutePath().replace("\\", "/")); final ClientOptInput clientOptInput = configurator.toClientOptInput(); @@ -165,6 +166,7 @@ public void testVariablesInRequestExample() throws Exception { final CodegenConfigurator configurator = new CodegenConfigurator() .setGeneratorName("postman-collection") .setInputSpec("src/test/resources/3_0/postman-collection/BasicVariablesInExample.yaml") + .addAdditionalProperty(PostmanCollectionCodegen.PATH_PARAMS_AS_VARIABLES, true) .setOutputDir(output.getAbsolutePath().replace("\\", "/")); final ClientOptInput clientOptInput = configurator.toClientOptInput(); @@ -197,6 +199,7 @@ public void testSkipPostmanVariables() throws Exception { .setGeneratorName("postman-collection") .addAdditionalProperty(PostmanCollectionCodegen.POSTMAN_VARIABLES, false) .setInputSpec("src/test/resources/3_0/postman-collection/BasicVariablesInExample.yaml") + .addAdditionalProperty(PostmanCollectionCodegen.PATH_PARAMS_AS_VARIABLES, true) .setOutputDir(output.getAbsolutePath().replace("\\", "/")); final ClientOptInput clientOptInput = configurator.toClientOptInput(); @@ -224,7 +227,6 @@ public void testGenerateWithoutPathParamsVariables() throws Exception { final CodegenConfigurator configurator = new CodegenConfigurator() .setGeneratorName("postman-collection") - .addAdditionalProperty(PostmanCollectionCodegen.PATH_PARAMS_AS_VARIABLES, false) .setInputSpec("src/test/resources/3_0/postman-collection/SampleProject.yaml") .setOutputDir(output.getAbsolutePath().replace("\\", "/")); @@ -277,6 +279,7 @@ public void testNamingRequestsWithUrl() throws Exception { final CodegenConfigurator configurator = new CodegenConfigurator() .setGeneratorName("postman-collection") .setInputSpec("src/test/resources/3_0/postman-collection/SampleProject.yaml") + .addAdditionalProperty(PostmanCollectionCodegen.PATH_PARAMS_AS_VARIABLES, true) .setOutputDir(output.getAbsolutePath().replace("\\", "/")); final ClientOptInput clientOptInput = configurator.toClientOptInput(); diff --git a/samples/schema/postman-collection/postman.json b/samples/schema/postman-collection/postman.json index ed3485075642..c7f6b04c7521 100644 --- a/samples/schema/postman-collection/postman.json +++ b/samples/schema/postman-collection/postman.json @@ -13,7 +13,7 @@ "name": "default", "item": [ { - "name": "/users/{{userId}} (DEPRECATED)", + "name": "/users/{userId} (DEPRECATED)", "description": "Update the information of an existing user.", "item": [ { @@ -52,13 +52,13 @@ } }, "url": { - "raw": "{{baseUrl}}/users/{{userId}}", + "raw": "{{baseUrl}}/users/{userId}", "host": [ "{{baseUrl}}" ], "path": [ "users", - "{{userId}}" + "{userId}" ], "variable": [ { @@ -81,7 +81,7 @@ "name": "advanced", "item": [ { - "name": "/groups/{{groupId}}", + "name": "/groups/{groupId}", "description": "Get group of users", "item": [ { @@ -105,13 +105,13 @@ } }, "url": { - "raw": "{{baseUrl}}/groups/{{groupId}}", + "raw": "{{baseUrl}}/groups/{groupId}", "host": [ "{{baseUrl}}" ], "path": [ "groups", - "{{groupId}}" + "{groupId}" ], "variable": [ { @@ -129,7 +129,7 @@ ] }, { - "name": "/users/{{userId}}", + "name": "/users/{userId}", "description": "Retrieve the information of the user with the matching user ID.", "item": [ { @@ -163,13 +163,13 @@ } }, "url": { - "raw": "{{baseUrl}}/users/{{userId}}", + "raw": "{{baseUrl}}/users/{userId}", "host": [ "{{baseUrl}}" ], "path": [ "users", - "{{userId}}" + "{userId}" ], "variable": [ { @@ -328,20 +328,10 @@ "value": "v1", "type": "string" }, - { - "key": "groupId", - "value": "1", - "type": "number" - }, { "key": "port", "value": "5000", "type": "string" - }, - { - "key": "userId", - "value": "", - "type": "number" } ] } From b9aa40fbc37f781bb462689c5295ff7c0e8317dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Thu, 21 Sep 2023 15:22:14 +0900 Subject: [PATCH 39/59] [python] update pytest --- samples/openapi3/client/petstore/python-pydantic-v2/tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/tox.ini b/samples/openapi3/client/petstore/python-pydantic-v2/tox.ini index 49d3f9352a6c..8989fc3c4d96 100755 --- a/samples/openapi3/client/petstore/python-pydantic-v2/tox.ini +++ b/samples/openapi3/client/petstore/python-pydantic-v2/tox.ini @@ -6,4 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - pytest --cov=petstore_api test/test_model.py + pytest --cov=petstore_api From 0a3081f4a79baca09a2ccbc895be308318d7d844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Thu, 21 Sep 2023 15:27:31 +0900 Subject: [PATCH 40/59] [python] replace @validator with @field_validator --- .../codegen/languages/AbstractPythonCodegen.java | 14 +++++++------- .../src/main/resources/python/model_anyof.mustache | 6 +++++- .../main/resources/python/model_generic.mustache | 10 ++++++++++ .../src/main/resources/python/model_oneof.mustache | 6 +++++- 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java index a9bd72e390ac..437c28e0fc9a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java @@ -871,13 +871,13 @@ private ModelsMap postProcessModelsMap(ModelsMap objs) { pydanticImports.add("Field"); pydanticImports.add("StrictStr"); pydanticImports.add("ValidationError"); - pydanticImports.add("validator"); + pydanticImports.add(usePydanticV2 ? "field_validator" : "validator"); } else if (!model.anyOf.isEmpty()) { // anyOF codegenProperties = model.getComposedSchemas().getAnyOf(); pydanticImports.add("Field"); pydanticImports.add("StrictStr"); pydanticImports.add("ValidationError"); - pydanticImports.add("validator"); + pydanticImports.add(usePydanticV2 ? "field_validator" : "validator"); } else { // typical model codegenProperties = model.vars; @@ -1110,7 +1110,7 @@ private String getPydanticType(CodegenParameter cp, fieldCustomization.add("min_length=" + cp.getMinLength()); } if (cp.getPattern() != null) { - pydanticImports.add("validator"); + pydanticImports.add(usePydanticV2 ? "field_validator" : "validator"); // use validator instead as regex doesn't support flags, e.g. IGNORECASE //fieldCustomization.add(String.format(Locale.ROOT, "regex=r'%s'", cp.getPattern())); } @@ -1229,7 +1229,7 @@ private String getPydanticType(CodegenParameter cp, fieldCustomization.add("max_length=" + cp.getMaxLength()); } if (cp.getPattern() != null) { - pydanticImports.add("validator"); + pydanticImports.add(usePydanticV2 ? "field_validator" : "validator"); // use validator instead as regex doesn't support flags, e.g. IGNORECASE //fieldCustomization.add(Locale.ROOT, String.format(Locale.ROOT, "regex=r'%s'", cp.getPattern())); } @@ -1347,7 +1347,7 @@ private String getPydanticType(CodegenProperty cp, } if (cp.isEnum) { - pydanticImports.add("validator"); + pydanticImports.add(usePydanticV2 ? "field_validator" : "validator"); } /* comment out the following since Literal requires python 3.8 @@ -1397,7 +1397,7 @@ private String getPydanticType(CodegenProperty cp, fieldCustomization.add("min_length=" + cp.getMinLength()); } if (cp.getPattern() != null) { - pydanticImports.add("validator"); + pydanticImports.add(usePydanticV2 ? "field_validator" : "validator"); // use validator instead as regex doesn't support flags, e.g. IGNORECASE //fieldCustomization.add(Locale.ROOT, String.format(Locale.ROOT, "regex=r'%s'", cp.getPattern())); } @@ -1516,7 +1516,7 @@ private String getPydanticType(CodegenProperty cp, fieldCustomization.add("max_length=" + cp.getMaxLength()); } if (cp.getPattern() != null) { - pydanticImports.add("validator"); + pydanticImports.add(usePydanticV2 ? "field_validator" : "validator"); // use validator instead as regex doesn't support flags, e.g. IGNORECASE //fieldCustomization.add(Locale.ROOT, String.format(Locale.ROOT, "regex=r'%s'", cp.getPattern())); } diff --git a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache index ff0b3fcd7df5..aeb844a04775 100644 --- a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache @@ -68,8 +68,12 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} super().__init__(actual_instance=args[0]) else: super().__init__(**kwargs) - + {{#usePydanticV2}} + @field_validator('actual_instance') + {{/usePydanticV2}} + {{^usePydanticV2}} @validator('actual_instance') + {{/usePydanticV2}} def actual_instance_must_validate_anyof(cls, v): {{#isNullable}} if v is None: diff --git a/modules/openapi-generator/src/main/resources/python/model_generic.mustache b/modules/openapi-generator/src/main/resources/python/model_generic.mustache index 30072031c0c1..5d46450793e2 100644 --- a/modules/openapi-generator/src/main/resources/python/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_generic.mustache @@ -24,7 +24,12 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{#vars}} {{#vendorExtensions.x-regex}} + {{#usePydanticV2}} + @field_validator('{{{name}}}') + {{/usePydanticV2}} + {{^usePydanticV2}} @validator('{{{name}}}') + {{/usePydanticV2}} def {{{name}}}_validate_regular_expression(cls, value): """Validates the regular expression""" {{^required}} @@ -45,7 +50,12 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{/vendorExtensions.x-regex}} {{#isEnum}} + {{#usePydanticV2}} + @field_validator('{{{name}}}') + {{/usePydanticV2}} + {{^usePydanticV2}} @validator('{{{name}}}') + {{/usePydanticV2}} def {{{name}}}_validate_enum(cls, value): """Validates the enum""" {{^required}} diff --git a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache index b2ff88833b54..3cf7c67a879d 100644 --- a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache @@ -68,8 +68,12 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} super().__init__(actual_instance=args[0]) else: super().__init__(**kwargs) - + {{#usePydanticV2}} + @field_validator('actual_instance') + {{/usePydanticV2}} + {{^usePydanticV2}} @validator('actual_instance') + {{/usePydanticV2}} def actual_instance_must_validate_oneof(cls, v): {{#isNullable}} if v is None: From 6098862ef326b908685b8b880dbbfd35ce4e1fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Thu, 21 Sep 2023 15:28:29 +0900 Subject: [PATCH 41/59] [python] add type to discriminator_value_class_map --- .../src/main/resources/python/model_anyof.mustache | 2 +- .../src/main/resources/python/model_generic.mustache | 2 +- .../src/main/resources/python/model_oneof.mustache | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache index aeb844a04775..374095d26c6c 100644 --- a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache @@ -52,7 +52,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{/usePydanticV2}} {{#discriminator}} - discriminator_value_class_map = { + discriminator_value_class_map: dict[str, str] = { {{#children}} '{{^vendorExtensions.x-discriminator-value}}{{name}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}': '{{{classname}}}'{{^-last}},{{/-last}} {{/children}} diff --git a/modules/openapi-generator/src/main/resources/python/model_generic.mustache b/modules/openapi-generator/src/main/resources/python/model_generic.mustache index 5d46450793e2..5a155e4878c6 100644 --- a/modules/openapi-generator/src/main/resources/python/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_generic.mustache @@ -104,7 +104,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{#mappedModels}} {{#-first}} # discriminator mappings - __discriminator_value_class_map = { + __discriminator_value_class_map: dict[str, str] = { {{/-first}} '{{{mappingName}}}': '{{{modelName}}}'{{^-last}},{{/-last}} {{#-last}} diff --git a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache index 3cf7c67a879d..aa679dacbb34 100644 --- a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache @@ -52,7 +52,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{/usePydanticV2}} {{#discriminator}} - discriminator_value_class_map = { + discriminator_value_class_map: dict[str, str] = { {{#children}} '{{^vendorExtensions.x-discriminator-value}}{{name}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}': '{{{classname}}}'{{^-last}},{{/-last}} {{/children}} From aaefe8f3215b893b695a2eb236353d54a7019704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Thu, 21 Sep 2023 15:43:02 +0900 Subject: [PATCH 42/59] [python] replace parse_obj with model_validate --- .../src/main/resources/python/model_generic.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/model_generic.mustache b/modules/openapi-generator/src/main/resources/python/model_generic.mustache index 5a155e4878c6..e35ea1a8b54b 100644 --- a/modules/openapi-generator/src/main/resources/python/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_generic.mustache @@ -254,7 +254,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} return None if not isinstance(obj, dict): - return {{{classname}}}.parse_obj(obj) + return {{{classname}}}.{{#usePydanticV2}}model_validate{{/usePydanticV2}}{{^usePydanticV2}}parse_obj{{/usePydanticV2}}(obj) {{#disallowAdditionalPropertiesIfNotPresent}} {{^isAdditionalPropertiesTrue}} @@ -265,7 +265,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{/isAdditionalPropertiesTrue}} {{/disallowAdditionalPropertiesIfNotPresent}} - _obj = {{{classname}}}.parse_obj({ + _obj = {{{classname}}}.{{#usePydanticV2}}model_validate{{/usePydanticV2}}{{^usePydanticV2}}parse_obj{{/usePydanticV2}}({ {{#allVars}} {{#isContainer}} {{#isArray}} From ec6d661268bc03d1b67794c0290df2b0d47619aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Thu, 21 Sep 2023 15:53:56 +0900 Subject: [PATCH 43/59] [python] replace dict with model_dump --- .../src/main/resources/python/model_anyof.mustache | 2 +- .../src/main/resources/python/model_generic.mustache | 4 ++-- .../src/main/resources/python/model_oneof.mustache | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache index 374095d26c6c..3c275f1d5157 100644 --- a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache @@ -193,7 +193,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} def to_str(self) -> str: """Returns the string representation of the actual instance""" - return pprint.pformat(self.dict()) + return pprint.pformat(self.{{#usePydanticV2}}model_dump{{/usePydanticV2}}{{^usePydanticV2}}dict{{/usePydanticV2}}()) {{#vendorExtensions.x-py-postponed-model-imports.size}} {{#vendorExtensions.x-py-postponed-model-imports}} diff --git a/modules/openapi-generator/src/main/resources/python/model_generic.mustache b/modules/openapi-generator/src/main/resources/python/model_generic.mustache index e35ea1a8b54b..8c3ca8f4dfb5 100644 --- a/modules/openapi-generator/src/main/resources/python/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_generic.mustache @@ -125,7 +125,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{/hasChildren}} def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.{{#usePydanticV2}}model_dump{{/usePydanticV2}}{{^usePydanticV2}}dict{{/usePydanticV2}}(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -138,7 +138,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.{{#usePydanticV2}}model_dump{{/usePydanticV2}}{{^usePydanticV2}}dict{{/usePydanticV2}}(by_alias=True, exclude={ {{#vendorExtensions.x-py-readonly}} "{{{.}}}", diff --git a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache index aa679dacbb34..ab47b11b90bd 100644 --- a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache @@ -220,7 +220,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} def to_str(self) -> str: """Returns the string representation of the actual instance""" - return pprint.pformat(self.dict()) + return pprint.pformat(self.{{#usePydanticV2}}model_dump{{/usePydanticV2}}{{^usePydanticV2}}dict{{/usePydanticV2}}()) {{#vendorExtensions.x-py-postponed-model-imports.size}} {{#vendorExtensions.x-py-postponed-model-imports}} From 754c0e299e02042614d227df1e0029a20bd6b895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Thu, 21 Sep 2023 16:03:48 +0900 Subject: [PATCH 44/59] [python] replace construct with model_construct --- .../src/main/resources/python/model_anyof.mustache | 4 ++-- .../src/main/resources/python/model_oneof.mustache | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache index 3c275f1d5157..29b04f5ad242 100644 --- a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache @@ -80,7 +80,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} return v {{/isNullable}} - instance = {{{classname}}}.construct() + instance = {{{classname}}}.{{#usePydanticV2}}model_construct{{/usePydanticV2}}{{^usePydanticV2}}construct{{/usePydanticV2}}() error_messages = [] {{#composedSchemas.anyOf}} # validate data type: {{{dataType}}} @@ -121,7 +121,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} @classmethod def from_json(cls, json_str: str) -> {{{classname}}}: """Returns the object represented by the json string""" - instance = {{{classname}}}.construct() + instance = {{{classname}}}.{{#usePydanticV2}}model_construct{{/usePydanticV2}}{{^usePydanticV2}}construct{{/usePydanticV2}}() {{#isNullable}} if json_str is None: return instance diff --git a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache index ab47b11b90bd..deff859d13da 100644 --- a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache @@ -80,7 +80,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} return v {{/isNullable}} - instance = {{{classname}}}.construct() + instance = {{{classname}}}.{{#usePydanticV2}}model_construct{{/usePydanticV2}}{{^usePydanticV2}}construct{{/usePydanticV2}}() error_messages = [] match = 0 {{#composedSchemas.oneOf}} @@ -124,7 +124,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} @classmethod def from_json(cls, json_str: str) -> {{{classname}}}: """Returns the object represented by the json string""" - instance = {{{classname}}}.construct() + instance = {{{classname}}}.{{#usePydanticV2}}model_construct{{/usePydanticV2}}{{^usePydanticV2}}construct{{/usePydanticV2}}() {{#isNullable}} if json_str is None: return instance From 5a30c8f3ed26b29eb79e1eacb586121c36c47024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Thu, 21 Sep 2023 16:07:00 +0900 Subject: [PATCH 45/59] [python] replace getheaders with headers --- .../src/main/resources/python/api_client.mustache | 4 ++-- .../src/main/resources/python/exceptions.mustache | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/api_client.mustache b/modules/openapi-generator/src/main/resources/python/api_client.mustache index f0cdac8bb4ad..f040abb222d0 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -262,7 +262,7 @@ class ApiClient: else: return ApiResponse(status_code = response_data.status, data = return_data, - headers = response_data.getheaders(), + headers = response_data.headers, raw_data = response_data.data) {{/tornado}} {{#tornado}} @@ -271,7 +271,7 @@ class ApiClient: else: raise tornado.gen.Return(ApiResponse(status_code = response_data.status, data = return_data, - headers = response_data.getheaders(), + headers = response_data.headers, raw_data = response_data.data)) {{/tornado}} diff --git a/modules/openapi-generator/src/main/resources/python/exceptions.mustache b/modules/openapi-generator/src/main/resources/python/exceptions.mustache index 8a155a9fe08e..ceab49dccec9 100644 --- a/modules/openapi-generator/src/main/resources/python/exceptions.mustache +++ b/modules/openapi-generator/src/main/resources/python/exceptions.mustache @@ -96,7 +96,7 @@ class ApiException(OpenApiException): self.status = http_resp.status self.reason = http_resp.reason self.body = http_resp.data - self.headers = http_resp.getheaders() + self.headers = http_resp.headers else: self.status = status self.reason = reason From 8f8fd85fd664c8b14a17a8aa3797fb522ce28368 Mon Sep 17 00:00:00 2001 From: krasv Date: Thu, 21 Sep 2023 11:08:24 +0200 Subject: [PATCH 46/59] contribution #6123: add spring support for SSE conform specs (#16543) * add spring support for SSE conform specs see https://github.com/OpenAPITools/openapi-generator/issues/6123 for the ongoing discussion * extend generator option documentation * applied review suggestions * regenerated samples * regenerated docu * fix code style: removed tabs --- .../codegen/languages/SpringCodegen.java | 54 +++++++ .../main/resources/JavaSpring/api.mustache | 5 +- .../resources/JavaSpring/apiDelegate.mustache | 2 +- .../resources/JavaSpring/methodBody.mustache | 8 +- .../JavaSpring/responseType.mustache | 1 + .../java/spring/SpringCodegenTest.java | 147 ++++++++++++++---- .../src/test/resources/3_0/sse.yaml | 62 ++++++++ .../java/org/openapitools/api/DefaultApi.java | 2 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../org/openapitools/api/PetController.java | 8 + .../org/openapitools/api/StoreController.java | 4 + .../org/openapitools/api/UserController.java | 9 ++ .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../java/org/openapitools/api/DefaultApi.java | 2 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 15 ++ .../api/FakeClassnameTags123Api.java | 1 + .../java/org/openapitools/api/PetApi.java | 10 ++ .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 9 ++ .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../java/org/openapitools/api/BarApi.java | 1 + .../java/org/openapitools/api/FooApi.java | 2 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 17 ++ .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 17 ++ .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 17 ++ .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../org/openapitools/api/NullableApi.java | 1 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 17 ++ .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 17 ++ .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 17 ++ .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 17 ++ .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 17 ++ .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 17 ++ .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 17 ++ .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 15 ++ .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 9 ++ .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../org/openapitools/api/VersioningApi.java | 3 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 15 ++ .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 9 ++ .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../org/openapitools/api/VersioningApi.java | 3 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 15 ++ .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 9 ++ .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../org/openapitools/api/VersioningApi.java | 3 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 15 ++ .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 9 ++ .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../org/openapitools/api/VersioningApi.java | 3 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 17 ++ .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + .../virtualan/api/AnotherFakeApi.java | 1 + .../openapitools/virtualan/api/FakeApi.java | 17 ++ .../virtualan/api/FakeClassnameTestApi.java | 1 + .../openapitools/virtualan/api/PetApi.java | 8 + .../openapitools/virtualan/api/StoreApi.java | 4 + .../openapitools/virtualan/api/UserApi.java | 8 + .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 17 ++ .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 8 + .../java/org/openapitools/api/StoreApi.java | 4 + .../java/org/openapitools/api/UserApi.java | 8 + 172 files changed, 1287 insertions(+), 32 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/JavaSpring/responseType.mustache create mode 100644 modules/openapi-generator/src/test/resources/3_0/sse.yaml diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index b2ae0ecd991d..8d10dbd6484d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -68,6 +68,7 @@ import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.PathItem; +import io.swagger.v3.oas.models.media.MediaType; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.parameters.Parameter; import io.swagger.v3.oas.models.servers.Server; @@ -96,6 +97,7 @@ public class SpringCodegen extends AbstractJavaCodegen public static final String ASYNC = "async"; public static final String REACTIVE = "reactive"; + public static final String SSE = "serverSentEvents"; public static final String RESPONSE_WRAPPER = "responseWrapper"; public static final String USE_TAGS = "useTags"; public static final String SPRING_BOOT = "spring-boot"; @@ -144,6 +146,7 @@ public String getDescription() { protected boolean singleContentTypes = false; protected boolean async = false; protected boolean reactive = false; + protected boolean sse = false; protected String responseWrapper = ""; protected boolean skipDefaultInterface = false; protected boolean useTags = false; @@ -448,6 +451,9 @@ public void processOpts() { throw new IllegalArgumentException("Currently, reactive option doesn't supported by Spring Cloud"); } this.setReactive(Boolean.parseBoolean(additionalProperties.get(REACTIVE).toString())); + if (additionalProperties.containsKey(SSE)) { + this.setSse(Boolean.parseBoolean(additionalProperties.get(SSE).toString())); + } } if (additionalProperties.containsKey(RESPONSE_WRAPPER)) { @@ -1069,6 +1075,10 @@ public void setReactive(boolean reactive) { this.reactive = reactive; } + public void setSse(boolean sse) { + this.sse = sse; + } + public void setResponseWrapper(String responseWrapper) { this.responseWrapper = responseWrapper; } @@ -1249,6 +1259,50 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation if (DocumentationProvider.SPRINGFOX.equals(getDocumentationProvider())) { codegenOperation.imports.add("ApiIgnore"); } + if (sse) { + var MEDIA_EVENT_STREAM = "text/event-stream"; + // inspecting used streaming media types + /* + expected definition: + content: + text/event-stream: + schema: + type: array + format: event-stream + items: + type: or + $ref: + */ + Map> schemaTypes = operation.getResponses().entrySet().stream() + .map(e -> Pair.of(e.getValue(), fromResponse(e.getKey(), e.getValue()))) + .filter(p -> p.getRight().is2xx) // consider only success + .map(p -> p.getLeft().getContent().get(MEDIA_EVENT_STREAM)) + .map(MediaType::getSchema) + .collect(Collectors.toList()).stream() + .collect(Collectors.groupingBy(Schema::getType)); + if(schemaTypes.containsKey("array")) { + // we have a match with SSE pattern + // double check potential conflicting, multiple specs + if(schemaTypes.keySet().size() > 1) { + throw new RuntimeException("only 1 response media type supported, when SSE is detected"); + } + // double check schema format + List eventTypes = schemaTypes.get("array"); + if( eventTypes.stream().anyMatch(schema -> !"event-stream".equalsIgnoreCase(schema.getFormat()))) { + throw new RuntimeException("schema format 'event-stream' is required, when SSE is detected"); + } + // double check item types + Set itemTypes = eventTypes.stream() + .map(schema -> schema.getItems().getType() != null + ? schema.getItems().getType() + : schema.getItems().get$ref()) + .collect(Collectors.toSet()); + if(itemTypes.size() > 1) { + throw new RuntimeException("only single item type is supported, when SSE is detected"); + } + codegenOperation.vendorExtensions.put("x-sse", true); + } // Not an SSE compliant definition + } } return codegenOperation; } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache index 743e188c8e3c..9c74f70469ec 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache @@ -246,7 +246,8 @@ public interface {{classname}} { {{#vendorExtensions.x-operation-extra-annotation}} {{{.}}} {{/vendorExtensions.x-operation-extra-annotation}} - {{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}{{#useResponseEntity}}ResponseEntity<{{/useResponseEntity}}{{>returnTypes}}{{#useResponseEntity}}>{{/useResponseEntity}}{{#responseWrapper}}>{{/responseWrapper}} {{#delegate-method}}_{{/delegate-method}}{{operationId}}( + {{#vendorExtensions.x-sse}}@ResponseBody{{/vendorExtensions.x-sse}} + {{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{>responseType}} {{#delegate-method}}_{{/delegate-method}}{{operationId}}( {{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}{{#swagger2AnnotationLibrary}}@Parameter(hidden = true){{/swagger2AnnotationLibrary}}{{#springFoxDocumentationProvider}}@ApiIgnore{{/springFoxDocumentationProvider}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, @@ -257,7 +258,7 @@ public interface {{classname}} { } // Override this method - {{#jdk8-default-interface}}default {{/jdk8-default-interface}} {{#responseWrapper}}{{.}}<{{/responseWrapper}}{{#useResponseEntity}}ResponseEntity<{{/useResponseEntity}}{{>returnTypes}}{{#useResponseEntity}}>{{/useResponseEntity}}{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}{{#springFoxDocumentationProvider}}@ApiIgnore{{/springFoxDocumentationProvider}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, {{/hasParams}}{{^hasParams}}{{#reactive}}, {{/reactive}}{{/hasParams}}{{#springFoxDocumentationProvider}}@ApiIgnore{{/springFoxDocumentationProvider}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}} { + {{#jdk8-default-interface}}default {{/jdk8-default-interface}} {{>responseType}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}{{#springFoxDocumentationProvider}}@ApiIgnore{{/springFoxDocumentationProvider}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, {{/hasParams}}{{^hasParams}}{{#reactive}}, {{/reactive}}{{/hasParams}}{{#springFoxDocumentationProvider}}@ApiIgnore{{/springFoxDocumentationProvider}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}} { {{/delegate-method}} {{^isDelegate}} {{>methodBody}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache index 64dec32d8f8b..31e69a208f3a 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/apiDelegate.mustache @@ -66,7 +66,7 @@ public interface {{classname}}Delegate { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - {{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}{{#useResponseEntity}}ResponseEntity<{{/useResponseEntity}}{{>returnTypes}}{{#useResponseEntity}}>{{/useResponseEntity}}{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#isArray}}List<{{/isArray}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}}{{/isFile}} {{paramName}}{{^-last}}, + {{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{>responseType}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#isArray}}List<{{/isArray}}{{#reactive}}Flux{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, {{/hasParams}}{{^hasParams}}{{#reactive}}, {{/reactive}}{{/hasParams}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}}{{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}} { {{>methodBody}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/methodBody.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/methodBody.mustache index 1d3aeb0a6f18..df3c53532a11 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/methodBody.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/methodBody.mustache @@ -31,6 +31,7 @@ return CompletableFuture.supplyAsync(()-> { {{/examples}} {{/reactive}} {{#reactive}} +{{^vendorExtensions.x-sse}} Mono result = Mono.empty(); {{#examples}} {{#-first}} @@ -50,4 +51,9 @@ Mono result = Mono.empty(); exchange.getResponse().setStatusCode({{#returnSuccessCode}}HttpStatus.OK{{/returnSuccessCode}}{{^returnSuccessCode}}HttpStatus.NOT_IMPLEMENTED{{/returnSuccessCode}}); {{/examples}} return result{{#allParams}}{{#isBodyParam}}{{^isArray}}{{#paramName}}.then({{.}}){{/paramName}}{{/isArray}}{{#isArray}}{{#paramName}}.thenMany({{.}}){{/paramName}}{{/isArray}}{{/isBodyParam}}{{/allParams}}.then(Mono.empty()); -{{/reactive}} +{{/vendorExtensions.x-sse}} +{{#vendorExtensions.x-sse}} +exchange.getResponse().setStatusCode({{#returnSuccessCode}}HttpStatus.valueOf({{{statusCode}}}){{/returnSuccessCode}}{{^returnSuccessCode}}HttpStatus.NOT_IMPLEMENTED{{/returnSuccessCode}}); + return Flux.empty(); +{{/vendorExtensions.x-sse}} +{{/reactive}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/responseType.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/responseType.mustache new file mode 100644 index 000000000000..4bea517eed6b --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaSpring/responseType.mustache @@ -0,0 +1 @@ +{{^vendorExtensions.x-sse}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}{{#useResponseEntity}}ResponseEntity<{{/useResponseEntity}}{{>returnTypes}}{{#useResponseEntity}}>{{/useResponseEntity}}{{#responseWrapper}}>{{/responseWrapper}}{{/vendorExtensions.x-sse}}{{#vendorExtensions.x-sse}}{{>returnTypes}}{{/vendorExtensions.x-sse}} \ No newline at end of file diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java index 9a50dedaa494..dd90153176e3 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java @@ -17,15 +17,56 @@ package org.openapitools.codegen.java.spring; -import com.google.common.collect.ImmutableMap; -import io.swagger.parser.OpenAPIParser; -import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.Operation; -import io.swagger.v3.oas.models.info.Info; -import io.swagger.v3.oas.models.media.Schema; -import io.swagger.v3.oas.models.servers.Server; -import io.swagger.v3.parser.core.models.ParseOptions; -import org.openapitools.codegen.*; +import static java.util.stream.Collectors.groupingBy; +import static org.assertj.core.api.Assertions.assertThat; +import static org.openapitools.codegen.TestUtils.assertFileContains; +import static org.openapitools.codegen.TestUtils.assertFileNotContains; +import static org.openapitools.codegen.languages.SpringCodegen.ASYNC; +import static org.openapitools.codegen.languages.SpringCodegen.DELEGATE_PATTERN; +import static org.openapitools.codegen.languages.SpringCodegen.DocumentationProvider; +import static org.openapitools.codegen.languages.SpringCodegen.IMPLICIT_HEADERS; +import static org.openapitools.codegen.languages.SpringCodegen.INTERFACE_ONLY; +import static org.openapitools.codegen.languages.SpringCodegen.OPENAPI_NULLABLE; +import static org.openapitools.codegen.languages.SpringCodegen.REACTIVE; +import static org.openapitools.codegen.languages.SpringCodegen.REQUEST_MAPPING_OPTION; +import static org.openapitools.codegen.languages.SpringCodegen.RESPONSE_WRAPPER; +import static org.openapitools.codegen.languages.SpringCodegen.RETURN_SUCCESS_CODE; +import static org.openapitools.codegen.languages.SpringCodegen.SKIP_DEFAULT_INTERFACE; +import static org.openapitools.codegen.languages.SpringCodegen.SPRING_BOOT; +import static org.openapitools.codegen.languages.SpringCodegen.SPRING_CLOUD_LIBRARY; +import static org.openapitools.codegen.languages.SpringCodegen.SPRING_CONTROLLER; +import static org.openapitools.codegen.languages.SpringCodegen.SSE; +import static org.openapitools.codegen.languages.SpringCodegen.USE_ENUM_CASE_INSENSITIVE; +import static org.openapitools.codegen.languages.SpringCodegen.USE_RESPONSE_ENTITY; +import static org.openapitools.codegen.languages.SpringCodegen.USE_SPRING_BOOT3; +import static org.openapitools.codegen.languages.SpringCodegen.USE_TAGS; +import static org.openapitools.codegen.languages.features.DocumentationProviderFeatures.ANNOTATION_LIBRARY; +import static org.openapitools.codegen.languages.features.DocumentationProviderFeatures.DOCUMENTATION_PROVIDER; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.fail; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.stream.Collectors; + +import org.assertj.core.api.MapAssert; +import org.openapitools.codegen.CliOption; +import org.openapitools.codegen.ClientOptInput; +import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.CodegenParameter; +import org.openapitools.codegen.CodegenProperty; +import org.openapitools.codegen.DefaultGenerator; +import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.config.CodegenConfigurator; import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.java.assertions.JavaFileAssert; @@ -40,26 +81,15 @@ import org.testng.annotations.Ignore; import org.testng.annotations.Test; -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.function.Consumer; -import java.util.function.Function; -import java.util.stream.Collectors; +import com.google.common.collect.ImmutableMap; -import static java.util.stream.Collectors.groupingBy; -import static org.assertj.core.api.Assertions.assertThat; -import static org.openapitools.codegen.TestUtils.assertFileContains; -import static org.openapitools.codegen.TestUtils.assertFileNotContains; -import static org.openapitools.codegen.languages.SpringCodegen.*; -import static org.openapitools.codegen.languages.features.DocumentationProviderFeatures.ANNOTATION_LIBRARY; -import static org.openapitools.codegen.languages.features.DocumentationProviderFeatures.DOCUMENTATION_PROVIDER; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.fail; +import io.swagger.parser.OpenAPIParser; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.Operation; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.servers.Server; +import io.swagger.v3.parser.core.models.ParseOptions; public class SpringCodegenTest { @@ -3084,4 +3114,65 @@ public void multiLineTagDescription() throws IOException { JavaFileAssert.assertThat(files.get("PingTagApi.java")) .fileContains("This is a multine tag : * tag item 1 * tag item 2 "); } + + @Test + public void testSSEOperationSupport() throws Exception { + + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/sse.yaml"); + final SpringCodegen codegen = new SpringCodegen(); + codegen.setOpenAPI(openAPI); + codegen.setOutputDir(output.getAbsolutePath()); + + codegen.additionalProperties().put(SSE, "true"); + codegen.additionalProperties().put(REACTIVE, "true"); + codegen.additionalProperties().put(INTERFACE_ONLY, "false"); + codegen.additionalProperties().put(DELEGATE_PATTERN, "true"); + + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + + Map files = generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + MapAssert.assertThatMap(files).isNotEmpty(); + File api = files.get("PathApi.java"); + File delegate = files.get("PathApiDelegate.java"); + + JavaFileAssert.assertThat(api) + .assertMethod("sseVariant1", "ServerWebExchange") + .isNotNull() + .hasReturnType("Flux") + .toFileAssert() + .assertMethod("sseVariant2", "ServerWebExchange") + .isNotNull() + .hasReturnType("Flux") + .toFileAssert() + .assertMethod("nonSSE", "ServerWebExchange") + .isNotNull() + .hasReturnType("Mono>"); + + JavaFileAssert.assertThat(delegate) + .assertMethod("sseVariant1", "ServerWebExchange") + .isNotNull() + .hasReturnType("Flux") + .bodyContainsLines("return Flux.empty();") + .toFileAssert() + .assertMethod("sseVariant2", "ServerWebExchange") + .isNotNull() + .hasReturnType("Flux") + .bodyContainsLines("return Flux.empty();") + .toFileAssert() + .assertMethod("nonSSE", "ServerWebExchange") + .isNotNull() + .hasReturnType("Mono>") + .bodyContainsLines("return result.then(Mono.empty());") + ; + + } } diff --git a/modules/openapi-generator/src/test/resources/3_0/sse.yaml b/modules/openapi-generator/src/test/resources/3_0/sse.yaml new file mode 100644 index 000000000000..cdc613b2a4ed --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/sse.yaml @@ -0,0 +1,62 @@ +openapi: 3.0.1 +info: + title: SSE test + description: SSE test cases + version: 1.0.0 +servers: + - url: 'https' +tags: + - name: sse +paths: + /path/variant1: + post: + operationId: sseVariant1 + tags: + - sse + responses: + '200': + description: acknowledged + content: + text/event-stream: + schema: + type: array + format: event-stream + items: + type: string + /path/variant2: + post: + operationId: sseVariant2 + tags: + - sse + responses: + '200': + description: acknowledged + content: + text/event-stream: + schema: + type: array + format: event-stream + items: + $ref: '#/components/schemas/EventType' + /path/variant3: + post: + operationId: nonSSE + tags: + - sse + responses: + '200': + description: acknowledged + content: + text/event-stream: + schema: + type: string + format: event-stream +components: + schemas: + EventType: + type: object + properties: + attribute1: + type: string + + diff --git a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java index f76215e98216..f4cfbc41db59 100644 --- a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java +++ b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -50,6 +50,7 @@ public interface DefaultApi { method = RequestMethod.GET, value = "/thingy/{date}" ) + ResponseEntity get( @ApiParam(value = "A date path parameter", required = true, defaultValue = "1972-01-01") @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @NotNull @ApiParam(value = "A date-time query parameter", required = true, defaultValue = "1973-12-19T03:39:57-08:00") @Valid @RequestParam(value = "dateTime", required = true, defaultValue = "1973-12-19T03:39:57-08:00") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @@ -79,6 +80,7 @@ ResponseEntity get( value = "/thingy/{date}", consumes = "application/x-www-form-urlencoded" ) + ResponseEntity updatePetWithForm( @ApiParam(value = "A date path parameter", required = true, defaultValue = "1970-01-01") @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @ApiParam(value = "Updated last visit timestamp", defaultValue = "1971-12-19T03:39:57-08:00") @Valid @RequestParam(value = "visitDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java index f327113b0f40..a203af27250a 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java @@ -59,6 +59,7 @@ public interface PetApi { produces = "application/json", consumes = "application/json" ) + ResponseEntity addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ); @@ -91,6 +92,7 @@ ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + ResponseEntity deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey @@ -127,6 +129,7 @@ ResponseEntity deletePet( value = "/pet/findByStatus", produces = "application/json" ) + ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) @Deprecated List status ); @@ -164,6 +167,7 @@ ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = "application/json" ) + ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags ); @@ -198,6 +202,7 @@ ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = "application/json" ) + ResponseEntity getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ); @@ -240,6 +245,7 @@ ResponseEntity getPetById( produces = "application/json", consumes = "application/json" ) + ResponseEntity updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ); @@ -274,6 +280,7 @@ ResponseEntity updatePet( value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) + ResponseEntity updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -312,6 +319,7 @@ ResponseEntity updatePetWithForm( produces = "application/json", consumes = "multipart/form-data" ) + ResponseEntity uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java index 18f948391d78..d6d0287be553 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java @@ -50,6 +50,7 @@ public interface StoreApi { method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) + ResponseEntity deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId ); @@ -80,6 +81,7 @@ ResponseEntity deleteOrder( value = "/store/inventory", produces = "application/json" ) + ResponseEntity> getInventory( ); @@ -111,6 +113,7 @@ ResponseEntity> getInventory( value = "/store/order/{orderId}", produces = "application/json" ) + ResponseEntity getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId ); @@ -141,6 +144,7 @@ ResponseEntity getOrderById( produces = "application/json", consumes = "application/json" ) + ResponseEntity placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ); diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java index 8c5829baec0e..d153abd27417 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java @@ -52,6 +52,7 @@ public interface UserApi { value = "/user", consumes = "application/json" ) + ResponseEntity createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user ); @@ -81,6 +82,7 @@ ResponseEntity createUser( value = "/user/createWithArray", consumes = "application/json" ) + ResponseEntity createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ); @@ -110,6 +112,7 @@ ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = "application/json" ) + ResponseEntity createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ); @@ -140,6 +143,7 @@ ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + ResponseEntity deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ); @@ -171,6 +175,7 @@ ResponseEntity deleteUser( value = "/user/{username}", produces = "application/json" ) + ResponseEntity getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ); @@ -201,6 +206,7 @@ ResponseEntity getUserByName( value = "/user/login", produces = "application/json" ) + ResponseEntity loginUser( @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password @@ -229,6 +235,7 @@ ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + ResponseEntity logoutUser( ); @@ -261,6 +268,7 @@ ResponseEntity logoutUser( value = "/user/{username}", consumes = "application/json" ) + ResponseEntity updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java index 198c99b84c3c..5c735d80c837 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java @@ -56,6 +56,7 @@ public interface PetController { value = "/pet", consumes = "application/json" ) + ResponseEntity addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body ); @@ -87,6 +88,7 @@ ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + ResponseEntity deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey @@ -124,6 +126,7 @@ ResponseEntity deletePet( value = "/pet/findByStatus", produces = "application/json" ) + ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, @ApiIgnore final Pageable pageable @@ -163,6 +166,7 @@ ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = "application/json" ) + ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @ApiIgnore final Pageable pageable @@ -198,6 +202,7 @@ ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = "application/json" ) + ResponseEntity getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ); @@ -233,6 +238,7 @@ ResponseEntity getPetById( value = "/pet", consumes = "application/json" ) + ResponseEntity updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body ); @@ -266,6 +272,7 @@ ResponseEntity updatePet( value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) + ResponseEntity updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -303,6 +310,7 @@ ResponseEntity updatePetWithForm( produces = "application/json", consumes = "multipart/form-data" ) + ResponseEntity uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java index d092e797a849..36eba0006dd7 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java @@ -50,6 +50,7 @@ public interface StoreController { method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) + ResponseEntity deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId ); @@ -80,6 +81,7 @@ ResponseEntity deleteOrder( value = "/store/inventory", produces = "application/json" ) + ResponseEntity> getInventory( ); @@ -111,6 +113,7 @@ ResponseEntity> getInventory( value = "/store/order/{orderId}", produces = "application/json" ) + ResponseEntity getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId ); @@ -139,6 +142,7 @@ ResponseEntity getOrderById( value = "/store/order", produces = "application/json" ) + ResponseEntity placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body ); diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java index 8ca66fa7cdc7..e11d84cb3727 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java @@ -48,6 +48,7 @@ public interface UserController { method = RequestMethod.POST, value = "/user" ) + ResponseEntity createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body ); @@ -72,6 +73,7 @@ ResponseEntity createUser( method = RequestMethod.POST, value = "/user/createWithArray" ) + ResponseEntity createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body ); @@ -96,6 +98,7 @@ ResponseEntity createUsersWithArrayInput( method = RequestMethod.POST, value = "/user/createWithList" ) + ResponseEntity createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body ); @@ -123,6 +126,7 @@ ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + ResponseEntity deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ); @@ -153,6 +157,7 @@ ResponseEntity deleteUser( value = "/user/{username}", produces = "application/json" ) + ResponseEntity getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ); @@ -182,6 +187,7 @@ ResponseEntity getUserByName( value = "/user/login", produces = "application/json" ) + ResponseEntity loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password @@ -206,6 +212,7 @@ ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + ResponseEntity logoutUser( ); @@ -229,6 +236,7 @@ ResponseEntity logoutUser( method = RequestMethod.OPTIONS, value = "/user/logout" ) + ResponseEntity logoutUserOptions( ); @@ -257,6 +265,7 @@ ResponseEntity logoutUserOptions( method = RequestMethod.PUT, value = "/user/{username}" ) + ResponseEntity updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index f327113b0f40..a203af27250a 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -59,6 +59,7 @@ public interface PetApi { produces = "application/json", consumes = "application/json" ) + ResponseEntity addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ); @@ -91,6 +92,7 @@ ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + ResponseEntity deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey @@ -127,6 +129,7 @@ ResponseEntity deletePet( value = "/pet/findByStatus", produces = "application/json" ) + ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) @Deprecated List status ); @@ -164,6 +167,7 @@ ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = "application/json" ) + ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags ); @@ -198,6 +202,7 @@ ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = "application/json" ) + ResponseEntity getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ); @@ -240,6 +245,7 @@ ResponseEntity getPetById( produces = "application/json", consumes = "application/json" ) + ResponseEntity updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ); @@ -274,6 +280,7 @@ ResponseEntity updatePet( value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) + ResponseEntity updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -312,6 +319,7 @@ ResponseEntity updatePetWithForm( produces = "application/json", consumes = "multipart/form-data" ) + ResponseEntity uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index 18f948391d78..d6d0287be553 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -50,6 +50,7 @@ public interface StoreApi { method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) + ResponseEntity deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId ); @@ -80,6 +81,7 @@ ResponseEntity deleteOrder( value = "/store/inventory", produces = "application/json" ) + ResponseEntity> getInventory( ); @@ -111,6 +113,7 @@ ResponseEntity> getInventory( value = "/store/order/{orderId}", produces = "application/json" ) + ResponseEntity getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId ); @@ -141,6 +144,7 @@ ResponseEntity getOrderById( produces = "application/json", consumes = "application/json" ) + ResponseEntity placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ); diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 8c5829baec0e..d153abd27417 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -52,6 +52,7 @@ public interface UserApi { value = "/user", consumes = "application/json" ) + ResponseEntity createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user ); @@ -81,6 +82,7 @@ ResponseEntity createUser( value = "/user/createWithArray", consumes = "application/json" ) + ResponseEntity createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ); @@ -110,6 +112,7 @@ ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = "application/json" ) + ResponseEntity createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ); @@ -140,6 +143,7 @@ ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + ResponseEntity deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ); @@ -171,6 +175,7 @@ ResponseEntity deleteUser( value = "/user/{username}", produces = "application/json" ) + ResponseEntity getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ); @@ -201,6 +206,7 @@ ResponseEntity getUserByName( value = "/user/login", produces = "application/json" ) + ResponseEntity loginUser( @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password @@ -229,6 +235,7 @@ ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + ResponseEntity logoutUser( ); @@ -261,6 +268,7 @@ ResponseEntity logoutUser( value = "/user/{username}", consumes = "application/json" ) + ResponseEntity updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java index c89af1a1a41a..9a547c6c1123 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java @@ -40,6 +40,7 @@ public interface PetApi { produces = "application/json", consumes = "application/json" ) + ResponseEntity addPet( @Valid @RequestBody Pet pet ); @@ -57,6 +58,7 @@ ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + ResponseEntity deletePet( @PathVariable("petId") Long petId, @RequestHeader(value = "api_key", required = false) Optional apiKey @@ -76,6 +78,7 @@ ResponseEntity deletePet( value = "/pet/findByStatus", produces = "application/json" ) + ResponseEntity> findPetsByStatus( @NotNull @Valid @RequestParam(value = "status", required = true) @Deprecated List status ); @@ -96,6 +99,7 @@ ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = "application/json" ) + ResponseEntity> findPetsByTags( @NotNull @Valid @RequestParam(value = "tags", required = true) List tags ); @@ -115,6 +119,7 @@ ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = "application/json" ) + ResponseEntity getPetById( @PathVariable("petId") Long petId ); @@ -138,6 +143,7 @@ ResponseEntity getPetById( produces = "application/json", consumes = "application/json" ) + ResponseEntity updatePet( @Valid @RequestBody Pet pet ); @@ -157,6 +163,7 @@ ResponseEntity updatePet( value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) + ResponseEntity updatePetWithForm( @PathVariable("petId") Long petId, @Valid @RequestParam(value = "name", required = false) String name, @@ -179,6 +186,7 @@ ResponseEntity updatePetWithForm( produces = "application/json", consumes = "multipart/form-data" ) + ResponseEntity uploadFile( @PathVariable("petId") Long petId, @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java index 3aca0efac53f..27cb2c872e1a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java @@ -38,6 +38,7 @@ public interface StoreApi { method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) + ResponseEntity deleteOrder( @PathVariable("orderId") String orderId ); @@ -54,6 +55,7 @@ ResponseEntity deleteOrder( value = "/store/inventory", produces = "application/json" ) + ResponseEntity> getInventory( ); @@ -73,6 +75,7 @@ ResponseEntity> getInventory( value = "/store/order/{orderId}", produces = "application/json" ) + ResponseEntity getOrderById( @Min(1L) @Max(5L) @PathVariable("orderId") Long orderId ); @@ -92,6 +95,7 @@ ResponseEntity getOrderById( produces = "application/json", consumes = "application/json" ) + ResponseEntity placeOrder( @Valid @RequestBody Order order ); diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java index 521ee1ec6805..45f234ef52d8 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java @@ -38,6 +38,7 @@ public interface UserApi { value = "/user", consumes = "application/json" ) + ResponseEntity createUser( @Valid @RequestBody User user ); @@ -55,6 +56,7 @@ ResponseEntity createUser( value = "/user/createWithArray", consumes = "application/json" ) + ResponseEntity createUsersWithArrayInput( @Valid @RequestBody List user ); @@ -72,6 +74,7 @@ ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = "application/json" ) + ResponseEntity createUsersWithListInput( @Valid @RequestBody List user ); @@ -89,6 +92,7 @@ ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + ResponseEntity deleteUser( @PathVariable("username") String username ); @@ -108,6 +112,7 @@ ResponseEntity deleteUser( value = "/user/{username}", produces = "application/json" ) + ResponseEntity getUserByName( @PathVariable("username") String username ); @@ -127,6 +132,7 @@ ResponseEntity getUserByName( value = "/user/login", produces = "application/json" ) + ResponseEntity loginUser( @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Valid @RequestParam(value = "password", required = true) String password @@ -143,6 +149,7 @@ ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + ResponseEntity logoutUser( ); @@ -162,6 +169,7 @@ ResponseEntity logoutUser( value = "/user/{username}", consumes = "application/json" ) + ResponseEntity updateUser( @PathVariable("username") String username, @Valid @RequestBody User user diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java index b5b39d8e7429..aa4f9cda66e8 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java @@ -68,6 +68,7 @@ public interface PetApi { produces = "application/json", consumes = "application/json" ) + ResponseEntity addPet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ); @@ -97,6 +98,7 @@ ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + ResponseEntity deletePet( @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey @@ -132,6 +134,7 @@ ResponseEntity deletePet( value = "/pet/findByStatus", produces = "application/json" ) + ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status ); @@ -169,6 +172,7 @@ ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = "application/json" ) + ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags ); @@ -205,6 +209,7 @@ ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = "application/json" ) + ResponseEntity getPetById( @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ); @@ -247,6 +252,7 @@ ResponseEntity getPetById( produces = "application/json", consumes = "application/json" ) + ResponseEntity updatePet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ); @@ -278,6 +284,7 @@ ResponseEntity updatePet( value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) + ResponseEntity updatePetWithForm( @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -314,6 +321,7 @@ ResponseEntity updatePetWithForm( produces = "application/json", consumes = "multipart/form-data" ) + ResponseEntity uploadFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java index 375ae369a155..d2a4c03c7da9 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java @@ -60,6 +60,7 @@ public interface StoreApi { method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) + ResponseEntity deleteOrder( @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ); @@ -90,6 +91,7 @@ ResponseEntity deleteOrder( value = "/store/inventory", produces = "application/json" ) + ResponseEntity> getInventory( ); @@ -123,6 +125,7 @@ ResponseEntity> getInventory( value = "/store/order/{orderId}", produces = "application/json" ) + ResponseEntity getOrderById( @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId ); @@ -155,6 +158,7 @@ ResponseEntity getOrderById( produces = "application/json", consumes = "application/json" ) + ResponseEntity placeOrder( @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ); diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java index 6a56fbc20fa6..028b64ff4f3f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java @@ -62,6 +62,7 @@ public interface UserApi { value = "/user", consumes = "application/json" ) + ResponseEntity createUser( @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user ); @@ -91,6 +92,7 @@ ResponseEntity createUser( value = "/user/createWithArray", consumes = "application/json" ) + ResponseEntity createUsersWithArrayInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ); @@ -120,6 +122,7 @@ ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = "application/json" ) + ResponseEntity createUsersWithListInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ); @@ -150,6 +153,7 @@ ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + ResponseEntity deleteUser( @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -183,6 +187,7 @@ ResponseEntity deleteUser( value = "/user/{username}", produces = "application/json" ) + ResponseEntity getUserByName( @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -215,6 +220,7 @@ ResponseEntity getUserByName( value = "/user/login", produces = "application/json" ) + ResponseEntity loginUser( @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password @@ -243,6 +249,7 @@ ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + ResponseEntity logoutUser( ); @@ -275,6 +282,7 @@ ResponseEntity logoutUser( value = "/user/{username}", consumes = "application/json" ) + ResponseEntity updateUser( @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index 1d324f509747..fa52f39ccee0 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -69,6 +69,7 @@ public interface PetApi { produces = "application/json", consumes = "application/json" ) + CompletableFuture> addPet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ); @@ -98,6 +99,7 @@ CompletableFuture> addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + CompletableFuture> deletePet( @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey @@ -133,6 +135,7 @@ CompletableFuture> deletePet( value = "/pet/findByStatus", produces = "application/json" ) + CompletableFuture>> findPetsByStatus( @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status ); @@ -170,6 +173,7 @@ CompletableFuture>> findPetsByStatus( value = "/pet/findByTags", produces = "application/json" ) + CompletableFuture>> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags ); @@ -206,6 +210,7 @@ CompletableFuture>> findPetsByTags( value = "/pet/{petId}", produces = "application/json" ) + CompletableFuture> getPetById( @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ); @@ -248,6 +253,7 @@ CompletableFuture> getPetById( produces = "application/json", consumes = "application/json" ) + CompletableFuture> updatePet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ); @@ -279,6 +285,7 @@ CompletableFuture> updatePet( value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) + CompletableFuture> updatePetWithForm( @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -315,6 +322,7 @@ CompletableFuture> updatePetWithForm( produces = "application/json", consumes = "multipart/form-data" ) + CompletableFuture> uploadFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index ebd61552b0a3..f07582d5ce82 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -61,6 +61,7 @@ public interface StoreApi { method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) + CompletableFuture> deleteOrder( @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ); @@ -91,6 +92,7 @@ CompletableFuture> deleteOrder( value = "/store/inventory", produces = "application/json" ) + CompletableFuture>> getInventory( ); @@ -124,6 +126,7 @@ CompletableFuture>> getInventory( value = "/store/order/{orderId}", produces = "application/json" ) + CompletableFuture> getOrderById( @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId ); @@ -156,6 +159,7 @@ CompletableFuture> getOrderById( produces = "application/json", consumes = "application/json" ) + CompletableFuture> placeOrder( @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ); diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index 96951205a9e8..a669adc9f2ee 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -63,6 +63,7 @@ public interface UserApi { value = "/user", consumes = "application/json" ) + CompletableFuture> createUser( @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user ); @@ -92,6 +93,7 @@ CompletableFuture> createUser( value = "/user/createWithArray", consumes = "application/json" ) + CompletableFuture> createUsersWithArrayInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ); @@ -121,6 +123,7 @@ CompletableFuture> createUsersWithArrayInput( value = "/user/createWithList", consumes = "application/json" ) + CompletableFuture> createUsersWithListInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ); @@ -151,6 +154,7 @@ CompletableFuture> createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + CompletableFuture> deleteUser( @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -184,6 +188,7 @@ CompletableFuture> deleteUser( value = "/user/{username}", produces = "application/json" ) + CompletableFuture> getUserByName( @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -216,6 +221,7 @@ CompletableFuture> getUserByName( value = "/user/login", produces = "application/json" ) + CompletableFuture> loginUser( @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password @@ -244,6 +250,7 @@ CompletableFuture> loginUser( method = RequestMethod.GET, value = "/user/logout" ) + CompletableFuture> logoutUser( ); @@ -276,6 +283,7 @@ CompletableFuture> logoutUser( value = "/user/{username}", consumes = "application/json" ) + CompletableFuture> updateUser( @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java index ddf6b779c6ab..ab1bfe6992fc 100644 --- a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -58,6 +58,7 @@ public interface DefaultApi { method = RequestMethod.GET, value = "/thingy/{date}" ) + ResponseEntity get( @Parameter(name = "date", description = "A date path parameter", required = true, in = ParameterIn.PATH) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @NotNull @Parameter(name = "dateTime", description = "A date-time query parameter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "dateTime", required = true, defaultValue = "1973-12-19T03:39:57-08:00") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime, @@ -86,6 +87,7 @@ ResponseEntity get( value = "/thingy/{date}", consumes = "application/x-www-form-urlencoded" ) + ResponseEntity updatePetWithForm( @Parameter(name = "date", description = "A date path parameter", required = true, in = ParameterIn.PATH) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, @Parameter(name = "visitDate", description = "Updated last visit timestamp") @Valid @RequestParam(value = "visitDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java index 3e20eedc368f..93210401a0f2 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -61,6 +61,7 @@ public interface AnotherFakeApi { produces = "application/json", consumes = "application/json" ) + ResponseEntity call123testSpecialTags( @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client ); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java index bc0b9f113cfb..1bcacb3f62ff 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java @@ -68,6 +68,7 @@ public interface FakeApi { value = "/fake/create_xml_item", consumes = "application/xml" ) + ResponseEntity createXmlItem( @Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem ); @@ -96,6 +97,7 @@ ResponseEntity createXmlItem( produces = "*/*", consumes = "application/json" ) + ResponseEntity fakeOuterBooleanSerialize( @Parameter(name = "body", description = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body ); @@ -124,6 +126,7 @@ ResponseEntity fakeOuterBooleanSerialize( produces = "*/*", consumes = "application/json" ) + ResponseEntity fakeOuterCompositeSerialize( @Parameter(name = "OuterComposite", description = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite ); @@ -152,6 +155,7 @@ ResponseEntity fakeOuterCompositeSerialize( produces = "*/*", consumes = "application/json" ) + ResponseEntity fakeOuterNumberSerialize( @Parameter(name = "body", description = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body ); @@ -180,6 +184,7 @@ ResponseEntity fakeOuterNumberSerialize( produces = "*/*", consumes = "application/json" ) + ResponseEntity fakeOuterStringSerialize( @Parameter(name = "body", description = "Input string as post body") @Valid @RequestBody(required = false) String body ); @@ -205,6 +210,7 @@ ResponseEntity fakeOuterStringSerialize( value = "/fake/body-with-file-schema", consumes = "application/json" ) + ResponseEntity testBodyWithFileSchema( @Parameter(name = "FileSchemaTestClass", description = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass ); @@ -229,6 +235,7 @@ ResponseEntity testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = "application/json" ) + ResponseEntity testBodyWithQueryParams( @NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query, @Parameter(name = "User", description = "", required = true) @Valid @RequestBody User user @@ -259,6 +266,7 @@ ResponseEntity testBodyWithQueryParams( produces = "application/json", consumes = "application/json" ) + ResponseEntity testClientModel( @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client ); @@ -303,6 +311,7 @@ ResponseEntity testClientModel( value = "/fake", consumes = "application/x-www-form-urlencoded" ) + ResponseEntity testEndpointParameters( @Parameter(name = "number", description = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @Parameter(name = "double", description = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -351,6 +360,7 @@ ResponseEntity testEndpointParameters( value = "/fake", consumes = "application/x-www-form-urlencoded" ) + ResponseEntity testEnumParameters( @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @@ -388,6 +398,7 @@ ResponseEntity testEnumParameters( method = RequestMethod.DELETE, value = "/fake" ) + ResponseEntity testGroupParameters( @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, @@ -419,6 +430,7 @@ ResponseEntity testGroupParameters( value = "/fake/inline-additionalProperties", consumes = "application/json" ) + ResponseEntity testInlineAdditionalProperties( @Parameter(name = "request_body", description = "request body", required = true) @Valid @RequestBody Map requestBody ); @@ -446,6 +458,7 @@ ResponseEntity testInlineAdditionalProperties( value = "/fake/jsonFormData", consumes = "application/x-www-form-urlencoded" ) + ResponseEntity testJsonFormData( @Parameter(name = "param", description = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @Parameter(name = "param2", description = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 @@ -500,6 +513,7 @@ ResponseEntity testNullable( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) + ResponseEntity testQueryParameterCollectionFormat( @NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List http, @@ -529,6 +543,7 @@ ResponseEntity testQueryParameterCollectionFormat( value = "/fake/response-with-example", produces = "application/json" ) + ResponseEntity testWithResultExample( ); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index ad3d22e0a50a..f0dbbbc90594 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -64,6 +64,7 @@ public interface FakeClassnameTags123Api { produces = "application/json", consumes = "application/json" ) + ResponseEntity testClassname( @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client ); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java index 308dfc4c2482..13e702ba2676 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java @@ -66,6 +66,7 @@ public interface PetApi { value = "/pet", consumes = "application/json" ) + ResponseEntity addPet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ); @@ -97,6 +98,7 @@ ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + ResponseEntity deletePet( @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey @@ -132,6 +134,7 @@ ResponseEntity deletePet( value = "/pet/findByStatus", produces = "application/json" ) + ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List status ); @@ -169,6 +172,7 @@ ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = "application/json" ) + ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set tags ); @@ -205,6 +209,7 @@ ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = "application/json" ) + ResponseEntity getPetById( @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ); @@ -230,6 +235,7 @@ ResponseEntity getPetById( value = "/fake/{petId}/response-object-different-names", produces = "application/json" ) + ResponseEntity responseObjectDifferentNames( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ); @@ -265,6 +271,7 @@ ResponseEntity responseObjectDifferentNam value = "/pet", consumes = "application/json" ) + ResponseEntity updatePet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ); @@ -296,6 +303,7 @@ ResponseEntity updatePet( value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) + ResponseEntity updatePetWithForm( @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -332,6 +340,7 @@ ResponseEntity updatePetWithForm( produces = "application/json", consumes = "multipart/form-data" ) + ResponseEntity uploadFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, @@ -368,6 +377,7 @@ ResponseEntity uploadFile( produces = "application/json", consumes = "multipart/form-data" ) + ResponseEntity uploadFileWithRequiredFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java index aeb643ced04e..17b7cadd843d 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java @@ -60,6 +60,7 @@ public interface StoreApi { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) + ResponseEntity deleteOrder( @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId ); @@ -90,6 +91,7 @@ ResponseEntity deleteOrder( value = "/store/inventory", produces = "application/json" ) + ResponseEntity> getInventory( ); @@ -123,6 +125,7 @@ ResponseEntity> getInventory( value = "/store/order/{order_id}", produces = "application/json" ) + ResponseEntity getOrderById( @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId ); @@ -155,6 +158,7 @@ ResponseEntity getOrderById( produces = "application/json", consumes = "application/json" ) + ResponseEntity placeOrder( @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ); diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java index 38c64487591e..0f9ae5b4a73b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java @@ -59,6 +59,7 @@ public interface UserApi { value = "/user", consumes = "application/json" ) + ResponseEntity createUser( @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user ); @@ -85,6 +86,7 @@ ResponseEntity createUser( value = "/user/createWithArray", consumes = "application/json" ) + ResponseEntity createUsersWithArrayInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ); @@ -111,6 +113,7 @@ ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = "application/json" ) + ResponseEntity createUsersWithListInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ); @@ -138,6 +141,7 @@ ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + ResponseEntity deleteUser( @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -171,6 +175,7 @@ ResponseEntity deleteUser( value = "/user/{username}", produces = "application/json" ) + ResponseEntity getUserByName( @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -203,6 +208,7 @@ ResponseEntity getUserByName( value = "/user/login", produces = "application/json" ) + ResponseEntity loginUser( @NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password @@ -228,6 +234,7 @@ ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + ResponseEntity logoutUser( ); @@ -257,6 +264,7 @@ ResponseEntity logoutUser( value = "/user/{username}", consumes = "application/json" ) + ResponseEntity updateUser( @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index c5b2990f8569..a0418ffa9c8f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -62,6 +62,7 @@ public interface PetApi { value = "/pet", consumes = "application/json" ) + ResponseEntity addPet( @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body ); @@ -89,6 +90,7 @@ ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + ResponseEntity deletePet( @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey @@ -124,6 +126,7 @@ ResponseEntity deletePet( value = "/pet/findByStatus", produces = "application/json" ) + ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List status, @ParameterObject final Pageable pageable @@ -162,6 +165,7 @@ ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = "application/json" ) + ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags, @ParameterObject final Pageable pageable @@ -199,6 +203,7 @@ ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = "application/json" ) + ResponseEntity getPetById( @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ); @@ -230,6 +235,7 @@ ResponseEntity getPetById( value = "/pet", consumes = "application/json" ) + ResponseEntity updatePet( @Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body ); @@ -259,6 +265,7 @@ ResponseEntity updatePet( value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) + ResponseEntity updatePetWithForm( @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -293,6 +300,7 @@ ResponseEntity updatePetWithForm( produces = "application/json", consumes = "multipart/form-data" ) + ResponseEntity uploadFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index a9d31d78cb6a..68f537ff5f4f 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -60,6 +60,7 @@ public interface StoreApi { method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) + ResponseEntity deleteOrder( @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ); @@ -90,6 +91,7 @@ ResponseEntity deleteOrder( value = "/store/inventory", produces = "application/json" ) + ResponseEntity> getInventory( ); @@ -123,6 +125,7 @@ ResponseEntity> getInventory( value = "/store/order/{orderId}", produces = "application/json" ) + ResponseEntity getOrderById( @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId ); @@ -152,6 +155,7 @@ ResponseEntity getOrderById( value = "/store/order", produces = "application/json" ) + ResponseEntity placeOrder( @Parameter(name = "body", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body ); diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 7b634ef29e64..c57b90951d4e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -58,6 +58,7 @@ public interface UserApi { method = RequestMethod.POST, value = "/user" ) + ResponseEntity createUser( @Parameter(name = "body", description = "Created user object", required = true) @Valid @RequestBody User body ); @@ -81,6 +82,7 @@ ResponseEntity createUser( method = RequestMethod.POST, value = "/user/createWithArray" ) + ResponseEntity createUsersWithArrayInput( @Parameter(name = "body", description = "List of user object", required = true) @Valid @RequestBody List body ); @@ -104,6 +106,7 @@ ResponseEntity createUsersWithArrayInput( method = RequestMethod.POST, value = "/user/createWithList" ) + ResponseEntity createUsersWithListInput( @Parameter(name = "body", description = "List of user object", required = true) @Valid @RequestBody List body ); @@ -131,6 +134,7 @@ ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + ResponseEntity deleteUser( @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -162,6 +166,7 @@ ResponseEntity deleteUser( value = "/user/{username}", produces = "application/json" ) + ResponseEntity getUserByName( @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -192,6 +197,7 @@ ResponseEntity getUserByName( value = "/user/login", produces = "application/json" ) + ResponseEntity loginUser( @NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password @@ -215,6 +221,7 @@ ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + ResponseEntity logoutUser( ); @@ -237,6 +244,7 @@ ResponseEntity logoutUser( method = RequestMethod.OPTIONS, value = "/user/logout" ) + ResponseEntity logoutUserOptions( ); @@ -265,6 +273,7 @@ ResponseEntity logoutUserOptions( method = RequestMethod.PUT, value = "/user/{username}" ) + ResponseEntity updateUser( @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, @Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index f36656735b4f..7aa471d2aebe 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -68,6 +68,7 @@ public interface PetApi { produces = "application/json", consumes = "application/json" ) + ResponseEntity addPet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ); @@ -97,6 +98,7 @@ ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + ResponseEntity deletePet( @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey @@ -132,6 +134,7 @@ ResponseEntity deletePet( value = "/pet/findByStatus", produces = "application/json" ) + ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status ); @@ -169,6 +172,7 @@ ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = "application/json" ) + ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags ); @@ -205,6 +209,7 @@ ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = "application/json" ) + ResponseEntity getPetById( @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ); @@ -247,6 +252,7 @@ ResponseEntity getPetById( produces = "application/json", consumes = "application/json" ) + ResponseEntity updatePet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ); @@ -278,6 +284,7 @@ ResponseEntity updatePet( value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) + ResponseEntity updatePetWithForm( @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -314,6 +321,7 @@ ResponseEntity updatePetWithForm( produces = "application/json", consumes = "multipart/form-data" ) + ResponseEntity uploadFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index 65ce02af1be4..cd1427025e5c 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -60,6 +60,7 @@ public interface StoreApi { method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) + ResponseEntity deleteOrder( @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ); @@ -90,6 +91,7 @@ ResponseEntity deleteOrder( value = "/store/inventory", produces = "application/json" ) + ResponseEntity> getInventory( ); @@ -123,6 +125,7 @@ ResponseEntity> getInventory( value = "/store/order/{orderId}", produces = "application/json" ) + ResponseEntity getOrderById( @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId ); @@ -155,6 +158,7 @@ ResponseEntity getOrderById( produces = "application/json", consumes = "application/json" ) + ResponseEntity placeOrder( @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ); diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index e8d27ffb2ee8..0fc4481492e4 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -62,6 +62,7 @@ public interface UserApi { value = "/user", consumes = "application/json" ) + ResponseEntity createUser( @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user ); @@ -91,6 +92,7 @@ ResponseEntity createUser( value = "/user/createWithArray", consumes = "application/json" ) + ResponseEntity createUsersWithArrayInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ); @@ -120,6 +122,7 @@ ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = "application/json" ) + ResponseEntity createUsersWithListInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ); @@ -150,6 +153,7 @@ ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + ResponseEntity deleteUser( @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -183,6 +187,7 @@ ResponseEntity deleteUser( value = "/user/{username}", produces = "application/json" ) + ResponseEntity getUserByName( @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -215,6 +220,7 @@ ResponseEntity getUserByName( value = "/user/login", produces = "application/json" ) + ResponseEntity loginUser( @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password @@ -243,6 +249,7 @@ ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + ResponseEntity logoutUser( ); @@ -275,6 +282,7 @@ ResponseEntity logoutUser( value = "/user/{username}", consumes = "application/json" ) + ResponseEntity updateUser( @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java index a1349148cc6b..6d723adc63dc 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java @@ -68,6 +68,7 @@ public interface PetApi { produces = "application/json", consumes = "application/json" ) + ResponseEntity addPet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) throws Exception; @@ -97,6 +98,7 @@ ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + ResponseEntity deletePet( @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey @@ -132,6 +134,7 @@ ResponseEntity deletePet( value = "/pet/findByStatus", produces = "application/json" ) + ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status ) throws Exception; @@ -169,6 +172,7 @@ ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = "application/json" ) + ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags ) throws Exception; @@ -205,6 +209,7 @@ ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = "application/json" ) + ResponseEntity getPetById( @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) throws Exception; @@ -247,6 +252,7 @@ ResponseEntity getPetById( produces = "application/json", consumes = "application/json" ) + ResponseEntity updatePet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) throws Exception; @@ -278,6 +284,7 @@ ResponseEntity updatePet( value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) + ResponseEntity updatePetWithForm( @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -314,6 +321,7 @@ ResponseEntity updatePetWithForm( produces = "application/json", consumes = "multipart/form-data" ) + ResponseEntity uploadFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java index 124d64e68974..978b72fd207b 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java @@ -60,6 +60,7 @@ public interface StoreApi { method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) + ResponseEntity deleteOrder( @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ) throws Exception; @@ -90,6 +91,7 @@ ResponseEntity deleteOrder( value = "/store/inventory", produces = "application/json" ) + ResponseEntity> getInventory( ) throws Exception; @@ -123,6 +125,7 @@ ResponseEntity> getInventory( value = "/store/order/{orderId}", produces = "application/json" ) + ResponseEntity getOrderById( @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId ) throws Exception; @@ -155,6 +158,7 @@ ResponseEntity getOrderById( produces = "application/json", consumes = "application/json" ) + ResponseEntity placeOrder( @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ) throws Exception; diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java index d40ccb8d8131..ff9e0ccbf5b5 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java @@ -62,6 +62,7 @@ public interface UserApi { value = "/user", consumes = "application/json" ) + ResponseEntity createUser( @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user ) throws Exception; @@ -91,6 +92,7 @@ ResponseEntity createUser( value = "/user/createWithArray", consumes = "application/json" ) + ResponseEntity createUsersWithArrayInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) throws Exception; @@ -120,6 +122,7 @@ ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = "application/json" ) + ResponseEntity createUsersWithListInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) throws Exception; @@ -150,6 +153,7 @@ ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + ResponseEntity deleteUser( @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) throws Exception; @@ -183,6 +187,7 @@ ResponseEntity deleteUser( value = "/user/{username}", produces = "application/json" ) + ResponseEntity getUserByName( @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) throws Exception; @@ -215,6 +220,7 @@ ResponseEntity getUserByName( value = "/user/login", produces = "application/json" ) + ResponseEntity loginUser( @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password @@ -243,6 +249,7 @@ ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + ResponseEntity logoutUser( ) throws Exception; @@ -275,6 +282,7 @@ ResponseEntity logoutUser( value = "/user/{username}", consumes = "application/json" ) + ResponseEntity updateUser( @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index 588e7fc20a53..134deee1f859 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -72,6 +72,7 @@ default Optional getRequest() { produces = "application/json", consumes = "application/json" ) + default ResponseEntity addPet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -118,6 +119,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey @@ -156,6 +158,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = "application/json" ) + default ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status ) { @@ -210,6 +213,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = "application/json" ) + default ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags ) { @@ -263,6 +267,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = "application/json" ) + default ResponseEntity getPetById( @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { @@ -322,6 +327,7 @@ default ResponseEntity getPetById( produces = "application/json", consumes = "application/json" ) + default ResponseEntity updatePet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -370,6 +376,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) + default ResponseEntity updatePetWithForm( @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -409,6 +416,7 @@ default ResponseEntity updatePetWithForm( produces = "application/json", consumes = "multipart/form-data" ) + default ResponseEntity uploadFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index bfda3ffea835..4ef08632a413 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -64,6 +64,7 @@ default Optional getRequest() { method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) + default ResponseEntity deleteOrder( @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ) { @@ -97,6 +98,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = "application/json" ) + default ResponseEntity> getInventory( ) { @@ -133,6 +135,7 @@ default ResponseEntity> getInventory( value = "/store/order/{orderId}", produces = "application/json" ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId ) { @@ -182,6 +185,7 @@ default ResponseEntity getOrderById( produces = "application/json", consumes = "application/json" ) + default ResponseEntity placeOrder( @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ) { diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index b812e5baacfb..f1547b4b6cc0 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -66,6 +66,7 @@ default Optional getRequest() { value = "/user", consumes = "application/json" ) + default ResponseEntity createUser( @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user ) { @@ -98,6 +99,7 @@ default ResponseEntity createUser( value = "/user/createWithArray", consumes = "application/json" ) + default ResponseEntity createUsersWithArrayInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -130,6 +132,7 @@ default ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = "application/json" ) + default ResponseEntity createUsersWithListInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -163,6 +166,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { @@ -199,6 +203,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = "application/json" ) + default ResponseEntity getUserByName( @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { @@ -248,6 +253,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = "application/json" ) + default ResponseEntity loginUser( @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password @@ -279,6 +285,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -314,6 +321,7 @@ default ResponseEntity logoutUser( value = "/user/{username}", consumes = "application/json" ) + default ResponseEntity updateUser( @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java index ceb3b339f903..f79476d21cc1 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java @@ -64,6 +64,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity createBar( @Parameter(name = "BarCreate", description = "", required = true) @Valid @RequestBody BarCreate barCreate ) { diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java index 2f8dd1881437..d07098a1e930 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java @@ -64,6 +64,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json;charset=utf-8" } ) + default ResponseEntity createFoo( @Parameter(name = "Foo", description = "The Foo to be created") @Valid @RequestBody(required = false) Foo foo ) { @@ -101,6 +102,7 @@ default ResponseEntity createFoo( value = "/foo", produces = { "application/json;charset=utf-8" } ) + default ResponseEntity> getAllFoos( ) { diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java index a349111a2795..133223e5e7cc 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java @@ -72,6 +72,7 @@ default Optional getRequest() { produces = { "application/xml", "application/json" }, consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -118,6 +119,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey @@ -156,6 +158,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status ) { @@ -210,6 +213,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags ) { @@ -263,6 +267,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { @@ -322,6 +327,7 @@ default ResponseEntity getPetById( produces = { "application/xml", "application/json" }, consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -370,6 +376,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -409,6 +416,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java index d8e202aa918f..93afbb176bba 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java @@ -64,6 +64,7 @@ default Optional getRequest() { method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) + default ResponseEntity deleteOrder( @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ) { @@ -97,6 +98,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -133,6 +135,7 @@ default ResponseEntity> getInventory( value = "/store/order/{orderId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId ) { @@ -182,6 +185,7 @@ default ResponseEntity getOrderById( produces = { "application/xml", "application/json" }, consumes = { "application/json" } ) + default ResponseEntity placeOrder( @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ) { diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java index 4d6739489fd6..7ca7bcff5730 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java @@ -66,6 +66,7 @@ default Optional getRequest() { value = "/user", consumes = { "application/json" } ) + default ResponseEntity createUser( @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user ) { @@ -98,6 +99,7 @@ default ResponseEntity createUser( value = "/user/createWithArray", consumes = { "application/json" } ) + default ResponseEntity createUsersWithArrayInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -130,6 +132,7 @@ default ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = { "application/json" } ) + default ResponseEntity createUsersWithListInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -163,6 +166,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { @@ -199,6 +203,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { @@ -248,6 +253,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password @@ -279,6 +285,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -314,6 +321,7 @@ default ResponseEntity logoutUser( value = "/user/{username}", consumes = { "application/json" } ) + default ResponseEntity updateUser( @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java index 5adb83f70e1e..2def7037cfce 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java @@ -72,6 +72,7 @@ default Optional getRequest() { produces = { "application/xml", "application/json" }, consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -118,6 +119,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey @@ -156,6 +158,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status ) { @@ -210,6 +213,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags ) { @@ -263,6 +267,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { @@ -322,6 +327,7 @@ default ResponseEntity getPetById( produces = { "application/xml", "application/json" }, consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -370,6 +376,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -409,6 +416,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java index 84e3acbf213e..6c7f49de370d 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java @@ -64,6 +64,7 @@ default Optional getRequest() { method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) + default ResponseEntity deleteOrder( @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ) { @@ -97,6 +98,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -133,6 +135,7 @@ default ResponseEntity> getInventory( value = "/store/order/{orderId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId ) { @@ -182,6 +185,7 @@ default ResponseEntity getOrderById( produces = { "application/xml", "application/json" }, consumes = { "application/json" } ) + default ResponseEntity placeOrder( @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ) { diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java index 1ca047752e86..a19f2eebd5a0 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java @@ -66,6 +66,7 @@ default Optional getRequest() { value = "/user", consumes = { "application/json" } ) + default ResponseEntity createUser( @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user ) { @@ -98,6 +99,7 @@ default ResponseEntity createUser( value = "/user/createWithArray", consumes = { "application/json" } ) + default ResponseEntity createUsersWithArrayInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -130,6 +132,7 @@ default ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = { "application/json" } ) + default ResponseEntity createUsersWithListInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -163,6 +166,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { @@ -199,6 +203,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { @@ -248,6 +253,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password @@ -279,6 +285,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -314,6 +321,7 @@ default ResponseEntity logoutUser( value = "/user/{username}", consumes = { "application/json" } ) + default ResponseEntity updateUser( @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index b4ee569246e5..7acf3f70c2a0 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -61,6 +61,7 @@ default AnotherFakeApiDelegate getDelegate() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity call123testSpecialTags( @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index f03dbda783d9..0354411cc1fb 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -70,6 +70,7 @@ default FakeApiDelegate getDelegate() { value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) + default ResponseEntity createXmlItem( @Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem ) { @@ -100,6 +101,7 @@ default ResponseEntity createXmlItem( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterBooleanSerialize( @Parameter(name = "body", description = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body ) { @@ -130,6 +132,7 @@ default ResponseEntity fakeOuterBooleanSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterCompositeSerialize( @Parameter(name = "OuterComposite", description = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite ) { @@ -160,6 +163,7 @@ default ResponseEntity fakeOuterCompositeSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterNumberSerialize( @Parameter(name = "body", description = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body ) { @@ -190,6 +194,7 @@ default ResponseEntity fakeOuterNumberSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterStringSerialize( @Parameter(name = "body", description = "Input string as post body") @Valid @RequestBody(required = false) String body ) { @@ -217,6 +222,7 @@ default ResponseEntity fakeOuterStringSerialize( value = "/fake/{petId}/response-object-different-names", produces = { "application/json" } ) + default ResponseEntity responseObjectDifferentNames( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { @@ -244,6 +250,7 @@ default ResponseEntity responseObjectDiff value = "/fake/body-with-file-schema", consumes = { "application/json" } ) + default ResponseEntity testBodyWithFileSchema( @Parameter(name = "FileSchemaTestClass", description = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass ) { @@ -270,6 +277,7 @@ default ResponseEntity testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = { "application/json" } ) + default ResponseEntity testBodyWithQueryParams( @NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query, @Parameter(name = "User", description = "", required = true) @Valid @RequestBody User user @@ -302,6 +310,7 @@ default ResponseEntity testBodyWithQueryParams( produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClientModel( @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client ) { @@ -348,6 +357,7 @@ default ResponseEntity testClientModel( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEndpointParameters( @Parameter(name = "number", description = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @Parameter(name = "double", description = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -398,6 +408,7 @@ default ResponseEntity testEndpointParameters( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEnumParameters( @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @@ -437,6 +448,7 @@ default ResponseEntity testEnumParameters( method = RequestMethod.DELETE, value = "/fake" ) + default ResponseEntity testGroupParameters( @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, @@ -470,6 +482,7 @@ default ResponseEntity testGroupParameters( value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) + default ResponseEntity testInlineAdditionalProperties( @Parameter(name = "request_body", description = "request body", required = true) @Valid @RequestBody Map requestBody ) { @@ -499,6 +512,7 @@ default ResponseEntity testInlineAdditionalProperties( value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testJsonFormData( @Parameter(name = "param", description = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @Parameter(name = "param2", description = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 @@ -557,6 +571,7 @@ default ResponseEntity testNullable( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) + default ResponseEntity testQueryParameterCollectionFormat( @NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List http, @@ -588,6 +603,7 @@ default ResponseEntity testQueryParameterCollectionFormat( value = "/fake/response-with-example", produces = { "application/json" } ) + default ResponseEntity testWithResultExample( ) { @@ -624,6 +640,7 @@ default ResponseEntity testWithResultExample( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFileWithRequiredFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index f676e5b60385..38208d498d7f 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -64,6 +64,7 @@ default FakeClassnameTestApiDelegate getDelegate() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClassname( @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 13660ca6499b..ef8adaf2a5f6 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -65,6 +65,7 @@ default PetApiDelegate getDelegate() { value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -98,6 +99,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey @@ -135,6 +137,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List status ) { @@ -174,6 +177,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set tags ) { @@ -212,6 +216,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { @@ -249,6 +254,7 @@ default ResponseEntity getPetById( value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -282,6 +288,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -320,6 +327,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index 6e49ab342a40..8bb1ab6ad136 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -60,6 +60,7 @@ default StoreApiDelegate getDelegate() { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) + default ResponseEntity deleteOrder( @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId ) { @@ -92,6 +93,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -127,6 +129,7 @@ default ResponseEntity> getInventory( value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId ) { @@ -161,6 +164,7 @@ default ResponseEntity getOrderById( produces = { "application/xml", "application/json" }, consumes = { "application/json" } ) + default ResponseEntity placeOrder( @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ) { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index f5af6f531077..c6de11dca385 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -59,6 +59,7 @@ default UserApiDelegate getDelegate() { value = "/user", consumes = { "application/json" } ) + default ResponseEntity createUser( @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user ) { @@ -87,6 +88,7 @@ default ResponseEntity createUser( value = "/user/createWithArray", consumes = { "application/json" } ) + default ResponseEntity createUsersWithArrayInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -115,6 +117,7 @@ default ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = { "application/json" } ) + default ResponseEntity createUsersWithListInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -144,6 +147,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { @@ -179,6 +183,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { @@ -213,6 +218,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password @@ -240,6 +246,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -271,6 +278,7 @@ default ResponseEntity logoutUser( value = "/user/{username}", consumes = { "application/json" } ) + default ResponseEntity updateUser( @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 8e567d3d689c..2fa946a0eda8 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -65,6 +65,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity call123testSpecialTags( @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 8a141fc1e039..480aa991b776 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -74,6 +74,7 @@ default Optional getRequest() { value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) + default ResponseEntity createXmlItem( @Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem ) { @@ -105,6 +106,7 @@ default ResponseEntity createXmlItem( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterBooleanSerialize( @Parameter(name = "body", description = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body ) { @@ -136,6 +138,7 @@ default ResponseEntity fakeOuterBooleanSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterCompositeSerialize( @Parameter(name = "OuterComposite", description = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite ) { @@ -176,6 +179,7 @@ default ResponseEntity fakeOuterCompositeSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterNumberSerialize( @Parameter(name = "body", description = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body ) { @@ -207,6 +211,7 @@ default ResponseEntity fakeOuterNumberSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterStringSerialize( @Parameter(name = "body", description = "Input string as post body") @Valid @RequestBody(required = false) String body ) { @@ -235,6 +240,7 @@ default ResponseEntity fakeOuterStringSerialize( value = "/fake/{petId}/response-object-different-names", produces = { "application/json" } ) + default ResponseEntity responseObjectDifferentNames( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { @@ -272,6 +278,7 @@ default ResponseEntity responseObjectDiff value = "/fake/body-with-file-schema", consumes = { "application/json" } ) + default ResponseEntity testBodyWithFileSchema( @Parameter(name = "FileSchemaTestClass", description = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass ) { @@ -299,6 +306,7 @@ default ResponseEntity testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = { "application/json" } ) + default ResponseEntity testBodyWithQueryParams( @NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query, @Parameter(name = "User", description = "", required = true) @Valid @RequestBody User user @@ -332,6 +340,7 @@ default ResponseEntity testBodyWithQueryParams( produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClientModel( @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client ) { @@ -388,6 +397,7 @@ default ResponseEntity testClientModel( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEndpointParameters( @Parameter(name = "number", description = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @Parameter(name = "double", description = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -441,6 +451,7 @@ default ResponseEntity testEndpointParameters( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEnumParameters( @Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, @@ -481,6 +492,7 @@ default ResponseEntity testEnumParameters( method = RequestMethod.DELETE, value = "/fake" ) + default ResponseEntity testGroupParameters( @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, @@ -513,6 +525,7 @@ default ResponseEntity testGroupParameters( value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) + default ResponseEntity testInlineAdditionalProperties( @Parameter(name = "request_body", description = "request body", required = true) @Valid @RequestBody Map requestBody ) { @@ -543,6 +556,7 @@ default ResponseEntity testInlineAdditionalProperties( value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testJsonFormData( @Parameter(name = "param", description = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @Parameter(name = "param2", description = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 @@ -603,6 +617,7 @@ default ResponseEntity testNullable( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) + default ResponseEntity testQueryParameterCollectionFormat( @NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List http, @@ -635,6 +650,7 @@ default ResponseEntity testQueryParameterCollectionFormat( value = "/fake/response-with-example", produces = { "application/json" } ) + default ResponseEntity testWithResultExample( ) { @@ -681,6 +697,7 @@ default ResponseEntity testWithResultExample( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFileWithRequiredFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 0e14ec47dcaf..3611e8efe2fe 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -68,6 +68,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClassname( @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 314f1ee6d21e..2ada20b139d0 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -69,6 +69,7 @@ default Optional getRequest() { value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -105,6 +106,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { @@ -142,6 +144,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List status ) { @@ -196,6 +199,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set tags ) { @@ -249,6 +253,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { @@ -301,6 +306,7 @@ default ResponseEntity getPetById( value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -335,6 +341,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -374,6 +381,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index c3ec78711cef..8872ce90d1ca 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -64,6 +64,7 @@ default Optional getRequest() { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) + default ResponseEntity deleteOrder( @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId ) { @@ -97,6 +98,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -133,6 +135,7 @@ default ResponseEntity> getInventory( value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId ) { @@ -182,6 +185,7 @@ default ResponseEntity getOrderById( produces = { "application/xml", "application/json" }, consumes = { "application/json" } ) + default ResponseEntity placeOrder( @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index 393645089012..0c90bce5451c 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -63,6 +63,7 @@ default Optional getRequest() { value = "/user", consumes = { "application/json" } ) + default ResponseEntity createUser( @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user ) { @@ -92,6 +93,7 @@ default ResponseEntity createUser( value = "/user/createWithArray", consumes = { "application/json" } ) + default ResponseEntity createUsersWithArrayInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -121,6 +123,7 @@ default ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = { "application/json" } ) + default ResponseEntity createUsersWithListInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -151,6 +154,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { @@ -187,6 +191,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { @@ -236,6 +241,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password @@ -264,6 +270,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -296,6 +303,7 @@ default ResponseEntity logoutUser( value = "/user/{username}", consumes = { "application/json" } ) + default ResponseEntity updateUser( @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java index dc1782b890d1..1884e7c96d61 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java @@ -44,6 +44,7 @@ default Optional getRequest() { produces = { "application/xml", "application/json" }, consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @Valid @RequestBody Pet pet ) { @@ -78,6 +79,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @PathVariable("petId") Long petId, @RequestHeader(value = "api_key", required = false) String apiKey @@ -100,6 +102,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @Valid @RequestParam(value = "status", required = true) @Deprecated List status ) { @@ -137,6 +140,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @Valid @RequestParam(value = "tags", required = true) List tags ) { @@ -173,6 +177,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @PathVariable("petId") Long petId ) { @@ -213,6 +218,7 @@ default ResponseEntity getPetById( produces = { "application/xml", "application/json" }, consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @Valid @RequestBody Pet pet ) { @@ -249,6 +255,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @PathVariable("petId") Long petId, @Valid @RequestParam(value = "name", required = false) String name, @@ -274,6 +281,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @PathVariable("petId") Long petId, @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java index 5c7d2045127c..312c65eb077c 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java @@ -42,6 +42,7 @@ default Optional getRequest() { method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) + default ResponseEntity deleteOrder( @PathVariable("orderId") String orderId ) { @@ -61,6 +62,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -83,6 +85,7 @@ default ResponseEntity> getInventory( value = "/store/order/{orderId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @PathVariable("orderId") Long orderId ) { @@ -119,6 +122,7 @@ default ResponseEntity getOrderById( produces = { "application/xml", "application/json" }, consumes = { "application/json" } ) + default ResponseEntity placeOrder( @Valid @RequestBody Order order ) { diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java index 332118a3a8f9..7b99a0122ea0 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/UserApi.java @@ -42,6 +42,7 @@ default Optional getRequest() { value = "/user", consumes = { "application/json" } ) + default ResponseEntity createUser( @Valid @RequestBody User user ) { @@ -62,6 +63,7 @@ default ResponseEntity createUser( value = "/user/createWithArray", consumes = { "application/json" } ) + default ResponseEntity createUsersWithArrayInput( @Valid @RequestBody List user ) { @@ -82,6 +84,7 @@ default ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = { "application/json" } ) + default ResponseEntity createUsersWithListInput( @Valid @RequestBody List user ) { @@ -102,6 +105,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @PathVariable("username") String username ) { @@ -124,6 +128,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @PathVariable("username") String username ) { @@ -160,6 +165,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Valid @RequestParam(value = "password", required = true) String password @@ -179,6 +185,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -201,6 +208,7 @@ default ResponseEntity logoutUser( value = "/user/{username}", consumes = { "application/json" } ) + default ResponseEntity updateUser( @PathVariable("username") String username, @Valid @RequestBody User user diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 2ce96c4819c3..da720da885fa 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -73,6 +73,7 @@ default Optional getRequest() { produces = { "application/xml", "application/json" }, consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -119,6 +120,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey @@ -157,6 +159,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status ) { @@ -211,6 +214,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags ) { @@ -264,6 +268,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { @@ -323,6 +328,7 @@ default ResponseEntity getPetById( produces = { "application/xml", "application/json" }, consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -371,6 +377,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -410,6 +417,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index e6baf04361b7..219dfe0e9414 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -65,6 +65,7 @@ default Optional getRequest() { method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) + default ResponseEntity deleteOrder( @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ) { @@ -98,6 +99,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -134,6 +136,7 @@ default ResponseEntity> getInventory( value = "/store/order/{orderId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId ) { @@ -183,6 +186,7 @@ default ResponseEntity getOrderById( produces = { "application/xml", "application/json" }, consumes = { "application/json" } ) + default ResponseEntity placeOrder( @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ) { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 10870729eb33..143037d3d6ff 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -67,6 +67,7 @@ default Optional getRequest() { value = "/user", consumes = { "application/json" } ) + default ResponseEntity createUser( @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user ) { @@ -99,6 +100,7 @@ default ResponseEntity createUser( value = "/user/createWithArray", consumes = { "application/json" } ) + default ResponseEntity createUsersWithArrayInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -131,6 +133,7 @@ default ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = { "application/json" } ) + default ResponseEntity createUsersWithListInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -164,6 +167,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { @@ -200,6 +204,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { @@ -249,6 +254,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password @@ -280,6 +286,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -315,6 +322,7 @@ default ResponseEntity logoutUser( value = "/user/{username}", consumes = { "application/json" } ) + default ResponseEntity updateUser( @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java index e0e9847a99dd..c39f0b2dd1b1 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -61,6 +61,7 @@ public interface AnotherFakeApi { produces = { "application/json" }, consumes = { "application/json" } ) + ResponseEntity call123testSpecialTags( @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client ) throws Exception; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java index 517bd237005e..2d8c42243704 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java @@ -70,6 +70,7 @@ public interface FakeApi { value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) + ResponseEntity createXmlItem( @Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem ) throws Exception; @@ -98,6 +99,7 @@ ResponseEntity createXmlItem( produces = { "*/*" }, consumes = { "application/json" } ) + ResponseEntity fakeOuterBooleanSerialize( @Parameter(name = "body", description = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body ) throws Exception; @@ -126,6 +128,7 @@ ResponseEntity fakeOuterBooleanSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + ResponseEntity fakeOuterCompositeSerialize( @Parameter(name = "OuterComposite", description = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite ) throws Exception; @@ -154,6 +157,7 @@ ResponseEntity fakeOuterCompositeSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + ResponseEntity fakeOuterNumberSerialize( @Parameter(name = "body", description = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body ) throws Exception; @@ -182,6 +186,7 @@ ResponseEntity fakeOuterNumberSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + ResponseEntity fakeOuterStringSerialize( @Parameter(name = "body", description = "Input string as post body") @Valid @RequestBody(required = false) String body ) throws Exception; @@ -207,6 +212,7 @@ ResponseEntity fakeOuterStringSerialize( value = "/fake/{petId}/response-object-different-names", produces = { "application/json" } ) + ResponseEntity responseObjectDifferentNames( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) throws Exception; @@ -232,6 +238,7 @@ ResponseEntity responseObjectDifferentNam value = "/fake/body-with-file-schema", consumes = { "application/json" } ) + ResponseEntity testBodyWithFileSchema( @Parameter(name = "FileSchemaTestClass", description = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass ) throws Exception; @@ -256,6 +263,7 @@ ResponseEntity testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = { "application/json" } ) + ResponseEntity testBodyWithQueryParams( @NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query, @Parameter(name = "User", description = "", required = true) @Valid @RequestBody User user @@ -286,6 +294,7 @@ ResponseEntity testBodyWithQueryParams( produces = { "application/json" }, consumes = { "application/json" } ) + ResponseEntity testClientModel( @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client ) throws Exception; @@ -330,6 +339,7 @@ ResponseEntity testClientModel( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + ResponseEntity testEndpointParameters( @Parameter(name = "number", description = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @Parameter(name = "double", description = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -378,6 +388,7 @@ ResponseEntity testEndpointParameters( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + ResponseEntity testEnumParameters( @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @@ -415,6 +426,7 @@ ResponseEntity testEnumParameters( method = RequestMethod.DELETE, value = "/fake" ) + ResponseEntity testGroupParameters( @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, @@ -446,6 +458,7 @@ ResponseEntity testGroupParameters( value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) + ResponseEntity testInlineAdditionalProperties( @Parameter(name = "request_body", description = "request body", required = true) @Valid @RequestBody Map requestBody ) throws Exception; @@ -473,6 +486,7 @@ ResponseEntity testInlineAdditionalProperties( value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) + ResponseEntity testJsonFormData( @Parameter(name = "param", description = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @Parameter(name = "param2", description = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 @@ -527,6 +541,7 @@ ResponseEntity testNullable( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) + ResponseEntity testQueryParameterCollectionFormat( @NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List http, @@ -556,6 +571,7 @@ ResponseEntity testQueryParameterCollectionFormat( value = "/fake/response-with-example", produces = { "application/json" } ) + ResponseEntity testWithResultExample( ) throws Exception; @@ -590,6 +606,7 @@ ResponseEntity testWithResultExample( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + ResponseEntity uploadFileWithRequiredFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 5e679d5b62e2..a487f8f3a234 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -64,6 +64,7 @@ public interface FakeClassnameTestApi { produces = { "application/json" }, consumes = { "application/json" } ) + ResponseEntity testClassname( @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client ) throws Exception; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java index ce2393d89892..301398fd36da 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java @@ -65,6 +65,7 @@ public interface PetApi { value = "/pet", consumes = { "application/json", "application/xml" } ) + ResponseEntity addPet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) throws Exception; @@ -96,6 +97,7 @@ ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + ResponseEntity deletePet( @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey @@ -131,6 +133,7 @@ ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List status ) throws Exception; @@ -168,6 +171,7 @@ ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set tags ) throws Exception; @@ -204,6 +208,7 @@ ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + ResponseEntity getPetById( @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) throws Exception; @@ -239,6 +244,7 @@ ResponseEntity getPetById( value = "/pet", consumes = { "application/json", "application/xml" } ) + ResponseEntity updatePet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) throws Exception; @@ -270,6 +276,7 @@ ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + ResponseEntity updatePetWithForm( @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -306,6 +313,7 @@ ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + ResponseEntity uploadFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java index 47586e465675..76d5b25fc96b 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java @@ -60,6 +60,7 @@ public interface StoreApi { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) + ResponseEntity deleteOrder( @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId ) throws Exception; @@ -90,6 +91,7 @@ ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + ResponseEntity> getInventory( ) throws Exception; @@ -123,6 +125,7 @@ ResponseEntity> getInventory( value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) + ResponseEntity getOrderById( @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId ) throws Exception; @@ -155,6 +158,7 @@ ResponseEntity getOrderById( produces = { "application/xml", "application/json" }, consumes = { "application/json" } ) + ResponseEntity placeOrder( @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ) throws Exception; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java index 2661be7d6f93..1cdf275e81f1 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java @@ -59,6 +59,7 @@ public interface UserApi { value = "/user", consumes = { "application/json" } ) + ResponseEntity createUser( @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user ) throws Exception; @@ -85,6 +86,7 @@ ResponseEntity createUser( value = "/user/createWithArray", consumes = { "application/json" } ) + ResponseEntity createUsersWithArrayInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) throws Exception; @@ -111,6 +113,7 @@ ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = { "application/json" } ) + ResponseEntity createUsersWithListInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) throws Exception; @@ -138,6 +141,7 @@ ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + ResponseEntity deleteUser( @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) throws Exception; @@ -171,6 +175,7 @@ ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + ResponseEntity getUserByName( @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) throws Exception; @@ -203,6 +208,7 @@ ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + ResponseEntity loginUser( @NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password @@ -228,6 +234,7 @@ ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + ResponseEntity logoutUser( ) throws Exception; @@ -257,6 +264,7 @@ ResponseEntity logoutUser( value = "/user/{username}", consumes = { "application/json" } ) + ResponseEntity updateUser( @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java index f95486ad7c51..44bc2d6253be 100644 --- a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java +++ b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java @@ -62,6 +62,7 @@ default Optional getRequest() { value = "/nullable", consumes = "application/json" ) + default ResponseEntity nullableTest( @Parameter(name = "ObjectWithUniqueItems", description = "") @Valid @RequestBody(required = false) ObjectWithUniqueItems objectWithUniqueItems ) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index d60c9b32c6ae..46b30fbcd28b 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -54,6 +54,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity call123testSpecialTags( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 3dcedd31f23b..2585fd567706 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -64,6 +64,7 @@ default Optional getRequest() { value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) + default ResponseEntity createXmlItem( @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem ) { @@ -95,6 +96,7 @@ default ResponseEntity createXmlItem( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterBooleanSerialize( @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body ) { @@ -126,6 +128,7 @@ default ResponseEntity fakeOuterBooleanSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterCompositeSerialize( @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite ) { @@ -166,6 +169,7 @@ default ResponseEntity fakeOuterCompositeSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterNumberSerialize( @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body ) { @@ -197,6 +201,7 @@ default ResponseEntity fakeOuterNumberSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterStringSerialize( @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body ) { @@ -226,6 +231,7 @@ default ResponseEntity fakeOuterStringSerialize( value = "/fake/{petId}/response-object-different-names", produces = { "application/json" } ) + default ResponseEntity responseObjectDifferentNames( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { @@ -264,6 +270,7 @@ default ResponseEntity responseObjectDiff value = "/fake/body-with-file-schema", consumes = { "application/json" } ) + default ResponseEntity testBodyWithFileSchema( @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass ) { @@ -293,6 +300,7 @@ default ResponseEntity testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = { "application/json" } ) + default ResponseEntity testBodyWithQueryParams( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, @ApiParam(value = "", required = true) @Valid @RequestBody User user @@ -325,6 +333,7 @@ default ResponseEntity testBodyWithQueryParams( produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClientModel( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { @@ -381,6 +390,7 @@ default ResponseEntity testClientModel( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEndpointParameters( @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -432,6 +442,7 @@ default ResponseEntity testEndpointParameters( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @@ -472,6 +483,7 @@ default ResponseEntity testEnumParameters( method = RequestMethod.DELETE, value = "/fake" ) + default ResponseEntity testGroupParameters( @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, @@ -506,6 +518,7 @@ default ResponseEntity testGroupParameters( value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) + default ResponseEntity testInlineAdditionalProperties( @ApiParam(value = "request body", required = true) @Valid @RequestBody Map requestBody ) { @@ -536,6 +549,7 @@ default ResponseEntity testInlineAdditionalProperties( value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testJsonFormData( @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 @@ -597,6 +611,7 @@ default ResponseEntity testNullable( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) + default ResponseEntity testQueryParameterCollectionFormat( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, @@ -629,6 +644,7 @@ default ResponseEntity testQueryParameterCollectionFormat( value = "/fake/response-with-example", produces = { "application/json" } ) + default ResponseEntity testWithResultExample( ) { @@ -677,6 +693,7 @@ default ResponseEntity testWithResultExample( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFileWithRequiredFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index d4656f9aa953..248b6e0608b0 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -57,6 +57,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClassname( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index b2cf0f93b86f..201f97dab98c 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -62,6 +62,7 @@ default Optional getRequest() { value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -99,6 +100,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey @@ -139,6 +141,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status ) { @@ -194,6 +197,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { @@ -245,6 +249,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { @@ -300,6 +305,7 @@ default ResponseEntity getPetById( value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -337,6 +343,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -378,6 +385,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 3aaeb001372b..fc2985582875 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -54,6 +54,7 @@ default Optional getRequest() { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) + default ResponseEntity deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { @@ -87,6 +88,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -121,6 +123,7 @@ default ResponseEntity> getInventory( value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { @@ -168,6 +171,7 @@ default ResponseEntity getOrderById( produces = { "application/xml", "application/json" }, consumes = { "application/json" } ) + default ResponseEntity placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ) { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index f1e788a25ee0..9dc1ddab1657 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -53,6 +53,7 @@ default Optional getRequest() { value = "/user", consumes = { "application/json" } ) + default ResponseEntity createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user ) { @@ -82,6 +83,7 @@ default ResponseEntity createUser( value = "/user/createWithArray", consumes = { "application/json" } ) + default ResponseEntity createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -111,6 +113,7 @@ default ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = { "application/json" } ) + default ResponseEntity createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -141,6 +144,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { @@ -175,6 +179,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { @@ -222,6 +227,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password @@ -250,6 +256,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -282,6 +289,7 @@ default ResponseEntity logoutUser( value = "/user/{username}", consumes = { "application/json" } ) + default ResponseEntity updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java index d60c9b32c6ae..46b30fbcd28b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -54,6 +54,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity call123testSpecialTags( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 3dcedd31f23b..2585fd567706 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -64,6 +64,7 @@ default Optional getRequest() { value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) + default ResponseEntity createXmlItem( @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem ) { @@ -95,6 +96,7 @@ default ResponseEntity createXmlItem( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterBooleanSerialize( @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body ) { @@ -126,6 +128,7 @@ default ResponseEntity fakeOuterBooleanSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterCompositeSerialize( @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite ) { @@ -166,6 +169,7 @@ default ResponseEntity fakeOuterCompositeSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterNumberSerialize( @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body ) { @@ -197,6 +201,7 @@ default ResponseEntity fakeOuterNumberSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterStringSerialize( @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body ) { @@ -226,6 +231,7 @@ default ResponseEntity fakeOuterStringSerialize( value = "/fake/{petId}/response-object-different-names", produces = { "application/json" } ) + default ResponseEntity responseObjectDifferentNames( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { @@ -264,6 +270,7 @@ default ResponseEntity responseObjectDiff value = "/fake/body-with-file-schema", consumes = { "application/json" } ) + default ResponseEntity testBodyWithFileSchema( @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass ) { @@ -293,6 +300,7 @@ default ResponseEntity testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = { "application/json" } ) + default ResponseEntity testBodyWithQueryParams( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, @ApiParam(value = "", required = true) @Valid @RequestBody User user @@ -325,6 +333,7 @@ default ResponseEntity testBodyWithQueryParams( produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClientModel( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { @@ -381,6 +390,7 @@ default ResponseEntity testClientModel( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEndpointParameters( @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -432,6 +442,7 @@ default ResponseEntity testEndpointParameters( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @@ -472,6 +483,7 @@ default ResponseEntity testEnumParameters( method = RequestMethod.DELETE, value = "/fake" ) + default ResponseEntity testGroupParameters( @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, @@ -506,6 +518,7 @@ default ResponseEntity testGroupParameters( value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) + default ResponseEntity testInlineAdditionalProperties( @ApiParam(value = "request body", required = true) @Valid @RequestBody Map requestBody ) { @@ -536,6 +549,7 @@ default ResponseEntity testInlineAdditionalProperties( value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testJsonFormData( @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 @@ -597,6 +611,7 @@ default ResponseEntity testNullable( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) + default ResponseEntity testQueryParameterCollectionFormat( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, @@ -629,6 +644,7 @@ default ResponseEntity testQueryParameterCollectionFormat( value = "/fake/response-with-example", produces = { "application/json" } ) + default ResponseEntity testWithResultExample( ) { @@ -677,6 +693,7 @@ default ResponseEntity testWithResultExample( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFileWithRequiredFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index d4656f9aa953..248b6e0608b0 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -57,6 +57,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClassname( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java index b2cf0f93b86f..201f97dab98c 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java @@ -62,6 +62,7 @@ default Optional getRequest() { value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -99,6 +100,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey @@ -139,6 +141,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status ) { @@ -194,6 +197,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { @@ -245,6 +249,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { @@ -300,6 +305,7 @@ default ResponseEntity getPetById( value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -337,6 +343,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -378,6 +385,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java index 3aaeb001372b..fc2985582875 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java @@ -54,6 +54,7 @@ default Optional getRequest() { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) + default ResponseEntity deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { @@ -87,6 +88,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -121,6 +123,7 @@ default ResponseEntity> getInventory( value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { @@ -168,6 +171,7 @@ default ResponseEntity getOrderById( produces = { "application/xml", "application/json" }, consumes = { "application/json" } ) + default ResponseEntity placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java index f1e788a25ee0..9dc1ddab1657 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java @@ -53,6 +53,7 @@ default Optional getRequest() { value = "/user", consumes = { "application/json" } ) + default ResponseEntity createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user ) { @@ -82,6 +83,7 @@ default ResponseEntity createUser( value = "/user/createWithArray", consumes = { "application/json" } ) + default ResponseEntity createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -111,6 +113,7 @@ default ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = { "application/json" } ) + default ResponseEntity createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -141,6 +144,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { @@ -175,6 +179,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { @@ -222,6 +227,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password @@ -250,6 +256,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -282,6 +289,7 @@ default ResponseEntity logoutUser( value = "/user/{username}", consumes = { "application/json" } ) + default ResponseEntity updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index b2a45de6de4f..d75eb06d4bb1 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -50,6 +50,7 @@ default AnotherFakeApiDelegate getDelegate() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity call123testSpecialTags( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index 02fe35584510..59befce8d626 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -60,6 +60,7 @@ default FakeApiDelegate getDelegate() { value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) + default ResponseEntity createXmlItem( @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem ) { @@ -90,6 +91,7 @@ default ResponseEntity createXmlItem( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterBooleanSerialize( @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body ) { @@ -120,6 +122,7 @@ default ResponseEntity fakeOuterBooleanSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterCompositeSerialize( @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite ) { @@ -150,6 +153,7 @@ default ResponseEntity fakeOuterCompositeSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterNumberSerialize( @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body ) { @@ -180,6 +184,7 @@ default ResponseEntity fakeOuterNumberSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterStringSerialize( @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body ) { @@ -208,6 +213,7 @@ default ResponseEntity fakeOuterStringSerialize( value = "/fake/{petId}/response-object-different-names", produces = { "application/json" } ) + default ResponseEntity responseObjectDifferentNames( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { @@ -236,6 +242,7 @@ default ResponseEntity responseObjectDiff value = "/fake/body-with-file-schema", consumes = { "application/json" } ) + default ResponseEntity testBodyWithFileSchema( @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass ) { @@ -264,6 +271,7 @@ default ResponseEntity testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = { "application/json" } ) + default ResponseEntity testBodyWithQueryParams( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, @ApiParam(value = "", required = true) @Valid @RequestBody User user @@ -295,6 +303,7 @@ default ResponseEntity testBodyWithQueryParams( produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClientModel( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { @@ -341,6 +350,7 @@ default ResponseEntity testClientModel( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEndpointParameters( @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -391,6 +401,7 @@ default ResponseEntity testEndpointParameters( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @@ -430,6 +441,7 @@ default ResponseEntity testEnumParameters( method = RequestMethod.DELETE, value = "/fake" ) + default ResponseEntity testGroupParameters( @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, @@ -463,6 +475,7 @@ default ResponseEntity testGroupParameters( value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) + default ResponseEntity testInlineAdditionalProperties( @ApiParam(value = "request body", required = true) @Valid @RequestBody Map requestBody ) { @@ -492,6 +505,7 @@ default ResponseEntity testInlineAdditionalProperties( value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testJsonFormData( @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 @@ -551,6 +565,7 @@ default ResponseEntity testNullable( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) + default ResponseEntity testQueryParameterCollectionFormat( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, @@ -582,6 +597,7 @@ default ResponseEntity testQueryParameterCollectionFormat( value = "/fake/response-with-example", produces = { "application/json" } ) + default ResponseEntity testWithResultExample( ) { @@ -620,6 +636,7 @@ default ResponseEntity testWithResultExample( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFileWithRequiredFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 83458c428f40..b7189e45a0a9 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -53,6 +53,7 @@ default FakeClassnameTestApiDelegate getDelegate() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClassname( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java index 7e2e5e2a05f5..196d586ed8b5 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java @@ -58,6 +58,7 @@ default PetApiDelegate getDelegate() { value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -94,6 +95,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey @@ -133,6 +135,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status ) { @@ -173,6 +176,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { @@ -209,6 +213,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { @@ -249,6 +254,7 @@ default ResponseEntity getPetById( value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -285,6 +291,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -325,6 +332,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java index 9900a5292ab7..82a4a7921d11 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -50,6 +50,7 @@ default StoreApiDelegate getDelegate() { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) + default ResponseEntity deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { @@ -82,6 +83,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -115,6 +117,7 @@ default ResponseEntity> getInventory( value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { @@ -147,6 +150,7 @@ default ResponseEntity getOrderById( produces = { "application/xml", "application/json" }, consumes = { "application/json" } ) + default ResponseEntity placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java index a1ad61656ecc..3348d016fb1d 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java @@ -49,6 +49,7 @@ default UserApiDelegate getDelegate() { value = "/user", consumes = { "application/json" } ) + default ResponseEntity createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user ) { @@ -77,6 +78,7 @@ default ResponseEntity createUser( value = "/user/createWithArray", consumes = { "application/json" } ) + default ResponseEntity createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -105,6 +107,7 @@ default ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = { "application/json" } ) + default ResponseEntity createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -134,6 +137,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { @@ -167,6 +171,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { @@ -199,6 +204,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password @@ -226,6 +232,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -257,6 +264,7 @@ default ResponseEntity logoutUser( value = "/user/{username}", consumes = { "application/json" } ) + default ResponseEntity updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApi.java index 9d6bf69ac902..2ce6cb412a2c 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/PetApi.java @@ -60,6 +60,7 @@ default PetApiDelegate getDelegate() { consumes = { "application/json", "application/xml" } ) @ResponseStatus(HttpStatus.OK) + default Pet addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -95,6 +96,7 @@ default Pet addPet( value = "/pet/{petId}" ) @ResponseStatus(HttpStatus.BAD_REQUEST) + default void deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey @@ -134,6 +136,7 @@ default void deletePet( produces = { "application/xml", "application/json" } ) @ResponseStatus(HttpStatus.OK) + default List findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) @Deprecated List status ) { @@ -174,6 +177,7 @@ default List findPetsByStatus( produces = { "application/xml", "application/json" } ) @ResponseStatus(HttpStatus.OK) + default List findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags ) { @@ -211,6 +215,7 @@ default List findPetsByTags( produces = { "application/xml", "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Pet getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { @@ -256,6 +261,7 @@ default Pet getPetById( consumes = { "application/json", "application/xml" } ) @ResponseStatus(HttpStatus.OK) + default Pet updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -293,6 +299,7 @@ default Pet updatePet( consumes = { "application/x-www-form-urlencoded" } ) @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) + default void updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -334,6 +341,7 @@ default void updatePetWithForm( consumes = { "multipart/form-data" } ) @ResponseStatus(HttpStatus.OK) + default ModelApiResponse uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/StoreApi.java index 8330053569cb..1a0a00c4c355 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/StoreApi.java @@ -51,6 +51,7 @@ default StoreApiDelegate getDelegate() { value = "/store/order/{orderId}" ) @ResponseStatus(HttpStatus.BAD_REQUEST) + default void deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId ) { @@ -84,6 +85,7 @@ default void deleteOrder( produces = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Map getInventory( ) { @@ -118,6 +120,7 @@ default Map getInventory( produces = { "application/xml", "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Order getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId ) { @@ -151,6 +154,7 @@ default Order getOrderById( consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Order placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ) { diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApi.java index e5ab02160644..afee2557af81 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/api/UserApi.java @@ -53,6 +53,7 @@ default UserApiDelegate getDelegate() { consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default void createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user ) { @@ -85,6 +86,7 @@ default void createUser( consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default void createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -117,6 +119,7 @@ default void createUsersWithArrayInput( consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default void createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -150,6 +153,7 @@ default void createUsersWithListInput( value = "/user/{username}" ) @ResponseStatus(HttpStatus.BAD_REQUEST) + default void deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { @@ -184,6 +188,7 @@ default void deleteUser( produces = { "application/xml", "application/json" } ) @ResponseStatus(HttpStatus.OK) + default User getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { @@ -217,6 +222,7 @@ default User getUserByName( produces = { "application/xml", "application/json" } ) @ResponseStatus(HttpStatus.OK) + default String loginUser( @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password @@ -248,6 +254,7 @@ default String loginUser( value = "/user/logout" ) @ResponseStatus(HttpStatus.OK) + default void logoutUser( ) { @@ -283,6 +290,7 @@ default void logoutUser( consumes = { "application/json" } ) @ResponseStatus(HttpStatus.BAD_REQUEST) + default void updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index b2a45de6de4f..d75eb06d4bb1 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -50,6 +50,7 @@ default AnotherFakeApiDelegate getDelegate() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity call123testSpecialTags( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 02fe35584510..59befce8d626 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -60,6 +60,7 @@ default FakeApiDelegate getDelegate() { value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) + default ResponseEntity createXmlItem( @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem ) { @@ -90,6 +91,7 @@ default ResponseEntity createXmlItem( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterBooleanSerialize( @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body ) { @@ -120,6 +122,7 @@ default ResponseEntity fakeOuterBooleanSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterCompositeSerialize( @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite ) { @@ -150,6 +153,7 @@ default ResponseEntity fakeOuterCompositeSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterNumberSerialize( @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body ) { @@ -180,6 +184,7 @@ default ResponseEntity fakeOuterNumberSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterStringSerialize( @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body ) { @@ -208,6 +213,7 @@ default ResponseEntity fakeOuterStringSerialize( value = "/fake/{petId}/response-object-different-names", produces = { "application/json" } ) + default ResponseEntity responseObjectDifferentNames( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { @@ -236,6 +242,7 @@ default ResponseEntity responseObjectDiff value = "/fake/body-with-file-schema", consumes = { "application/json" } ) + default ResponseEntity testBodyWithFileSchema( @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass ) { @@ -264,6 +271,7 @@ default ResponseEntity testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = { "application/json" } ) + default ResponseEntity testBodyWithQueryParams( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, @ApiParam(value = "", required = true) @Valid @RequestBody User user @@ -295,6 +303,7 @@ default ResponseEntity testBodyWithQueryParams( produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClientModel( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { @@ -341,6 +350,7 @@ default ResponseEntity testClientModel( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEndpointParameters( @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -391,6 +401,7 @@ default ResponseEntity testEndpointParameters( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @@ -430,6 +441,7 @@ default ResponseEntity testEnumParameters( method = RequestMethod.DELETE, value = "/fake" ) + default ResponseEntity testGroupParameters( @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, @@ -463,6 +475,7 @@ default ResponseEntity testGroupParameters( value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) + default ResponseEntity testInlineAdditionalProperties( @ApiParam(value = "request body", required = true) @Valid @RequestBody Map requestBody ) { @@ -492,6 +505,7 @@ default ResponseEntity testInlineAdditionalProperties( value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testJsonFormData( @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 @@ -551,6 +565,7 @@ default ResponseEntity testNullable( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) + default ResponseEntity testQueryParameterCollectionFormat( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, @@ -582,6 +597,7 @@ default ResponseEntity testQueryParameterCollectionFormat( value = "/fake/response-with-example", produces = { "application/json" } ) + default ResponseEntity testWithResultExample( ) { @@ -620,6 +636,7 @@ default ResponseEntity testWithResultExample( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFileWithRequiredFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 83458c428f40..b7189e45a0a9 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -53,6 +53,7 @@ default FakeClassnameTestApiDelegate getDelegate() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClassname( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 7e2e5e2a05f5..196d586ed8b5 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -58,6 +58,7 @@ default PetApiDelegate getDelegate() { value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -94,6 +95,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey @@ -133,6 +135,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status ) { @@ -173,6 +176,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { @@ -209,6 +213,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { @@ -249,6 +254,7 @@ default ResponseEntity getPetById( value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -285,6 +291,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -325,6 +332,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index 9900a5292ab7..82a4a7921d11 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -50,6 +50,7 @@ default StoreApiDelegate getDelegate() { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) + default ResponseEntity deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { @@ -82,6 +83,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -115,6 +117,7 @@ default ResponseEntity> getInventory( value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { @@ -147,6 +150,7 @@ default ResponseEntity getOrderById( produces = { "application/xml", "application/json" }, consumes = { "application/json" } ) + default ResponseEntity placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index a1ad61656ecc..3348d016fb1d 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -49,6 +49,7 @@ default UserApiDelegate getDelegate() { value = "/user", consumes = { "application/json" } ) + default ResponseEntity createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user ) { @@ -77,6 +78,7 @@ default ResponseEntity createUser( value = "/user/createWithArray", consumes = { "application/json" } ) + default ResponseEntity createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -105,6 +107,7 @@ default ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = { "application/json" } ) + default ResponseEntity createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -134,6 +137,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { @@ -167,6 +171,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { @@ -199,6 +204,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password @@ -226,6 +232,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -257,6 +264,7 @@ default ResponseEntity logoutUser( value = "/user/{username}", consumes = { "application/json" } ) + default ResponseEntity updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java index 31a61e163e0a..ba4b0a79d892 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java @@ -44,6 +44,7 @@ default Optional getRequest() { produces = { "application/xml", "application/json" }, consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @Valid @RequestBody Pet pet ) { @@ -77,6 +78,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @PathVariable("petId") Long petId ) { @@ -98,6 +100,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @Valid @RequestParam(value = "status", required = true) @Deprecated List status ) { @@ -135,6 +138,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @Valid @RequestParam(value = "tags", required = true) List tags ) { @@ -171,6 +175,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @PathVariable("petId") Long petId ) { @@ -211,6 +216,7 @@ default ResponseEntity getPetById( produces = { "application/xml", "application/json" }, consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @Valid @RequestBody Pet pet ) { @@ -247,6 +253,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @PathVariable("petId") Long petId, @Valid @RequestParam(value = "name", required = false) String name, @@ -272,6 +279,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @PathVariable("petId") Long petId, @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java index 5c7d2045127c..312c65eb077c 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java @@ -42,6 +42,7 @@ default Optional getRequest() { method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) + default ResponseEntity deleteOrder( @PathVariable("orderId") String orderId ) { @@ -61,6 +62,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -83,6 +85,7 @@ default ResponseEntity> getInventory( value = "/store/order/{orderId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @PathVariable("orderId") Long orderId ) { @@ -119,6 +122,7 @@ default ResponseEntity getOrderById( produces = { "application/xml", "application/json" }, consumes = { "application/json" } ) + default ResponseEntity placeOrder( @Valid @RequestBody Order order ) { diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java index 332118a3a8f9..7b99a0122ea0 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/UserApi.java @@ -42,6 +42,7 @@ default Optional getRequest() { value = "/user", consumes = { "application/json" } ) + default ResponseEntity createUser( @Valid @RequestBody User user ) { @@ -62,6 +63,7 @@ default ResponseEntity createUser( value = "/user/createWithArray", consumes = { "application/json" } ) + default ResponseEntity createUsersWithArrayInput( @Valid @RequestBody List user ) { @@ -82,6 +84,7 @@ default ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = { "application/json" } ) + default ResponseEntity createUsersWithListInput( @Valid @RequestBody List user ) { @@ -102,6 +105,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @PathVariable("username") String username ) { @@ -124,6 +128,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @PathVariable("username") String username ) { @@ -160,6 +165,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Valid @RequestParam(value = "password", required = true) String password @@ -179,6 +185,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -201,6 +208,7 @@ default ResponseEntity logoutUser( value = "/user/{username}", consumes = { "application/json" } ) + default ResponseEntity updateUser( @PathVariable("username") String username, @Valid @RequestBody User user diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index d60c9b32c6ae..46b30fbcd28b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -54,6 +54,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity call123testSpecialTags( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 99c6d2fbfb0a..c34845d52ae3 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -64,6 +64,7 @@ default Optional getRequest() { value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) + default ResponseEntity createXmlItem( @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem ) { @@ -95,6 +96,7 @@ default ResponseEntity createXmlItem( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterBooleanSerialize( @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body ) { @@ -126,6 +128,7 @@ default ResponseEntity fakeOuterBooleanSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterCompositeSerialize( @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite ) { @@ -166,6 +169,7 @@ default ResponseEntity fakeOuterCompositeSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterNumberSerialize( @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body ) { @@ -197,6 +201,7 @@ default ResponseEntity fakeOuterNumberSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterStringSerialize( @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body ) { @@ -226,6 +231,7 @@ default ResponseEntity fakeOuterStringSerialize( value = "/fake/{petId}/response-object-different-names", produces = { "application/json" } ) + default ResponseEntity responseObjectDifferentNames( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { @@ -264,6 +270,7 @@ default ResponseEntity responseObjectDiff value = "/fake/body-with-file-schema", consumes = { "application/json" } ) + default ResponseEntity testBodyWithFileSchema( @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass ) { @@ -293,6 +300,7 @@ default ResponseEntity testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = { "application/json" } ) + default ResponseEntity testBodyWithQueryParams( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, @ApiParam(value = "", required = true) @Valid @RequestBody User user @@ -325,6 +333,7 @@ default ResponseEntity testBodyWithQueryParams( produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClientModel( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { @@ -381,6 +390,7 @@ default ResponseEntity testClientModel( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEndpointParameters( @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -434,6 +444,7 @@ default ResponseEntity testEndpointParameters( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEnumParameters( @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString, @@ -474,6 +485,7 @@ default ResponseEntity testEnumParameters( method = RequestMethod.DELETE, value = "/fake" ) + default ResponseEntity testGroupParameters( @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group, @@ -506,6 +518,7 @@ default ResponseEntity testGroupParameters( value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) + default ResponseEntity testInlineAdditionalProperties( @ApiParam(value = "request body", required = true) @Valid @RequestBody Map requestBody ) { @@ -536,6 +549,7 @@ default ResponseEntity testInlineAdditionalProperties( value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testJsonFormData( @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 @@ -597,6 +611,7 @@ default ResponseEntity testNullable( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) + default ResponseEntity testQueryParameterCollectionFormat( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, @@ -629,6 +644,7 @@ default ResponseEntity testQueryParameterCollectionFormat( value = "/fake/response-with-example", produces = { "application/json" } ) + default ResponseEntity testWithResultExample( ) { @@ -677,6 +693,7 @@ default ResponseEntity testWithResultExample( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFileWithRequiredFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index d4656f9aa953..248b6e0608b0 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -57,6 +57,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClassname( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index caabebd7fe93..d44c170496ff 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -62,6 +62,7 @@ default Optional getRequest() { value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -101,6 +102,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId ) { @@ -140,6 +142,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status ) { @@ -195,6 +198,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { @@ -246,6 +250,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { @@ -301,6 +306,7 @@ default ResponseEntity getPetById( value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -338,6 +344,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -379,6 +386,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index 3aaeb001372b..fc2985582875 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -54,6 +54,7 @@ default Optional getRequest() { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) + default ResponseEntity deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { @@ -87,6 +88,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -121,6 +123,7 @@ default ResponseEntity> getInventory( value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { @@ -168,6 +171,7 @@ default ResponseEntity getOrderById( produces = { "application/xml", "application/json" }, consumes = { "application/json" } ) + default ResponseEntity placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index f1e788a25ee0..9dc1ddab1657 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -53,6 +53,7 @@ default Optional getRequest() { value = "/user", consumes = { "application/json" } ) + default ResponseEntity createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user ) { @@ -82,6 +83,7 @@ default ResponseEntity createUser( value = "/user/createWithArray", consumes = { "application/json" } ) + default ResponseEntity createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -111,6 +113,7 @@ default ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = { "application/json" } ) + default ResponseEntity createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -141,6 +144,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { @@ -175,6 +179,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { @@ -222,6 +227,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password @@ -250,6 +256,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -282,6 +289,7 @@ default ResponseEntity logoutUser( value = "/user/{username}", consumes = { "application/json" } ) + default ResponseEntity updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java index c12111c12b6a..b9ef983e22ad 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -56,6 +56,7 @@ default AnotherFakeApiDelegate getDelegate() { consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono call123testSpecialTags( @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono client, @ApiIgnore final ServerWebExchange exchange diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java index 1eec5cb7b63a..adc9085a3db6 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java @@ -66,6 +66,7 @@ default FakeApiDelegate getDelegate() { consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) @ResponseStatus(HttpStatus.OK) + default Mono createXmlItem( @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody Mono xmlItem, @ApiIgnore final ServerWebExchange exchange @@ -98,6 +99,7 @@ default Mono createXmlItem( consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono fakeOuterBooleanSerialize( @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Mono body, @ApiIgnore final ServerWebExchange exchange @@ -130,6 +132,7 @@ default Mono fakeOuterBooleanSerialize( consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono fakeOuterCompositeSerialize( @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) Mono outerComposite, @ApiIgnore final ServerWebExchange exchange @@ -162,6 +165,7 @@ default Mono fakeOuterCompositeSerialize( consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono fakeOuterNumberSerialize( @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) Mono body, @ApiIgnore final ServerWebExchange exchange @@ -194,6 +198,7 @@ default Mono fakeOuterNumberSerialize( consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono fakeOuterStringSerialize( @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) Mono body, @ApiIgnore final ServerWebExchange exchange @@ -224,6 +229,7 @@ default Mono fakeOuterStringSerialize( produces = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono responseObjectDifferentNames( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiIgnore final ServerWebExchange exchange @@ -254,6 +260,7 @@ default Mono responseObjectDifferentNames consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono testBodyWithFileSchema( @ApiParam(value = "", required = true) @Valid @RequestBody Mono fileSchemaTestClass, @ApiIgnore final ServerWebExchange exchange @@ -284,6 +291,7 @@ default Mono testBodyWithFileSchema( consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono testBodyWithQueryParams( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, @ApiParam(value = "", required = true) @Valid @RequestBody Mono user, @@ -317,6 +325,7 @@ default Mono testBodyWithQueryParams( consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono testClientModel( @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono client, @ApiIgnore final ServerWebExchange exchange @@ -365,6 +374,7 @@ default Mono testClientModel( consumes = { "application/x-www-form-urlencoded" } ) @ResponseStatus(HttpStatus.BAD_REQUEST) + default Mono testEndpointParameters( @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -417,6 +427,7 @@ default Mono testEndpointParameters( consumes = { "application/x-www-form-urlencoded" } ) @ResponseStatus(HttpStatus.BAD_REQUEST) + default Mono testEnumParameters( @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @@ -458,6 +469,7 @@ default Mono testEnumParameters( value = "/fake" ) @ResponseStatus(HttpStatus.BAD_REQUEST) + default Mono testGroupParameters( @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, @@ -493,6 +505,7 @@ default Mono testGroupParameters( consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono testInlineAdditionalProperties( @ApiParam(value = "request body", required = true) @Valid @RequestBody Mono> requestBody, @ApiIgnore final ServerWebExchange exchange @@ -524,6 +537,7 @@ default Mono testInlineAdditionalProperties( consumes = { "application/x-www-form-urlencoded" } ) @ResponseStatus(HttpStatus.OK) + default Mono testJsonFormData( @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2, @@ -587,6 +601,7 @@ default Mono testNullable( value = "/fake/test-query-parameters" ) @ResponseStatus(HttpStatus.OK) + default Mono testQueryParameterCollectionFormat( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, @@ -620,6 +635,7 @@ default Mono testQueryParameterCollectionFormat( produces = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono testWithResultExample( @ApiIgnore final ServerWebExchange exchange ) { @@ -659,6 +675,7 @@ default Mono testWithResultExample( consumes = { "multipart/form-data" } ) @ResponseStatus(HttpStatus.OK) + default Mono uploadFileWithRequiredFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) Flux requiredFile, diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index d1ddf7923568..50bce3298f56 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -59,6 +59,7 @@ default FakeClassnameTestApiDelegate getDelegate() { consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono testClassname( @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono client, @ApiIgnore final ServerWebExchange exchange diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java index f9ce5228674c..e54e8c9f6ee6 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/PetApi.java @@ -64,6 +64,7 @@ default PetApiDelegate getDelegate() { consumes = { "application/json", "application/xml" } ) @ResponseStatus(HttpStatus.OK) + default Mono addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono pet, @ApiIgnore final ServerWebExchange exchange @@ -102,6 +103,7 @@ default Mono addPet( value = "/pet/{petId}" ) @ResponseStatus(HttpStatus.OK) + default Mono deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey, @@ -143,6 +145,7 @@ default Mono deletePet( produces = { "application/xml", "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, @ApiIgnore final ServerWebExchange exchange @@ -185,6 +188,7 @@ default Mono> findPetsByStatus( produces = { "application/xml", "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags, @ApiIgnore final ServerWebExchange exchange @@ -223,6 +227,7 @@ default Mono> findPetsByTags( produces = { "application/xml", "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId, @ApiIgnore final ServerWebExchange exchange @@ -265,6 +270,7 @@ default Mono getPetById( consumes = { "application/json", "application/xml" } ) @ResponseStatus(HttpStatus.OK) + default Mono updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono pet, @ApiIgnore final ServerWebExchange exchange @@ -303,6 +309,7 @@ default Mono updatePet( consumes = { "application/x-www-form-urlencoded" } ) @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) + default Mono updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -345,6 +352,7 @@ default Mono updatePetWithForm( consumes = { "multipart/form-data" } ) @ResponseStatus(HttpStatus.OK) + default Mono uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java index d8cd87bde1bc..d4ac3d4ef0d3 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/StoreApi.java @@ -56,6 +56,7 @@ default StoreApiDelegate getDelegate() { value = "/store/order/{order_id}" ) @ResponseStatus(HttpStatus.BAD_REQUEST) + default Mono deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId, @ApiIgnore final ServerWebExchange exchange @@ -90,6 +91,7 @@ default Mono deleteOrder( produces = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono> getInventory( @ApiIgnore final ServerWebExchange exchange ) { @@ -124,6 +126,7 @@ default Mono> getInventory( produces = { "application/xml", "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId, @ApiIgnore final ServerWebExchange exchange @@ -158,6 +161,7 @@ default Mono getOrderById( consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Mono order, @ApiIgnore final ServerWebExchange exchange diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java index ccfa4727894b..f3abec9ba9b2 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/UserApi.java @@ -55,6 +55,7 @@ default UserApiDelegate getDelegate() { consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody Mono user, @ApiIgnore final ServerWebExchange exchange @@ -85,6 +86,7 @@ default Mono createUser( consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux user, @ApiIgnore final ServerWebExchange exchange @@ -115,6 +117,7 @@ default Mono createUsersWithArrayInput( consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux user, @ApiIgnore final ServerWebExchange exchange @@ -146,6 +149,7 @@ default Mono createUsersWithListInput( value = "/user/{username}" ) @ResponseStatus(HttpStatus.BAD_REQUEST) + default Mono deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username, @ApiIgnore final ServerWebExchange exchange @@ -181,6 +185,7 @@ default Mono deleteUser( produces = { "application/xml", "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username, @ApiIgnore final ServerWebExchange exchange @@ -215,6 +220,7 @@ default Mono getUserByName( produces = { "application/xml", "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password, @@ -244,6 +250,7 @@ default Mono loginUser( value = "/user/logout" ) @ResponseStatus(HttpStatus.OK) + default Mono logoutUser( @ApiIgnore final ServerWebExchange exchange ) { @@ -276,6 +283,7 @@ default Mono logoutUser( consumes = { "application/json" } ) @ResponseStatus(HttpStatus.BAD_REQUEST) + default Mono updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody Mono user, diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index e6508cac77b0..50297537ff55 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -55,6 +55,7 @@ default AnotherFakeApiDelegate getDelegate() { produces = { "application/json" }, consumes = { "application/json" } ) + default Mono> call123testSpecialTags( @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono client, @ApiIgnore final ServerWebExchange exchange diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index 79fccb4b4319..e5963b170304 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -65,6 +65,7 @@ default FakeApiDelegate getDelegate() { value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) + default Mono> createXmlItem( @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody Mono xmlItem, @ApiIgnore final ServerWebExchange exchange @@ -96,6 +97,7 @@ default Mono> createXmlItem( produces = { "*/*" }, consumes = { "application/json" } ) + default Mono> fakeOuterBooleanSerialize( @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Mono body, @ApiIgnore final ServerWebExchange exchange @@ -127,6 +129,7 @@ default Mono> fakeOuterBooleanSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default Mono> fakeOuterCompositeSerialize( @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) Mono outerComposite, @ApiIgnore final ServerWebExchange exchange @@ -158,6 +161,7 @@ default Mono> fakeOuterCompositeSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default Mono> fakeOuterNumberSerialize( @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) Mono body, @ApiIgnore final ServerWebExchange exchange @@ -189,6 +193,7 @@ default Mono> fakeOuterNumberSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default Mono> fakeOuterStringSerialize( @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) Mono body, @ApiIgnore final ServerWebExchange exchange @@ -218,6 +223,7 @@ default Mono> fakeOuterStringSerialize( value = "/fake/{petId}/response-object-different-names", produces = { "application/json" } ) + default Mono> responseObjectDifferentNames( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiIgnore final ServerWebExchange exchange @@ -247,6 +253,7 @@ default Mono> responseObje value = "/fake/body-with-file-schema", consumes = { "application/json" } ) + default Mono> testBodyWithFileSchema( @ApiParam(value = "", required = true) @Valid @RequestBody Mono fileSchemaTestClass, @ApiIgnore final ServerWebExchange exchange @@ -276,6 +283,7 @@ default Mono> testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = { "application/json" } ) + default Mono> testBodyWithQueryParams( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, @ApiParam(value = "", required = true) @Valid @RequestBody Mono user, @@ -308,6 +316,7 @@ default Mono> testBodyWithQueryParams( produces = { "application/json" }, consumes = { "application/json" } ) + default Mono> testClientModel( @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono client, @ApiIgnore final ServerWebExchange exchange @@ -355,6 +364,7 @@ default Mono> testClientModel( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default Mono> testEndpointParameters( @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -406,6 +416,7 @@ default Mono> testEndpointParameters( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default Mono> testEnumParameters( @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @@ -446,6 +457,7 @@ default Mono> testEnumParameters( method = RequestMethod.DELETE, value = "/fake" ) + default Mono> testGroupParameters( @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, @@ -480,6 +492,7 @@ default Mono> testGroupParameters( value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) + default Mono> testInlineAdditionalProperties( @ApiParam(value = "request body", required = true) @Valid @RequestBody Mono> requestBody, @ApiIgnore final ServerWebExchange exchange @@ -510,6 +523,7 @@ default Mono> testInlineAdditionalProperties( value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) + default Mono> testJsonFormData( @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2, @@ -571,6 +585,7 @@ default Mono> testNullable( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) + default Mono> testQueryParameterCollectionFormat( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, @@ -603,6 +618,7 @@ default Mono> testQueryParameterCollectionFormat( value = "/fake/response-with-example", produces = { "application/json" } ) + default Mono> testWithResultExample( @ApiIgnore final ServerWebExchange exchange ) { @@ -641,6 +657,7 @@ default Mono> testWithResultExample( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default Mono> uploadFileWithRequiredFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) Flux requiredFile, diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e7f7463edc91..81c899fbf3cd 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -58,6 +58,7 @@ default FakeClassnameTestApiDelegate getDelegate() { produces = { "application/json" }, consumes = { "application/json" } ) + default Mono> testClassname( @ApiParam(value = "client model", required = true) @Valid @RequestBody Mono client, @ApiIgnore final ServerWebExchange exchange diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index ea3b8e9fdd1a..7acac446ae46 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -63,6 +63,7 @@ default PetApiDelegate getDelegate() { value = "/pet", consumes = { "application/json", "application/xml" } ) + default Mono> addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono pet, @ApiIgnore final ServerWebExchange exchange @@ -100,6 +101,7 @@ default Mono> addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default Mono> deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey, @@ -140,6 +142,7 @@ default Mono> deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default Mono>> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, @ApiIgnore final ServerWebExchange exchange @@ -181,6 +184,7 @@ default Mono>> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default Mono>> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags, @ApiIgnore final ServerWebExchange exchange @@ -218,6 +222,7 @@ default Mono>> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default Mono> getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId, @ApiIgnore final ServerWebExchange exchange @@ -259,6 +264,7 @@ default Mono> getPetById( value = "/pet", consumes = { "application/json", "application/xml" } ) + default Mono> updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono pet, @ApiIgnore final ServerWebExchange exchange @@ -296,6 +302,7 @@ default Mono> updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default Mono> updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -337,6 +344,7 @@ default Mono> updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default Mono> uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index 415ce7a4302a..fbb19ea57776 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -55,6 +55,7 @@ default StoreApiDelegate getDelegate() { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) + default Mono> deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId, @ApiIgnore final ServerWebExchange exchange @@ -88,6 +89,7 @@ default Mono> deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default Mono>> getInventory( @ApiIgnore final ServerWebExchange exchange ) { @@ -121,6 +123,7 @@ default Mono>> getInventory( value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) + default Mono> getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId, @ApiIgnore final ServerWebExchange exchange @@ -154,6 +157,7 @@ default Mono> getOrderById( produces = { "application/xml", "application/json" }, consumes = { "application/json" } ) + default Mono> placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Mono order, @ApiIgnore final ServerWebExchange exchange diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index dd53db4fc544..6071e2701f55 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -54,6 +54,7 @@ default UserApiDelegate getDelegate() { value = "/user", consumes = { "application/json" } ) + default Mono> createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody Mono user, @ApiIgnore final ServerWebExchange exchange @@ -83,6 +84,7 @@ default Mono> createUser( value = "/user/createWithArray", consumes = { "application/json" } ) + default Mono> createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux user, @ApiIgnore final ServerWebExchange exchange @@ -112,6 +114,7 @@ default Mono> createUsersWithArrayInput( value = "/user/createWithList", consumes = { "application/json" } ) + default Mono> createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux user, @ApiIgnore final ServerWebExchange exchange @@ -142,6 +145,7 @@ default Mono> createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default Mono> deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username, @ApiIgnore final ServerWebExchange exchange @@ -176,6 +180,7 @@ default Mono> deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default Mono> getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username, @ApiIgnore final ServerWebExchange exchange @@ -209,6 +214,7 @@ default Mono> getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default Mono> loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password, @@ -237,6 +243,7 @@ default Mono> loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default Mono> logoutUser( @ApiIgnore final ServerWebExchange exchange ) { @@ -268,6 +275,7 @@ default Mono> logoutUser( value = "/user/{username}", consumes = { "application/json" } ) + default Mono> updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody Mono user, diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 77479419f4f7..064a43317ee9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -50,6 +50,7 @@ default AnotherFakeApiDelegate getDelegate() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity call123testSpecialTags( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body ) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java index 7a09e5086848..96dce92fe570 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -58,6 +58,7 @@ default FakeApiDelegate getDelegate() { value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) + default ResponseEntity createXmlItem( @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem ) { @@ -87,6 +88,7 @@ default ResponseEntity createXmlItem( value = "/fake/outer/boolean", produces = { "*/*" } ) + default ResponseEntity fakeOuterBooleanSerialize( @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body ) { @@ -116,6 +118,7 @@ default ResponseEntity fakeOuterBooleanSerialize( value = "/fake/outer/composite", produces = { "*/*" } ) + default ResponseEntity fakeOuterCompositeSerialize( @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body ) { @@ -145,6 +148,7 @@ default ResponseEntity fakeOuterCompositeSerialize( value = "/fake/outer/number", produces = { "*/*" } ) + default ResponseEntity fakeOuterNumberSerialize( @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body ) { @@ -174,6 +178,7 @@ default ResponseEntity fakeOuterNumberSerialize( value = "/fake/outer/string", produces = { "*/*" } ) + default ResponseEntity fakeOuterStringSerialize( @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body ) { @@ -202,6 +207,7 @@ default ResponseEntity fakeOuterStringSerialize( value = "/fake/body-with-file-schema", consumes = { "application/json" } ) + default ResponseEntity testBodyWithFileSchema( @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body ) { @@ -230,6 +236,7 @@ default ResponseEntity testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = { "application/json" } ) + default ResponseEntity testBodyWithQueryParams( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, @ApiParam(value = "", required = true) @Valid @RequestBody User body @@ -261,6 +268,7 @@ default ResponseEntity testBodyWithQueryParams( produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClientModel( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body ) { @@ -307,6 +315,7 @@ default ResponseEntity testClientModel( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEndpointParameters( @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -357,6 +366,7 @@ default ResponseEntity testEndpointParameters( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @@ -396,6 +406,7 @@ default ResponseEntity testEnumParameters( method = RequestMethod.DELETE, value = "/fake" ) + default ResponseEntity testGroupParameters( @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, @@ -428,6 +439,7 @@ default ResponseEntity testGroupParameters( value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) + default ResponseEntity testInlineAdditionalProperties( @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param ) { @@ -456,6 +468,7 @@ default ResponseEntity testInlineAdditionalProperties( value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testJsonFormData( @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 @@ -488,6 +501,7 @@ default ResponseEntity testJsonFormData( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) + default ResponseEntity testQueryParameterCollectionFormat( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, @@ -529,6 +543,7 @@ default ResponseEntity testQueryParameterCollectionFormat( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFileWithRequiredFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 9dd2cfed87c2..5e55dcc9ef0f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -53,6 +53,7 @@ default FakeClassnameTestApiDelegate getDelegate() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClassname( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body ) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java index 91fda48a66ab..ccc406434c16 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -58,6 +58,7 @@ default PetApiDelegate getDelegate() { value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body ) { @@ -93,6 +94,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey @@ -132,6 +134,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, @ApiIgnore final Pageable pageable @@ -173,6 +176,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @ApiIgnore final Pageable pageable @@ -210,6 +214,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { @@ -246,6 +251,7 @@ default ResponseEntity getPetById( value = "/pet/all", produces = { "application/xml", "application/json" } ) + default ResponseEntity> listAllPets( @ApiIgnore final Pageable pageable ) { @@ -285,6 +291,7 @@ default ResponseEntity> listAllPets( value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body ) { @@ -320,6 +327,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -359,6 +367,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java index 25f2ff66b02d..9b3fe4da4706 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -50,6 +50,7 @@ default StoreApiDelegate getDelegate() { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) + default ResponseEntity deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { @@ -82,6 +83,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -115,6 +117,7 @@ default ResponseEntity> getInventory( value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { @@ -145,6 +148,7 @@ default ResponseEntity getOrderById( value = "/store/order", produces = { "application/xml", "application/json" } ) + default ResponseEntity placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body ) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java index 1bedbe96f29e..6c96e70f7be4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -48,6 +48,7 @@ default UserApiDelegate getDelegate() { method = RequestMethod.POST, value = "/user" ) + default ResponseEntity createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body ) { @@ -74,6 +75,7 @@ default ResponseEntity createUser( method = RequestMethod.POST, value = "/user/createWithArray" ) + default ResponseEntity createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body ) { @@ -100,6 +102,7 @@ default ResponseEntity createUsersWithArrayInput( method = RequestMethod.POST, value = "/user/createWithList" ) + default ResponseEntity createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body ) { @@ -129,6 +132,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { @@ -161,6 +165,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { @@ -192,6 +197,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password @@ -218,6 +224,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -248,6 +255,7 @@ default ResponseEntity logoutUser( method = RequestMethod.PUT, value = "/user/{username}" ) + default ResponseEntity updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/VersioningApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/VersioningApi.java index c337669679f7..099ee547b449 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/VersioningApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/VersioningApi.java @@ -51,6 +51,7 @@ default VersioningApiDelegate getDelegate() { produces = { "*/*" }, headers = { "VersionWithDefaultValue=V1", "VersionNoDefaultValue" } ) + default ResponseEntity versioningHeaders( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @RequestHeader(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, @NotNull @ApiParam(value = "", required = true) @RequestHeader(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, @@ -87,6 +88,7 @@ default ResponseEntity versioningHeaders( headers = { "VersionWithDefaultValueHeader=V1", "VersionNoDefaultValueHeader" } , params = { "VersionWithDefaultValueQuery=V1", "VersionNoDefaultValueQuery" } ) + default ResponseEntity versioningMix( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValueQuery", required = true, defaultValue = "V1") String versionWithDefaultValueQuery, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValueQuery", required = true) String versionNoDefaultValueQuery, @@ -122,6 +124,7 @@ default ResponseEntity versioningMix( produces = { "*/*" }, params = { "VersionWithDefaultValue=V1", "VersionNoDefaultValue" } ) + default ResponseEntity versioningQueryParams( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java index 77479419f4f7..064a43317ee9 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -50,6 +50,7 @@ default AnotherFakeApiDelegate getDelegate() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity call123testSpecialTags( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body ) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java index 7a09e5086848..96dce92fe570 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java @@ -58,6 +58,7 @@ default FakeApiDelegate getDelegate() { value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) + default ResponseEntity createXmlItem( @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem ) { @@ -87,6 +88,7 @@ default ResponseEntity createXmlItem( value = "/fake/outer/boolean", produces = { "*/*" } ) + default ResponseEntity fakeOuterBooleanSerialize( @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body ) { @@ -116,6 +118,7 @@ default ResponseEntity fakeOuterBooleanSerialize( value = "/fake/outer/composite", produces = { "*/*" } ) + default ResponseEntity fakeOuterCompositeSerialize( @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body ) { @@ -145,6 +148,7 @@ default ResponseEntity fakeOuterCompositeSerialize( value = "/fake/outer/number", produces = { "*/*" } ) + default ResponseEntity fakeOuterNumberSerialize( @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body ) { @@ -174,6 +178,7 @@ default ResponseEntity fakeOuterNumberSerialize( value = "/fake/outer/string", produces = { "*/*" } ) + default ResponseEntity fakeOuterStringSerialize( @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body ) { @@ -202,6 +207,7 @@ default ResponseEntity fakeOuterStringSerialize( value = "/fake/body-with-file-schema", consumes = { "application/json" } ) + default ResponseEntity testBodyWithFileSchema( @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body ) { @@ -230,6 +236,7 @@ default ResponseEntity testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = { "application/json" } ) + default ResponseEntity testBodyWithQueryParams( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, @ApiParam(value = "", required = true) @Valid @RequestBody User body @@ -261,6 +268,7 @@ default ResponseEntity testBodyWithQueryParams( produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClientModel( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body ) { @@ -307,6 +315,7 @@ default ResponseEntity testClientModel( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEndpointParameters( @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -357,6 +366,7 @@ default ResponseEntity testEndpointParameters( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @@ -396,6 +406,7 @@ default ResponseEntity testEnumParameters( method = RequestMethod.DELETE, value = "/fake" ) + default ResponseEntity testGroupParameters( @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, @@ -428,6 +439,7 @@ default ResponseEntity testGroupParameters( value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) + default ResponseEntity testInlineAdditionalProperties( @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param ) { @@ -456,6 +468,7 @@ default ResponseEntity testInlineAdditionalProperties( value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testJsonFormData( @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 @@ -488,6 +501,7 @@ default ResponseEntity testJsonFormData( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) + default ResponseEntity testQueryParameterCollectionFormat( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, @@ -529,6 +543,7 @@ default ResponseEntity testQueryParameterCollectionFormat( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFileWithRequiredFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 9dd2cfed87c2..5e55dcc9ef0f 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -53,6 +53,7 @@ default FakeClassnameTestApiDelegate getDelegate() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClassname( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body ) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java index 91fda48a66ab..ccc406434c16 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java @@ -58,6 +58,7 @@ default PetApiDelegate getDelegate() { value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body ) { @@ -93,6 +94,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey @@ -132,6 +134,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, @ApiIgnore final Pageable pageable @@ -173,6 +176,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @ApiIgnore final Pageable pageable @@ -210,6 +214,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { @@ -246,6 +251,7 @@ default ResponseEntity getPetById( value = "/pet/all", produces = { "application/xml", "application/json" } ) + default ResponseEntity> listAllPets( @ApiIgnore final Pageable pageable ) { @@ -285,6 +291,7 @@ default ResponseEntity> listAllPets( value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body ) { @@ -320,6 +327,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -359,6 +367,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java index 25f2ff66b02d..9b3fe4da4706 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java @@ -50,6 +50,7 @@ default StoreApiDelegate getDelegate() { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) + default ResponseEntity deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { @@ -82,6 +83,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -115,6 +117,7 @@ default ResponseEntity> getInventory( value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { @@ -145,6 +148,7 @@ default ResponseEntity getOrderById( value = "/store/order", produces = { "application/xml", "application/json" } ) + default ResponseEntity placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body ) { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java index 1bedbe96f29e..6c96e70f7be4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java @@ -48,6 +48,7 @@ default UserApiDelegate getDelegate() { method = RequestMethod.POST, value = "/user" ) + default ResponseEntity createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body ) { @@ -74,6 +75,7 @@ default ResponseEntity createUser( method = RequestMethod.POST, value = "/user/createWithArray" ) + default ResponseEntity createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body ) { @@ -100,6 +102,7 @@ default ResponseEntity createUsersWithArrayInput( method = RequestMethod.POST, value = "/user/createWithList" ) + default ResponseEntity createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body ) { @@ -129,6 +132,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { @@ -161,6 +165,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { @@ -192,6 +197,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password @@ -218,6 +224,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -248,6 +255,7 @@ default ResponseEntity logoutUser( method = RequestMethod.PUT, value = "/user/{username}" ) + default ResponseEntity updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/VersioningApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/VersioningApi.java index 2d60e0f233dd..c0b9e1728507 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/VersioningApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/VersioningApi.java @@ -53,6 +53,7 @@ default VersioningApiDelegate getDelegate() { produces = { "*/*" }, headers = { "VersionWithDefaultValue=V1", "VersionNoDefaultValue" } ) + default ResponseEntity versioningHeaders( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { @@ -89,6 +90,7 @@ default ResponseEntity versioningHeaders( headers = { "VersionWithDefaultValueHeader=V1", "VersionNoDefaultValueHeader" } , params = { "VersionWithDefaultValueQuery=V1", "VersionNoDefaultValueQuery" } ) + default ResponseEntity versioningMix( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValueQuery", required = true, defaultValue = "V1") String versionWithDefaultValueQuery, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValueQuery", required = true) String versionNoDefaultValueQuery, @@ -122,6 +124,7 @@ default ResponseEntity versioningMix( produces = { "*/*" }, params = { "VersionWithDefaultValue=V1", "VersionNoDefaultValue" } ) + default ResponseEntity versioningQueryParams( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java index 92f1cead2d7f..d8d420d0f9da 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -54,6 +54,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity call123testSpecialTags( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body ) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java index ec315896a8e8..b6cb0c0b58a4 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -62,6 +62,7 @@ default Optional getRequest() { value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) + default ResponseEntity createXmlItem( @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem ) { @@ -92,6 +93,7 @@ default ResponseEntity createXmlItem( value = "/fake/outer/boolean", produces = { "*/*" } ) + default ResponseEntity fakeOuterBooleanSerialize( @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body ) { @@ -122,6 +124,7 @@ default ResponseEntity fakeOuterBooleanSerialize( value = "/fake/outer/composite", produces = { "*/*" } ) + default ResponseEntity fakeOuterCompositeSerialize( @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body ) { @@ -161,6 +164,7 @@ default ResponseEntity fakeOuterCompositeSerialize( value = "/fake/outer/number", produces = { "*/*" } ) + default ResponseEntity fakeOuterNumberSerialize( @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body ) { @@ -191,6 +195,7 @@ default ResponseEntity fakeOuterNumberSerialize( value = "/fake/outer/string", produces = { "*/*" } ) + default ResponseEntity fakeOuterStringSerialize( @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body ) { @@ -220,6 +225,7 @@ default ResponseEntity fakeOuterStringSerialize( value = "/fake/body-with-file-schema", consumes = { "application/json" } ) + default ResponseEntity testBodyWithFileSchema( @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body ) { @@ -249,6 +255,7 @@ default ResponseEntity testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = { "application/json" } ) + default ResponseEntity testBodyWithQueryParams( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, @ApiParam(value = "", required = true) @Valid @RequestBody User body @@ -281,6 +288,7 @@ default ResponseEntity testBodyWithQueryParams( produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClientModel( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body ) { @@ -337,6 +345,7 @@ default ResponseEntity testClientModel( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEndpointParameters( @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -388,6 +397,7 @@ default ResponseEntity testEndpointParameters( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @@ -428,6 +438,7 @@ default ResponseEntity testEnumParameters( method = RequestMethod.DELETE, value = "/fake" ) + default ResponseEntity testGroupParameters( @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, @@ -461,6 +472,7 @@ default ResponseEntity testGroupParameters( value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) + default ResponseEntity testInlineAdditionalProperties( @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param ) { @@ -490,6 +502,7 @@ default ResponseEntity testInlineAdditionalProperties( value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testJsonFormData( @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 @@ -523,6 +536,7 @@ default ResponseEntity testJsonFormData( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) + default ResponseEntity testQueryParameterCollectionFormat( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, @@ -565,6 +579,7 @@ default ResponseEntity testQueryParameterCollectionFormat( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFileWithRequiredFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index afa48af929f0..a86c37507861 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -57,6 +57,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClassname( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body ) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java index 8c1fe9173b69..57e506ba5a39 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java @@ -62,6 +62,7 @@ default Optional getRequest() { value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body ) { @@ -98,6 +99,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey @@ -138,6 +140,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, @ApiIgnore final Pageable pageable @@ -194,6 +197,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @ApiIgnore final Pageable pageable @@ -246,6 +250,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { @@ -297,6 +302,7 @@ default ResponseEntity getPetById( value = "/pet/all", produces = { "application/xml", "application/json" } ) + default ResponseEntity> listAllPets( @ApiIgnore final Pageable pageable ) { @@ -351,6 +357,7 @@ default ResponseEntity> listAllPets( value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body ) { @@ -387,6 +394,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -427,6 +435,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java index 95d169bee8ac..8540b17e0eb4 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -54,6 +54,7 @@ default Optional getRequest() { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) + default ResponseEntity deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { @@ -87,6 +88,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -121,6 +123,7 @@ default ResponseEntity> getInventory( value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { @@ -166,6 +169,7 @@ default ResponseEntity getOrderById( value = "/store/order", produces = { "application/xml", "application/json" } ) + default ResponseEntity placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body ) { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java index 86cf8340c590..38033c4e763f 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java @@ -52,6 +52,7 @@ default Optional getRequest() { method = RequestMethod.POST, value = "/user" ) + default ResponseEntity createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body ) { @@ -79,6 +80,7 @@ default ResponseEntity createUser( method = RequestMethod.POST, value = "/user/createWithArray" ) + default ResponseEntity createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body ) { @@ -106,6 +108,7 @@ default ResponseEntity createUsersWithArrayInput( method = RequestMethod.POST, value = "/user/createWithList" ) + default ResponseEntity createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body ) { @@ -136,6 +139,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { @@ -169,6 +173,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { @@ -215,6 +220,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password @@ -242,6 +248,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -273,6 +280,7 @@ default ResponseEntity logoutUser( method = RequestMethod.PUT, value = "/user/{username}" ) + default ResponseEntity updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/VersioningApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/VersioningApi.java index b0b7c549fe8f..c472c8a5ec4c 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/VersioningApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/VersioningApi.java @@ -55,6 +55,7 @@ default Optional getRequest() { produces = { "*/*" }, headers = { "VersionWithDefaultValue=V1", "VersionNoDefaultValue" } ) + default ResponseEntity versioningHeaders( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @RequestHeader(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, @NotNull @ApiParam(value = "", required = true) @RequestHeader(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, @@ -101,6 +102,7 @@ default ResponseEntity versioningHeaders( headers = { "VersionWithDefaultValueHeader=V1", "VersionNoDefaultValueHeader" } , params = { "VersionWithDefaultValueQuery=V1", "VersionNoDefaultValueQuery" } ) + default ResponseEntity versioningMix( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValueQuery", required = true, defaultValue = "V1") String versionWithDefaultValueQuery, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValueQuery", required = true) String versionNoDefaultValueQuery, @@ -146,6 +148,7 @@ default ResponseEntity versioningMix( produces = { "*/*" }, params = { "VersionWithDefaultValue=V1", "VersionNoDefaultValue" } ) + default ResponseEntity versioningQueryParams( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 92f1cead2d7f..d8d420d0f9da 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -54,6 +54,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity call123testSpecialTags( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body ) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index ec315896a8e8..b6cb0c0b58a4 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -62,6 +62,7 @@ default Optional getRequest() { value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) + default ResponseEntity createXmlItem( @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem ) { @@ -92,6 +93,7 @@ default ResponseEntity createXmlItem( value = "/fake/outer/boolean", produces = { "*/*" } ) + default ResponseEntity fakeOuterBooleanSerialize( @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body ) { @@ -122,6 +124,7 @@ default ResponseEntity fakeOuterBooleanSerialize( value = "/fake/outer/composite", produces = { "*/*" } ) + default ResponseEntity fakeOuterCompositeSerialize( @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body ) { @@ -161,6 +164,7 @@ default ResponseEntity fakeOuterCompositeSerialize( value = "/fake/outer/number", produces = { "*/*" } ) + default ResponseEntity fakeOuterNumberSerialize( @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body ) { @@ -191,6 +195,7 @@ default ResponseEntity fakeOuterNumberSerialize( value = "/fake/outer/string", produces = { "*/*" } ) + default ResponseEntity fakeOuterStringSerialize( @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body ) { @@ -220,6 +225,7 @@ default ResponseEntity fakeOuterStringSerialize( value = "/fake/body-with-file-schema", consumes = { "application/json" } ) + default ResponseEntity testBodyWithFileSchema( @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body ) { @@ -249,6 +255,7 @@ default ResponseEntity testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = { "application/json" } ) + default ResponseEntity testBodyWithQueryParams( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, @ApiParam(value = "", required = true) @Valid @RequestBody User body @@ -281,6 +288,7 @@ default ResponseEntity testBodyWithQueryParams( produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClientModel( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body ) { @@ -337,6 +345,7 @@ default ResponseEntity testClientModel( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEndpointParameters( @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -388,6 +397,7 @@ default ResponseEntity testEndpointParameters( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @@ -428,6 +438,7 @@ default ResponseEntity testEnumParameters( method = RequestMethod.DELETE, value = "/fake" ) + default ResponseEntity testGroupParameters( @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, @@ -461,6 +472,7 @@ default ResponseEntity testGroupParameters( value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) + default ResponseEntity testInlineAdditionalProperties( @ApiParam(value = "request body", required = true) @Valid @RequestBody Map param ) { @@ -490,6 +502,7 @@ default ResponseEntity testInlineAdditionalProperties( value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testJsonFormData( @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 @@ -523,6 +536,7 @@ default ResponseEntity testJsonFormData( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) + default ResponseEntity testQueryParameterCollectionFormat( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List ioutil, @@ -565,6 +579,7 @@ default ResponseEntity testQueryParameterCollectionFormat( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFileWithRequiredFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index afa48af929f0..a86c37507861 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -57,6 +57,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClassname( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client body ) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 8c1fe9173b69..57e506ba5a39 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -62,6 +62,7 @@ default Optional getRequest() { value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body ) { @@ -98,6 +99,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey @@ -138,6 +140,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status, @ApiIgnore final Pageable pageable @@ -194,6 +197,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags, @ApiIgnore final Pageable pageable @@ -246,6 +250,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { @@ -297,6 +302,7 @@ default ResponseEntity getPetById( value = "/pet/all", produces = { "application/xml", "application/json" } ) + default ResponseEntity> listAllPets( @ApiIgnore final Pageable pageable ) { @@ -351,6 +357,7 @@ default ResponseEntity> listAllPets( value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body ) { @@ -387,6 +394,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -427,6 +435,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 95d169bee8ac..8540b17e0eb4 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -54,6 +54,7 @@ default Optional getRequest() { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) + default ResponseEntity deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { @@ -87,6 +88,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -121,6 +123,7 @@ default ResponseEntity> getInventory( value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { @@ -166,6 +169,7 @@ default ResponseEntity getOrderById( value = "/store/order", produces = { "application/xml", "application/json" } ) + default ResponseEntity placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body ) { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 86cf8340c590..38033c4e763f 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -52,6 +52,7 @@ default Optional getRequest() { method = RequestMethod.POST, value = "/user" ) + default ResponseEntity createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body ) { @@ -79,6 +80,7 @@ default ResponseEntity createUser( method = RequestMethod.POST, value = "/user/createWithArray" ) + default ResponseEntity createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body ) { @@ -106,6 +108,7 @@ default ResponseEntity createUsersWithArrayInput( method = RequestMethod.POST, value = "/user/createWithList" ) + default ResponseEntity createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List body ) { @@ -136,6 +139,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { @@ -169,6 +173,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { @@ -215,6 +220,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password @@ -242,6 +248,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -273,6 +280,7 @@ default ResponseEntity logoutUser( method = RequestMethod.PUT, value = "/user/{username}" ) + default ResponseEntity updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/VersioningApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/VersioningApi.java index 16f10f4f0e89..cc15e05ab106 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/VersioningApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/VersioningApi.java @@ -57,6 +57,7 @@ default Optional getRequest() { produces = { "*/*" }, headers = { "VersionWithDefaultValue=V1", "VersionNoDefaultValue" } ) + default ResponseEntity versioningHeaders( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { @@ -103,6 +104,7 @@ default ResponseEntity versioningHeaders( headers = { "VersionWithDefaultValueHeader=V1", "VersionNoDefaultValueHeader" } , params = { "VersionWithDefaultValueQuery=V1", "VersionNoDefaultValueQuery" } ) + default ResponseEntity versioningMix( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValueQuery", required = true, defaultValue = "V1") String versionWithDefaultValueQuery, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValueQuery", required = true) String versionNoDefaultValueQuery, @@ -146,6 +148,7 @@ default ResponseEntity versioningMix( produces = { "*/*" }, params = { "VersionWithDefaultValue=V1", "VersionNoDefaultValue" } ) + default ResponseEntity versioningQueryParams( @NotNull @ApiParam(value = "", required = true, defaultValue = "V1") @Valid @RequestParam(value = "VersionWithDefaultValue", required = true, defaultValue = "V1") String versionWithDefaultValue, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "VersionNoDefaultValue", required = true) String versionNoDefaultValue, diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index d60c9b32c6ae..46b30fbcd28b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -54,6 +54,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity call123testSpecialTags( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index 67991eb5e7fb..c159d9dd71aa 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -64,6 +64,7 @@ default Optional getRequest() { value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) + default ResponseEntity createXmlItem( @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem ) { @@ -95,6 +96,7 @@ default ResponseEntity createXmlItem( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterBooleanSerialize( @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body ) { @@ -126,6 +128,7 @@ default ResponseEntity fakeOuterBooleanSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterCompositeSerialize( @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite ) { @@ -166,6 +169,7 @@ default ResponseEntity fakeOuterCompositeSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterNumberSerialize( @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body ) { @@ -197,6 +201,7 @@ default ResponseEntity fakeOuterNumberSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterStringSerialize( @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body ) { @@ -226,6 +231,7 @@ default ResponseEntity fakeOuterStringSerialize( value = "/fake/{petId}/response-object-different-names", produces = { "application/json" } ) + default ResponseEntity responseObjectDifferentNames( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { @@ -264,6 +270,7 @@ default ResponseEntity responseObjectDiff value = "/fake/body-with-file-schema", consumes = { "application/json" } ) + default ResponseEntity testBodyWithFileSchema( @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass ) { @@ -293,6 +300,7 @@ default ResponseEntity testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = { "application/json" } ) + default ResponseEntity testBodyWithQueryParams( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, @ApiParam(value = "", required = true) @Valid @RequestBody User user @@ -325,6 +333,7 @@ default ResponseEntity testBodyWithQueryParams( produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClientModel( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { @@ -381,6 +390,7 @@ default ResponseEntity testClientModel( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEndpointParameters( @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -432,6 +442,7 @@ default ResponseEntity testEndpointParameters( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) Optional> enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") Optional enumHeaderString, @@ -472,6 +483,7 @@ default ResponseEntity testEnumParameters( method = RequestMethod.DELETE, value = "/fake" ) + default ResponseEntity testGroupParameters( @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, @@ -506,6 +518,7 @@ default ResponseEntity testGroupParameters( value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) + default ResponseEntity testInlineAdditionalProperties( @ApiParam(value = "request body", required = true) @Valid @RequestBody Map requestBody ) { @@ -536,6 +549,7 @@ default ResponseEntity testInlineAdditionalProperties( value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testJsonFormData( @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 @@ -597,6 +611,7 @@ default ResponseEntity testNullable( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) + default ResponseEntity testQueryParameterCollectionFormat( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, @@ -629,6 +644,7 @@ default ResponseEntity testQueryParameterCollectionFormat( value = "/fake/response-with-example", produces = { "application/json" } ) + default ResponseEntity testWithResultExample( ) { @@ -677,6 +693,7 @@ default ResponseEntity testWithResultExample( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFileWithRequiredFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index d4656f9aa953..248b6e0608b0 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -57,6 +57,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClassname( @ApiParam(value = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index 2585f8e5e8b0..f2d7bb655a34 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -62,6 +62,7 @@ default Optional getRequest() { value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -99,6 +100,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) Optional apiKey @@ -139,6 +141,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status ) { @@ -194,6 +197,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { @@ -245,6 +249,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { @@ -300,6 +305,7 @@ default ResponseEntity getPetById( value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -337,6 +343,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -378,6 +385,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 3aaeb001372b..fc2985582875 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -54,6 +54,7 @@ default Optional getRequest() { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) + default ResponseEntity deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { @@ -87,6 +88,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -121,6 +123,7 @@ default ResponseEntity> getInventory( value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { @@ -168,6 +171,7 @@ default ResponseEntity getOrderById( produces = { "application/xml", "application/json" }, consumes = { "application/json" } ) + default ResponseEntity placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ) { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index f1e788a25ee0..9dc1ddab1657 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -53,6 +53,7 @@ default Optional getRequest() { value = "/user", consumes = { "application/json" } ) + default ResponseEntity createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user ) { @@ -82,6 +83,7 @@ default ResponseEntity createUser( value = "/user/createWithArray", consumes = { "application/json" } ) + default ResponseEntity createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -111,6 +113,7 @@ default ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = { "application/json" } ) + default ResponseEntity createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -141,6 +144,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { @@ -175,6 +179,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { @@ -222,6 +227,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password @@ -250,6 +256,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -282,6 +289,7 @@ default ResponseEntity logoutUser( value = "/user/{username}", consumes = { "application/json" } ) + default ResponseEntity updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java index 6054f5963bb2..f9a9b237c0ad 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java @@ -69,6 +69,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity call123testSpecialTags( @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index 3ddc4c175c7a..e9d943cdee9c 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -78,6 +78,7 @@ default Optional getRequest() { value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) + default ResponseEntity createXmlItem( @Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem ) { @@ -110,6 +111,7 @@ default ResponseEntity createXmlItem( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterBooleanSerialize( @Parameter(name = "body", description = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body ) { @@ -142,6 +144,7 @@ default ResponseEntity fakeOuterBooleanSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterCompositeSerialize( @Parameter(name = "OuterComposite", description = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite outerComposite ) { @@ -183,6 +186,7 @@ default ResponseEntity fakeOuterCompositeSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterNumberSerialize( @Parameter(name = "body", description = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body ) { @@ -215,6 +219,7 @@ default ResponseEntity fakeOuterNumberSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterStringSerialize( @Parameter(name = "body", description = "Input string as post body") @Valid @RequestBody(required = false) String body ) { @@ -244,6 +249,7 @@ default ResponseEntity fakeOuterStringSerialize( value = "/fake/{petId}/response-object-different-names", produces = { "application/json" } ) + default ResponseEntity responseObjectDifferentNames( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { @@ -282,6 +288,7 @@ default ResponseEntity responseObjectDiff value = "/fake/body-with-file-schema", consumes = { "application/json" } ) + default ResponseEntity testBodyWithFileSchema( @Parameter(name = "FileSchemaTestClass", description = "", required = true) @Valid @RequestBody FileSchemaTestClass fileSchemaTestClass ) { @@ -310,6 +317,7 @@ default ResponseEntity testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = { "application/json" } ) + default ResponseEntity testBodyWithQueryParams( @NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query, @Parameter(name = "User", description = "", required = true) @Valid @RequestBody User user @@ -344,6 +352,7 @@ default ResponseEntity testBodyWithQueryParams( produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClientModel( @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client ) { @@ -401,6 +410,7 @@ default ResponseEntity testClientModel( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEndpointParameters( @Parameter(name = "number", description = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @Parameter(name = "double", description = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -453,6 +463,7 @@ default ResponseEntity testEndpointParameters( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEnumParameters( @Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @@ -494,6 +505,7 @@ default ResponseEntity testEnumParameters( method = RequestMethod.DELETE, value = "/fake" ) + default ResponseEntity testGroupParameters( @NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, @@ -529,6 +541,7 @@ default ResponseEntity testGroupParameters( value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) + default ResponseEntity testInlineAdditionalProperties( @Parameter(name = "request_body", description = "request body", required = true) @Valid @RequestBody Map requestBody ) { @@ -560,6 +573,7 @@ default ResponseEntity testInlineAdditionalProperties( value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testJsonFormData( @Parameter(name = "param", description = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @Parameter(name = "param2", description = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 @@ -622,6 +636,7 @@ default ResponseEntity testNullable( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) + default ResponseEntity testQueryParameterCollectionFormat( @NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List http, @@ -655,6 +670,7 @@ default ResponseEntity testQueryParameterCollectionFormat( value = "/fake/response-with-example", produces = { "application/json" } ) + default ResponseEntity testWithResultExample( ) { @@ -702,6 +718,7 @@ default ResponseEntity testWithResultExample( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFileWithRequiredFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java index 61a6861c282e..2671d846df9a 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java @@ -72,6 +72,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClassname( @Parameter(name = "Client", description = "client model", required = true) @Valid @RequestBody Client client ) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java index 96df22adeb43..c19d7e98bf0e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java @@ -73,6 +73,7 @@ default Optional getRequest() { value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -108,6 +109,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey @@ -147,6 +149,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List status ) { @@ -202,6 +205,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set tags ) { @@ -256,6 +260,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId ) { @@ -309,6 +314,7 @@ default ResponseEntity getPetById( value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ) { @@ -344,6 +350,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -384,6 +391,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java index 3780fd4e0b3f..13e89f50f204 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java @@ -68,6 +68,7 @@ default Optional getRequest() { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) + default ResponseEntity deleteOrder( @Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId ) { @@ -102,6 +103,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -139,6 +141,7 @@ default ResponseEntity> getInventory( value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId ) { @@ -189,6 +192,7 @@ default ResponseEntity getOrderById( produces = { "application/xml", "application/json" }, consumes = { "application/json" } ) + default ResponseEntity placeOrder( @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java index adef91f65b1a..0324a3ddfe3d 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java @@ -67,6 +67,7 @@ default Optional getRequest() { value = "/user", consumes = { "application/json" } ) + default ResponseEntity createUser( @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user ) { @@ -97,6 +98,7 @@ default ResponseEntity createUser( value = "/user/createWithArray", consumes = { "application/json" } ) + default ResponseEntity createUsersWithArrayInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -127,6 +129,7 @@ default ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = { "application/json" } ) + default ResponseEntity createUsersWithListInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ) { @@ -158,6 +161,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { @@ -195,6 +199,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ) { @@ -245,6 +250,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password @@ -274,6 +280,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -307,6 +314,7 @@ default ResponseEntity logoutUser( value = "/user/{username}", consumes = { "application/json" } ) + default ResponseEntity updateUser( @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java index 0f02c6dd185a..b1e1c11f7072 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -54,6 +54,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity call123testSpecialTags( @ApiParam(value = "client model", required = true) @Valid @RequestBody ClientDto clientDto ) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index 6547d6369957..64bc1021c9bf 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -64,6 +64,7 @@ default Optional getRequest() { value = "/fake/create_xml_item", consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" } ) + default ResponseEntity createXmlItem( @ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItemDto xmlItemDto ) { @@ -95,6 +96,7 @@ default ResponseEntity createXmlItem( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterBooleanSerialize( @ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body ) { @@ -126,6 +128,7 @@ default ResponseEntity fakeOuterBooleanSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterCompositeSerialize( @ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterCompositeDto outerCompositeDto ) { @@ -166,6 +169,7 @@ default ResponseEntity fakeOuterCompositeSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterNumberSerialize( @ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body ) { @@ -197,6 +201,7 @@ default ResponseEntity fakeOuterNumberSerialize( produces = { "*/*" }, consumes = { "application/json" } ) + default ResponseEntity fakeOuterStringSerialize( @ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body ) { @@ -226,6 +231,7 @@ default ResponseEntity fakeOuterStringSerialize( value = "/fake/{petId}/response-object-different-names", produces = { "application/json" } ) + default ResponseEntity responseObjectDifferentNames( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId ) { @@ -264,6 +270,7 @@ default ResponseEntity responseObjectD value = "/fake/body-with-file-schema", consumes = { "application/json" } ) + default ResponseEntity testBodyWithFileSchema( @ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClassDto fileSchemaTestClassDto ) { @@ -293,6 +300,7 @@ default ResponseEntity testBodyWithFileSchema( value = "/fake/body-with-query-params", consumes = { "application/json" } ) + default ResponseEntity testBodyWithQueryParams( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query, @ApiParam(value = "", required = true) @Valid @RequestBody UserDto userDto @@ -325,6 +333,7 @@ default ResponseEntity testBodyWithQueryParams( produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClientModel( @ApiParam(value = "client model", required = true) @Valid @RequestBody ClientDto clientDto ) { @@ -381,6 +390,7 @@ default ResponseEntity testClientModel( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEndpointParameters( @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "number", required = true) BigDecimal number, @ApiParam(value = "None", required = true) @Valid @RequestParam(value = "double", required = true) Double _double, @@ -432,6 +442,7 @@ default ResponseEntity testEndpointParameters( value = "/fake", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testEnumParameters( @ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List enumHeaderStringArray, @ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString, @@ -472,6 +483,7 @@ default ResponseEntity testEnumParameters( method = RequestMethod.DELETE, value = "/fake" ) + default ResponseEntity testGroupParameters( @NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup, @NotNull @ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup, @@ -506,6 +518,7 @@ default ResponseEntity testGroupParameters( value = "/fake/inline-additionalProperties", consumes = { "application/json" } ) + default ResponseEntity testInlineAdditionalProperties( @ApiParam(value = "request body", required = true) @Valid @RequestBody Map requestBody ) { @@ -536,6 +549,7 @@ default ResponseEntity testInlineAdditionalProperties( value = "/fake/jsonFormData", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity testJsonFormData( @ApiParam(value = "field1", required = true) @Valid @RequestParam(value = "param", required = true) String param, @ApiParam(value = "field2", required = true) @Valid @RequestParam(value = "param2", required = true) String param2 @@ -597,6 +611,7 @@ default ResponseEntity testNullable( method = RequestMethod.PUT, value = "/fake/test-query-parameters" ) + default ResponseEntity testQueryParameterCollectionFormat( @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List pipe, @NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List http, @@ -629,6 +644,7 @@ default ResponseEntity testQueryParameterCollectionFormat( value = "/fake/response-with-example", produces = { "application/json" } ) + default ResponseEntity testWithResultExample( ) { @@ -677,6 +693,7 @@ default ResponseEntity testWithResultExample( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFileWithRequiredFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile, diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 34f4335f2f13..8b0aaf1d7d27 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -57,6 +57,7 @@ default Optional getRequest() { produces = { "application/json" }, consumes = { "application/json" } ) + default ResponseEntity testClassname( @ApiParam(value = "client model", required = true) @Valid @RequestBody ClientDto clientDto ) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index b8b35dd72272..323dabc8568d 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -62,6 +62,7 @@ default Optional getRequest() { value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity addPet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody PetDto petDto ) { @@ -99,6 +100,7 @@ default ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + default ResponseEntity deletePet( @ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey @@ -139,6 +141,7 @@ default ResponseEntity deletePet( value = "/pet/findByStatus", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List status ) { @@ -194,6 +197,7 @@ default ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = { "application/xml", "application/json" } ) + default ResponseEntity> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set tags ) { @@ -245,6 +249,7 @@ default ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getPetById( @ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId ) { @@ -300,6 +305,7 @@ default ResponseEntity getPetById( value = "/pet", consumes = { "application/json", "application/xml" } ) + default ResponseEntity updatePet( @ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody PetDto petDto ) { @@ -337,6 +343,7 @@ default ResponseEntity updatePet( value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" } ) + default ResponseEntity updatePetWithForm( @ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -378,6 +385,7 @@ default ResponseEntity updatePetWithForm( produces = { "application/json" }, consumes = { "multipart/form-data" } ) + default ResponseEntity uploadFile( @ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId, @ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index 539e6cda50b1..051ce4c42aa3 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -54,6 +54,7 @@ default Optional getRequest() { method = RequestMethod.DELETE, value = "/store/order/{order_id}" ) + default ResponseEntity deleteOrder( @ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId ) { @@ -87,6 +88,7 @@ default ResponseEntity deleteOrder( value = "/store/inventory", produces = { "application/json" } ) + default ResponseEntity> getInventory( ) { @@ -121,6 +123,7 @@ default ResponseEntity> getInventory( value = "/store/order/{order_id}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getOrderById( @Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId ) { @@ -168,6 +171,7 @@ default ResponseEntity getOrderById( produces = { "application/xml", "application/json" }, consumes = { "application/json" } ) + default ResponseEntity placeOrder( @ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody OrderDto orderDto ) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 1b3cdf967fdc..7d8ef02238b3 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -53,6 +53,7 @@ default Optional getRequest() { value = "/user", consumes = { "application/json" } ) + default ResponseEntity createUser( @ApiParam(value = "Created user object", required = true) @Valid @RequestBody UserDto userDto ) { @@ -82,6 +83,7 @@ default ResponseEntity createUser( value = "/user/createWithArray", consumes = { "application/json" } ) + default ResponseEntity createUsersWithArrayInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List userDto ) { @@ -111,6 +113,7 @@ default ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = { "application/json" } ) + default ResponseEntity createUsersWithListInput( @ApiParam(value = "List of user object", required = true) @Valid @RequestBody List userDto ) { @@ -141,6 +144,7 @@ default ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + default ResponseEntity deleteUser( @ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username ) { @@ -175,6 +179,7 @@ default ResponseEntity deleteUser( value = "/user/{username}", produces = { "application/xml", "application/json" } ) + default ResponseEntity getUserByName( @ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username ) { @@ -222,6 +227,7 @@ default ResponseEntity getUserByName( value = "/user/login", produces = { "application/xml", "application/json" } ) + default ResponseEntity loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password @@ -250,6 +256,7 @@ default ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + default ResponseEntity logoutUser( ) { @@ -282,6 +289,7 @@ default ResponseEntity logoutUser( value = "/user/{username}", consumes = { "application/json" } ) + default ResponseEntity updateUser( @ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username, @ApiParam(value = "Updated user object", required = true) @Valid @RequestBody UserDto userDto From 1bcf79236fc543baf2e909f07af5843f2f262bc1 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 21 Sep 2023 17:19:35 +0800 Subject: [PATCH 47/59] update samples --- .../src/main/java/org/openapitools/api/PetApi.java | 8 ++++++++ .../src/main/java/org/openapitools/api/StoreApi.java | 4 ++++ .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++++++ .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + .../main/java/org/openapitools/virtualan/api/FakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 1 + 17 files changed, 34 insertions(+) diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java index 0747d4119878..431b8861bfb6 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java @@ -62,6 +62,7 @@ public interface PetApi { value = "/pet", consumes = "application/json" ) + ResponseEntity addPet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ); @@ -91,6 +92,7 @@ ResponseEntity addPet( method = RequestMethod.DELETE, value = "/pet/{petId}" ) + ResponseEntity deletePet( @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey @@ -126,6 +128,7 @@ ResponseEntity deletePet( value = "/pet/findByStatus", produces = "application/json" ) + ResponseEntity> findPetsByStatus( @NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List status ); @@ -163,6 +166,7 @@ ResponseEntity> findPetsByStatus( value = "/pet/findByTags", produces = "application/json" ) + ResponseEntity> findPetsByTags( @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags ); @@ -199,6 +203,7 @@ ResponseEntity> findPetsByTags( value = "/pet/{petId}", produces = "application/json" ) + ResponseEntity getPetById( @Parameter(name = "petId", deprecated = true, description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") @Deprecated Long petId ); @@ -232,6 +237,7 @@ ResponseEntity getPetById( value = "/pet", consumes = "application/json" ) + ResponseEntity updatePet( @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet ); @@ -263,6 +269,7 @@ ResponseEntity updatePet( value = "/pet/{petId}", consumes = "application/x-www-form-urlencoded" ) + ResponseEntity updatePetWithForm( @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, @@ -299,6 +306,7 @@ ResponseEntity updatePetWithForm( produces = "application/json", consumes = "multipart/form-data" ) + ResponseEntity uploadFile( @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java index 65ce02af1be4..cd1427025e5c 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java @@ -60,6 +60,7 @@ public interface StoreApi { method = RequestMethod.DELETE, value = "/store/order/{orderId}" ) + ResponseEntity deleteOrder( @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId ); @@ -90,6 +91,7 @@ ResponseEntity deleteOrder( value = "/store/inventory", produces = "application/json" ) + ResponseEntity> getInventory( ); @@ -123,6 +125,7 @@ ResponseEntity> getInventory( value = "/store/order/{orderId}", produces = "application/json" ) + ResponseEntity getOrderById( @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId ); @@ -155,6 +158,7 @@ ResponseEntity getOrderById( produces = "application/json", consumes = "application/json" ) + ResponseEntity placeOrder( @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order ); diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java index 08e01a9b9e5a..6af526a12e98 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java @@ -62,6 +62,7 @@ public interface UserApi { value = "/user", consumes = "application/json" ) + ResponseEntity createUser( @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user ); @@ -91,6 +92,7 @@ ResponseEntity createUser( value = "/user/createWithArray", consumes = "application/json" ) + ResponseEntity createUsersWithArrayInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ); @@ -120,6 +122,7 @@ ResponseEntity createUsersWithArrayInput( value = "/user/createWithList", consumes = "application/json" ) + ResponseEntity createUsersWithListInput( @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List user ); @@ -150,6 +153,7 @@ ResponseEntity createUsersWithListInput( method = RequestMethod.DELETE, value = "/user/{username}" ) + ResponseEntity deleteUser( @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -183,6 +187,7 @@ ResponseEntity deleteUser( value = "/user/{username}", produces = "application/json" ) + ResponseEntity getUserByName( @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username ); @@ -215,6 +220,7 @@ ResponseEntity getUserByName( value = "/user/login", produces = "application/json" ) + ResponseEntity loginUser( @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, @NotNull @Parameter(name = "password", deprecated = true, description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) @Deprecated String password @@ -243,6 +249,7 @@ ResponseEntity loginUser( method = RequestMethod.GET, value = "/user/logout" ) + ResponseEntity logoutUser( ); @@ -275,6 +282,7 @@ ResponseEntity logoutUser( value = "/user/{username}", consumes = "application/json" ) + ResponseEntity updateUser( @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java index 1bcacb3f62ff..b322430fbd49 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java @@ -486,6 +486,7 @@ ResponseEntity testJsonFormData( value = "/fake/nullable", consumes = "application/json" ) + ResponseEntity testNullable( @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ); diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 0354411cc1fb..ec2981e02369 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -542,6 +542,7 @@ default ResponseEntity testJsonFormData( value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 480aa991b776..f9de7344ba4e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -587,6 +587,7 @@ default ResponseEntity testJsonFormData( value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java index 2d8c42243704..e2a4f6e93af1 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java @@ -514,6 +514,7 @@ ResponseEntity testJsonFormData( value = "/fake/nullable", consumes = { "application/json" } ) + ResponseEntity testNullable( @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) throws Exception; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 2585fd567706..00ece07e0c19 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -580,6 +580,7 @@ default ResponseEntity testJsonFormData( value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 2585fd567706..00ece07e0c19 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -580,6 +580,7 @@ default ResponseEntity testJsonFormData( value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index 59befce8d626..c45620b8dae1 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -535,6 +535,7 @@ default ResponseEntity testJsonFormData( value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 59befce8d626..c45620b8dae1 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -535,6 +535,7 @@ default ResponseEntity testJsonFormData( value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index c34845d52ae3..c1dca403316b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -580,6 +580,7 @@ default ResponseEntity testJsonFormData( value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java index adc9085a3db6..77fdd3109b36 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/api/FakeApi.java @@ -569,6 +569,7 @@ default Mono testJsonFormData( consumes = { "application/json" } ) @ResponseStatus(HttpStatus.OK) + default Mono testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody Mono childWithNullable, @ApiIgnore final ServerWebExchange exchange diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index e5963b170304..4916727a2dcb 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -554,6 +554,7 @@ default Mono> testJsonFormData( value = "/fake/nullable", consumes = { "application/json" } ) + default Mono> testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody Mono childWithNullable, @ApiIgnore final ServerWebExchange exchange diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index c159d9dd71aa..b7765e99b8f0 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -580,6 +580,7 @@ default ResponseEntity testJsonFormData( value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index e9d943cdee9c..cdabe80efd83 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -605,6 +605,7 @@ default ResponseEntity testJsonFormData( value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @Parameter(name = "ChildWithNullable", description = "request body", required = true) @Valid @RequestBody ChildWithNullable childWithNullable ) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index 64bc1021c9bf..770ca405dae0 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -580,6 +580,7 @@ default ResponseEntity testJsonFormData( value = "/fake/nullable", consumes = { "application/json" } ) + default ResponseEntity testNullable( @ApiParam(value = "request body", required = true) @Valid @RequestBody ChildWithNullableDto childWithNullableDto ) { From 29033bf62ac202b00ca70dc7bdcba5c58b6bd7f8 Mon Sep 17 00:00:00 2001 From: Luckl <4253475+Luckl@users.noreply.github.com> Date: Thu, 21 Sep 2023 12:10:47 +0200 Subject: [PATCH 48/59] Fix incorrect @InputFile on inputSpecRootDirectory argument (#16420) * 16419 fix incorrect InputFile on inputSpecRootDirectory argument of gradle-plugin * 16419 fix incorrect InputFile on inputSpecRootDirectory argument of gradle-plugin * 16419 fix incorrect InputFile on inputSpecRootDirectory argument of gradle-plugin * 16419 delete unused files --- .../gradle/plugin/tasks/GenerateTask.kt | 32 ++--- .../src/test/kotlin/GenerateTaskDslTest.kt | 71 ++++++++++++ .../test/resources/specs/petstore-v3.1.yaml | 109 ++++++++++++++++++ 3 files changed, 199 insertions(+), 13 deletions(-) create mode 100644 modules/openapi-generator-gradle-plugin/src/test/resources/specs/petstore-v3.1.yaml diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt index bb2380d0a613..3eeb5955a74b 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt @@ -107,7 +107,7 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac * Local root folder with spec files */ @Optional - @get:InputFile + @get:InputDirectory @PathSensitive(PathSensitivity.RELATIVE) val inputSpecRootDirectory = project.objects.property(); @@ -585,10 +585,22 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac @Suppress("unused") @TaskAction fun doWork() { - inputSpecRootDirectory.ifNotEmpty { inputSpecRootDirectoryValue -> { - inputSpec.set(MergedSpecBuilder(inputSpecRootDirectoryValue, mergedFileName.get()).buildMergedSpec()) - logger.info("Merge input spec would be used - {}", inputSpec.get()) - }} + var resolvedInputSpec = "" + + inputSpec.ifNotEmpty { value -> + resolvedInputSpec = value + } + + remoteInputSpec.ifNotEmpty { value -> + resolvedInputSpec = value + } + + inputSpecRootDirectory.ifNotEmpty { inputSpecRootDirectoryValue -> + run { + resolvedInputSpec = MergedSpecBuilder(inputSpecRootDirectoryValue, mergedFileName.getOrElse("merged")).buildMergedSpec() + logger.info("Merge input spec would be used - {}", resolvedInputSpec) + } + } cleanupOutput.ifNotEmpty { cleanup -> if (cleanup) { @@ -655,6 +667,8 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac logger.warn("Both inputSpec and remoteInputSpec is specified. The remoteInputSpec will take priority over inputSpec.") } + configurator.setInputSpec(resolvedInputSpec) + // now override with any specified parameters verbose.ifNotEmpty { value -> configurator.setVerbose(value) @@ -668,14 +682,6 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac configurator.setSkipOverwrite(value ?: false) } - inputSpec.ifNotEmpty { value -> - configurator.setInputSpec(value) - } - - remoteInputSpec.ifNotEmpty { value -> - configurator.setInputSpec(value) - } - generatorName.ifNotEmpty { value -> configurator.setGeneratorName(value) } diff --git a/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt b/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt index a4f288d34a64..30a725f70e08 100644 --- a/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt +++ b/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt @@ -4,7 +4,9 @@ import org.gradle.testkit.runner.GradleRunner import org.gradle.testkit.runner.TaskOutcome import org.testng.annotations.Test import java.io.File +import java.nio.file.Files.createDirectory import java.nio.file.Files.createTempDirectory +import java.nio.file.Paths import kotlin.test.assertEquals import kotlin.test.assertFalse import kotlin.test.assertTrue @@ -88,6 +90,75 @@ class GenerateTaskDslTest : TestBase() { ) } + @Test + fun `openApiGenerate should create an expected file structure from root directory config`() { + val projectFiles = mapOf( + "spec.yaml" to javaClass.classLoader.getResourceAsStream("specs/petstore-v3.0.yaml"), + "spec-2.yaml" to javaClass.classLoader.getResourceAsStream("specs/petstore-v3.1.yaml") + ) + + // Arrange + val buildContents = """ + plugins { + id 'org.openapi.generator' + } + openApiGenerate { + generatorName = "kotlin" + inputSpecRootDirectory = file("specs").absolutePath + outputDir = file("build/kotlin").absolutePath + apiPackage = "org.openapitools.example.api" + invokerPackage = "org.openapitools.example.invoker" + modelPackage = "org.openapitools.example.model" + configOptions = [ + dateLibrary: "java8" + ] + } + """.trimIndent() + val tempContractDirectory: File = createDirectory(Paths.get("${temp.path}/specs")).toFile() + + File(temp, "build.gradle").writeText(buildContents) + projectFiles.forEach { entry -> + val target = File(tempContractDirectory, entry.key) + entry.value?.copyTo(target.outputStream()) + } + + // Act + val result = GradleRunner.create() + .withProjectDir(temp) + .withArguments("openApiGenerate", "--stacktrace") + .withPluginClasspath() + .build() + + // Assert + assertTrue( + result.output.contains("Successfully generated code to"), + "User friendly generate notice is missing." + ) + + listOf( + "build/kotlin/.openapi-generator-ignore", + "build/kotlin/docs/PetsApi.md", + "build/kotlin/docs/Error.md", + "build/kotlin/docs/Pet.md", + "build/kotlin/README.md", + "build/kotlin/build.gradle", + "build/kotlin/.openapi-generator/VERSION", + "build/kotlin/settings.gradle", + "build/kotlin/src/main/kotlin/org/openapitools/example/model/Pet.kt", + "build/kotlin/src/main/kotlin/org/openapitools/example/model/Error.kt", + "build/kotlin/src/main/kotlin/org/openapitools/example/api/PetsApi.kt", + "build/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt" + ).map { + val f = File(temp, it) + assertTrue(f.exists() && f.isFile, "An expected file was not generated when invoking the generation: $f") + } + + assertEquals( + TaskOutcome.SUCCESS, result.task(":openApiGenerate")?.outcome, + "Expected a successful run, but found ${result.task(":openApiGenerate")?.outcome}" + ) + } + @Test fun `openApiGenerate should create an expected file structure from DSL config`() { // Arrange diff --git a/modules/openapi-generator-gradle-plugin/src/test/resources/specs/petstore-v3.1.yaml b/modules/openapi-generator-gradle-plugin/src/test/resources/specs/petstore-v3.1.yaml new file mode 100644 index 000000000000..0a8d3d15973c --- /dev/null +++ b/modules/openapi-generator-gradle-plugin/src/test/resources/specs/petstore-v3.1.yaml @@ -0,0 +1,109 @@ +openapi: "3.0.0" +info: + version: 1.0.0 + title: Swagger Petstore + license: + name: MIT +servers: + - url: http://petstore.swagger.io/v1 +paths: + /v3/pets: + get: + summary: List all pets + operationId: listPets + tags: + - pets + parameters: + - name: limit + in: query + description: How many items to return at one time (max 100) + required: false + schema: + type: integer + format: int32 + responses: + '200': + description: A paged array of pets + headers: + x-next: + description: A link to the next page of responses + schema: + type: string + content: + application/json: + schema: + $ref: "#/components/schemas/Pets" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + post: + summary: Create a pet + operationId: createPets + tags: + - pets + responses: + '201': + description: Null response + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /v3/pets/{petId}: + get: + summary: Info for a specific pet + operationId: showPetById + tags: + - pets + parameters: + - name: petId + in: path + required: true + description: The id of the pet to retrieve + schema: + type: string + responses: + '200': + description: Expected response to a valid request + content: + application/json: + schema: + $ref: "#/components/schemas/Pets" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" +components: + schemas: + Pet: + required: + - id + - name + properties: + id: + type: integer + format: int64 + name: + type: string + tag: + type: string + Pets: + type: array + items: + $ref: "#/components/schemas/Pet" + Error: + required: + - code + - message + properties: + code: + type: integer + format: int32 + message: + type: string From cf1781f467df78cab2a7430362c007f8bf056b05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Fri, 22 Sep 2023 10:33:28 +0900 Subject: [PATCH 49/59] [python] replace __fields_set__ with model_fields_set --- .../src/main/resources/python/model_generic.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/python/model_generic.mustache b/modules/openapi-generator/src/main/resources/python/model_generic.mustache index 8c3ca8f4dfb5..4a48d86f1fd7 100644 --- a/modules/openapi-generator/src/main/resources/python/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_generic.mustache @@ -226,7 +226,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{#isNullable}} # set to None if {{{name}}} (nullable) is None # and __fields_set__ contains the field - if self.{{name}} is None and "{{{name}}}" in self.__fields_set__: + if self.{{name}} is None and "{{{name}}}" in self.{{#usePydanticV2}}model_fields_set{{/usePydanticV2}}{{^usePydanticV2}}__fields_set__{{/usePydanticV2}}: _dict['{{{baseName}}}'] = None {{/isNullable}} From 6e43dd95f3cfdb673816ca50ad97e921b4866a43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Fri, 22 Sep 2023 11:08:50 +0900 Subject: [PATCH 50/59] [python] replace getheaders with headers --- .../src/main/resources/python/api_client.mustache | 8 ++++++-- .../src/main/resources/python/exceptions.mustache | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/api_client.mustache b/modules/openapi-generator/src/main/resources/python/api_client.mustache index 0ee7a38c4c90..ef082f8615a7 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -237,6 +237,7 @@ class ApiClient: self.last_response = response_data return_data = None # assuming deserialization is not needed + return_headers = None # data needs deserialization or returns HTTP data (deserialized) only if _preload_content or _return_http_data_only: response_type = response_types_map.get(str(response_data.status), None) @@ -257,10 +258,13 @@ class ApiClient: # deserialize response data if response_type == "bytearray": return_data = response_data.data + return_headers = response_data.headers elif response_type: return_data = self.deserialize(response_data, response_type) + return_headers = response_data.getheaders() else: return_data = None + return_headers = response_data.getheaders() {{^tornado}} if _return_http_data_only: @@ -268,7 +272,7 @@ class ApiClient: else: return ApiResponse(status_code = response_data.status, data = return_data, - headers = response_data.headers, + headers = return_headers, raw_data = response_data.data) {{/tornado}} {{#tornado}} @@ -277,7 +281,7 @@ class ApiClient: else: raise tornado.gen.Return(ApiResponse(status_code = response_data.status, data = return_data, - headers = response_data.headers, + headers = response_data.getheaders(), raw_data = response_data.data)) {{/tornado}} diff --git a/modules/openapi-generator/src/main/resources/python/exceptions.mustache b/modules/openapi-generator/src/main/resources/python/exceptions.mustache index ceab49dccec9..8a155a9fe08e 100644 --- a/modules/openapi-generator/src/main/resources/python/exceptions.mustache +++ b/modules/openapi-generator/src/main/resources/python/exceptions.mustache @@ -96,7 +96,7 @@ class ApiException(OpenApiException): self.status = http_resp.status self.reason = http_resp.reason self.body = http_resp.data - self.headers = http_resp.headers + self.headers = http_resp.getheaders() else: self.status = status self.reason = reason From 2a38bbf982e3011bef2872c7739a7644e6d43770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Fri, 22 Sep 2023 11:40:16 +0900 Subject: [PATCH 51/59] [python] replace update_forward_refs with model_rebuild --- .../src/main/resources/python/api_doc_example.mustache | 2 +- .../src/main/resources/python/model_anyof.mustache | 2 +- .../src/main/resources/python/model_generic.mustache | 2 +- .../src/main/resources/python/model_oneof.mustache | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache b/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache index 15fbe332696a..99855d3ee392 100644 --- a/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache @@ -34,5 +34,5 @@ from pprint import pprint {{#vendorExtensions.x-py-postponed-example-imports}} {{{.}}} {{/vendorExtensions.x-py-postponed-example-imports}} -{{classname}}.update_forward_refs() +{{classname}}.{{#usePydanticV2}}model_rebuild{{/usePydanticV2}}{{^usePydanticV2}}update_forward_refs{{/usePydanticV2}}() {{/vendorExtensions.x-py-postponed-example-imports.size}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache index 29b04f5ad242..5c0c9e5f2604 100644 --- a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache @@ -199,5 +199,5 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{#vendorExtensions.x-py-postponed-model-imports}} {{{.}}} {{/vendorExtensions.x-py-postponed-model-imports}} -{{classname}}.update_forward_refs() +{{classname}}.{{#usePydanticV2}}model_rebuild{{/usePydanticV2}}{{^usePydanticV2}}update_forward_refs{{/usePydanticV2}}() {{/vendorExtensions.x-py-postponed-model-imports.size}} diff --git a/modules/openapi-generator/src/main/resources/python/model_generic.mustache b/modules/openapi-generator/src/main/resources/python/model_generic.mustache index 4a48d86f1fd7..dbd266ab9c24 100644 --- a/modules/openapi-generator/src/main/resources/python/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_generic.mustache @@ -375,5 +375,5 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{#vendorExtensions.x-py-postponed-model-imports}} {{{.}}} {{/vendorExtensions.x-py-postponed-model-imports}} -{{classname}}.update_forward_refs() +{{classname}}.{{#usePydanticV2}}model_rebuild{{/usePydanticV2}}{{^usePydanticV2}}update_forward_refs{{/usePydanticV2}}() {{/vendorExtensions.x-py-postponed-model-imports.size}} diff --git a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache index deff859d13da..3eff1ab07b0e 100644 --- a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache @@ -226,5 +226,5 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{#vendorExtensions.x-py-postponed-model-imports}} {{{.}}} {{/vendorExtensions.x-py-postponed-model-imports}} -{{classname}}.update_forward_refs() +{{classname}}.{{#usePydanticV2}}model_rebuild{{/usePydanticV2}}{{^usePydanticV2}}update_forward_refs{{/usePydanticV2}}() {{/vendorExtensions.x-py-postponed-model-imports.size}} From 335761f07c833f67b478d7a88f85afda9ccc724b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Sun, 24 Sep 2023 00:36:37 +0900 Subject: [PATCH 52/59] [python] remove __properties MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- .../src/main/resources/python/model_generic.mustache | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/model_generic.mustache b/modules/openapi-generator/src/main/resources/python/model_generic.mustache index dbd266ab9c24..bffa6ee9fb57 100644 --- a/modules/openapi-generator/src/main/resources/python/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_generic.mustache @@ -20,7 +20,6 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{#isAdditionalPropertiesTrue}} additional_properties: Dict[str, Any] = {} {{/isAdditionalPropertiesTrue}} - __properties = [{{#allVars}}"{{baseName}}"{{^-last}}, {{/-last}}{{/allVars}}] {{#vars}} {{#vendorExtensions.x-regex}} @@ -260,7 +259,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{^isAdditionalPropertiesTrue}} # raise errors for additional fields in the input for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in [{{#allVars}}"{{{baseName}}}"{{^-last}}, {{/-last}}{{/allVars}}]: raise ValueError("Error due to additional fields (not defined in {{classname}}) in the input: " + obj) {{/isAdditionalPropertiesTrue}} @@ -364,7 +363,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{#isAdditionalPropertiesTrue}} # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in [{{#allVars}}"{{{baseName}}}"{{^-last}}, {{/-last}}{{/allVars}}]: _obj.additional_properties[_key] = obj.get(_key) {{/isAdditionalPropertiesTrue}} From 4fa39c73d445eff0a50f5d7854d7e283c9569af2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Sun, 24 Sep 2023 02:38:28 +0900 Subject: [PATCH 53/59] [python] fix private property not initialized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- .../resources/python/model_anyof.mustache | 10 +------ .../resources/python/model_generic.mustache | 27 ++++++++----------- .../resources/python/model_oneof.mustache | 8 ------ 3 files changed, 12 insertions(+), 33 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache index 5c0c9e5f2604..5a3b9efb3623 100644 --- a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache @@ -50,14 +50,6 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} class Config: validate_assignment = True {{/usePydanticV2}} -{{#discriminator}} - - discriminator_value_class_map: dict[str, str] = { -{{#children}} - '{{^vendorExtensions.x-discriminator-value}}{{name}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}': '{{{classname}}}'{{^-last}},{{/-last}} -{{/children}} - } -{{/discriminator}} def __init__(self, *args, **kwargs) -> None: if args: @@ -67,7 +59,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) else: - super().__init__(**kwargs) + super().__init__(**kwargs, actual_instance=None) {{#usePydanticV2}} @field_validator('actual_instance') {{/usePydanticV2}} diff --git a/modules/openapi-generator/src/main/resources/python/model_generic.mustache b/modules/openapi-generator/src/main/resources/python/model_generic.mustache index bffa6ee9fb57..af5d4be052b2 100644 --- a/modules/openapi-generator/src/main/resources/python/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_generic.mustache @@ -98,27 +98,19 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{#hasChildren}} {{#discriminator}} # JSON field name that stores the object type - __discriminator_property_name = '{{discriminator.propertyBaseName}}' - - {{#mappedModels}} - {{#-first}} - # discriminator mappings - __discriminator_value_class_map: dict[str, str] = { - {{/-first}} - '{{{mappingName}}}': '{{{modelName}}}'{{^-last}},{{/-last}} - {{#-last}} - } @classmethod def get_discriminator_value(cls, obj: dict) -> str: """Returns the discriminator value (object type) of the data""" - discriminator_value = obj[cls.__discriminator_property_name] + discriminator_value = obj['{{discriminator.propertyBaseName}}'] + discriminator_value_class_map = { + {{#mappedModels}}'{{{mappingName}}}': '{{{modelName}}}'{{^-last}},{{/-last}}{{/mappedModels}} + } + if discriminator_value: - return cls.__discriminator_value_class_map.get(discriminator_value) + return discriminator_value_class_map.get(discriminator_value) else: return None - {{/-last}} - {{/mappedModels}} {{/discriminator}} {{/hasChildren}} @@ -239,13 +231,16 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{#discriminator}} # look up the object type based on discriminator mapping object_type = cls.get_discriminator_value(obj) + discriminator_value_class_map = { + {{#mappedModels}}'{{{mappingName}}}': '{{{modelName}}}'{{^-last}},{{/-last}}{{/mappedModels}} + } if object_type: klass = globals()[object_type] return klass.from_dict(obj) else: raise ValueError("{{{classname}}} failed to lookup discriminator value from " + - json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + - ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) + json.dumps(obj) + ". Discriminator property name: " + '{{discriminator.propertyBaseName}}' + + ", mapping: " + json.dumps(discriminator_value_class_map)) {{/discriminator}} {{/hasChildren}} {{^hasChildren}} diff --git a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache index 3eff1ab07b0e..949f6510dc66 100644 --- a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache @@ -50,14 +50,6 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} class Config: validate_assignment = True {{/usePydanticV2}} -{{#discriminator}} - - discriminator_value_class_map: dict[str, str] = { -{{#children}} - '{{^vendorExtensions.x-discriminator-value}}{{name}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}': '{{{classname}}}'{{^-last}},{{/-last}} -{{/children}} - } -{{/discriminator}} def __init__(self, *args, **kwargs) -> None: if args: From b82dbfd3402b5e45cbb4b6143b11fc63c166b316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Sun, 24 Sep 2023 06:24:40 +0900 Subject: [PATCH 54/59] [python] update test cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- .../tests/test_api_validation.py | 14 ++++++----- .../python-pydantic-v2/tests/test_model.py | 25 ++++++++++--------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/tests/test_api_validation.py b/samples/openapi3/client/petstore/python-pydantic-v2/tests/test_api_validation.py index dc7da96329c0..c14d5b572af6 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/tests/test_api_validation.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/tests/test_api_validation.py @@ -51,23 +51,25 @@ def test_required_param_validation(self): try: self.pet_api.get_pet_by_id() except ValidationError as e: - self.assertEqual(str(e), "1 validation error for GetPetById\n" + self.assertEqual(str(e), "1 validation error for get_pet_by_id\n" "pet_id\n" - " field required (type=value_error.missing)") + " Missing required argument [type=missing_argument, input_value=ArgsKwargs(()), input_type=ArgsKwargs]\n" + " For further information visit https://errors.pydantic.dev/2.3/v/missing_argument") def test_integer_validation(self): try: self.pet_api.get_pet_by_id("123") except ValidationError as e: - self.assertEqual(str(e), "1 validation error for GetPetById\n" - "pet_id\n" - " value is not a valid integer (type=type_error.integer)") + self.assertEqual(str(e), "1 validation error for get_pet_by_id\n" + "0\n" + " Input should be a valid integer [type=int_type, input_value='123', input_type=str]\n"+ + " For further information visit https://errors.pydantic.dev/2.3/v/int_type") def test_string_enum_validation(self): try: self.pet_api.find_pets_by_status(["Cat"]) except ValidationError as e: - self.assertEqual(str(e), "1 validation error for FindPetsByStatus\n" + self.assertEqual(str(e), "1 validation error for find_pets_by_status\n" "status -> 0\n" " unexpected value; permitted: 'available', 'pending', 'sold' (" "type=value_error.const; given=Cat; permitted=('available', 'pending', 'sold'))") diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/tests/test_model.py b/samples/openapi3/client/petstore/python-pydantic-v2/tests/test_model.py index 01d5d001fab8..1180dc74af83 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/tests/test_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/tests/test_model.py @@ -93,12 +93,12 @@ def test_oneOf_array_of_integers(self): try: new_color.oneof_schema_1_validator = array_of_integers except ValueError as e: - self.assertTrue("ensure this value is less than or equal to 255" in str(e)) + self.assertTrue("1 validation error for Color" in str(e)) try: new_color.actual_instance = array_of_integers except ValueError as e: - self.assertTrue("ensure this value is less than or equal to 255" in str(e)) + self.assertTrue("1 validation error for Color" in str(e)) # test from_josn json_str = '[12,34,56]' @@ -108,7 +108,7 @@ def test_oneOf_array_of_integers(self): try: p = petstore_api.Color.from_json('[2342112,0,0,0]') except ValueError as e: - self.assertTrue("ensure this value is less than or equal to 255" in str(e)) + self.assertTrue("1 validation error for Color" in str(e)) # test to_json, to_dict method json_str = '[12,34,56]' @@ -170,12 +170,12 @@ def test_anyOf_array_of_integers(self): try: new_color.anyof_schema_1_validator = array_of_integers except ValueError as e: - self.assertTrue("ensure this value is less than or equal to 255" in str(e)) + self.assertTrue("1 validation error for AnyOfColor" in str(e)) try: new_color.actual_instance = array_of_integers except ValueError as e: - self.assertTrue("ensure this value is less than or equal to 255" in str(e)) + self.assertTrue("1 validation error for AnyOfColor" in str(e)) # test from_josn json_str = '[12,34,56]' @@ -185,7 +185,7 @@ def test_anyOf_array_of_integers(self): try: p = petstore_api.AnyOfColor.from_json('[2342112,0,0,0]') except ValueError as e: - self.assertTrue("ensure this value is less than or equal to 255" in str(e)) + self.assertTrue("1 validation error for AnyOfColor" in str(e)) def test_oneOf(self): # test new Pig @@ -321,9 +321,10 @@ def test_list(self): except ValueError as e: #error_message = ( # "1 validation error for List\n" - # "123-list\n" - # " str type expected (type=type_error.str)\n") - self.assertTrue("str type expected" in str(e)) + # "var_123_list\n" + # " Input should be a valid string [type=string_type, input_value=123, input_type=int]\n" + # " For further information visit https://errors.pydantic.dev/2.3/v/string_type + self.assertTrue("Input should be a valid string" in str(e)) l = petstore_api.List(var_123_list="bulldog") self.assertEqual(l.to_json(), '{"123-list": "bulldog"}') @@ -348,9 +349,9 @@ def test_enum_ref_property(self): d4 = petstore_api.OuterObjectWithEnumProperty(value=petstore_api.OuterEnumInteger.NUMBER_1, str_value=None) self.assertEqual(d4.to_json(), '{"value": 1, "str_value": null}') d5 = petstore_api.OuterObjectWithEnumProperty(value=petstore_api.OuterEnumInteger.NUMBER_1) - self.assertEqual(d5.__fields_set__, {'value'}) + self.assertEqual(d5.model_fields_set, {'value'}) d5.str_value = None # set None explicitly - self.assertEqual(d5.__fields_set__, {'value', 'str_value'}) + self.assertEqual(d5.model_fields_set, {'value', 'str_value'}) self.assertEqual(d5.to_json(), '{"value": 1, "str_value": null}') def test_valdiator(self): @@ -482,7 +483,7 @@ def test_int_or_string_oneof(self): try: a = petstore_api.IntOrString(1) except ValueError as e: - self.assertTrue("ensure this value is greater than or equal to 10" in str(e)) + self.assertTrue("1 validation error for IntOrString" in str(e)) def test_map_of_array_of_model(self): a = petstore_api.MapOfArrayOfModel() From 4b6d91fb6a7001d342f4d6588ef758a3f8cfdbfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Sun, 24 Sep 2023 08:23:02 +0900 Subject: [PATCH 55/59] [python] fix validation error for oneOf and anyOf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- .../resources/python/model_anyof.mustache | 18 ++++++---------- .../resources/python/model_oneof.mustache | 21 +++++++++---------- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache index 5a3b9efb3623..bf2ac0034b0b 100644 --- a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache @@ -30,9 +30,9 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{vendorExtensions.x-py-name}}: {{{vendorExtensions.x-py-typing}}} {{/composedSchemas.anyOf}} if TYPE_CHECKING: - actual_instance: Union[{{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}] + actual_instance: Union[{{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}{{#isNullable}}, None{{/isNullable}}] else: - actual_instance: Any + actual_instance: Any = None {{^usePydanticV2}} any_of_schemas: List[str] = Field({{#lambda.uppercase}}{{{classname}}}{{/lambda.uppercase}}_ANY_OF_SCHEMAS, const=True) {{/usePydanticV2}} @@ -58,8 +58,11 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) + elif kwargs: + super().__init__(**kwargs) else: - super().__init__(**kwargs, actual_instance=None) + super().__init__(actual_instance=None) + {{#usePydanticV2}} @field_validator('actual_instance') {{/usePydanticV2}} @@ -84,20 +87,11 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} error_messages.append(str(e)) {{/isContainer}} {{^isContainer}} - {{#isPrimitiveType}} try: instance.{{vendorExtensions.x-py-name}} = v return v except (ValidationError, ValueError) as e: error_messages.append(str(e)) - {{/isPrimitiveType}} - {{^isPrimitiveType}} - if not isinstance(v, {{{dataType}}}): - error_messages.append(f"Error! Input type `{type(v)}` is not `{{{dataType}}}`") - else: - return v - - {{/isPrimitiveType}} {{/isContainer}} {{/composedSchemas.anyOf}} if error_messages: diff --git a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache index 949f6510dc66..d8eeb968278f 100644 --- a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache @@ -29,9 +29,9 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{vendorExtensions.x-py-name}}: {{{vendorExtensions.x-py-typing}}} {{/composedSchemas.oneOf}} if TYPE_CHECKING: - actual_instance: Union[{{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}] + actual_instance: Union[{{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}{{#isNullable}}, None{{/isNullable}}] else: - actual_instance: Any + actual_instance: Any = None {{#usePydanticV2}} one_of_schemas: List[str] = Literal[{{#oneOf}}"{{.}}"{{^-last}}, {{/-last}}{{/oneOf}}] @@ -58,8 +58,11 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) + {{#usePydanticV2}} @field_validator('actual_instance') {{/usePydanticV2}} @@ -85,23 +88,17 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} error_messages.append(str(e)) {{/isContainer}} {{^isContainer}} - {{#isPrimitiveType}} try: instance.{{vendorExtensions.x-py-name}} = v match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - {{/isPrimitiveType}} - {{^isPrimitiveType}} - if not isinstance(v, {{{dataType}}}): - error_messages.append(f"Error! Input type `{type(v)}` is not `{{{dataType}}}`") - else: - match += 1 - {{/isPrimitiveType}} {{/isContainer}} {{/composedSchemas.oneOf}} if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when setting `actual_instance` in {{{classname}}} with oneOf schemas: {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}. Details: " + ", ".join(error_messages)) elif match == 0: # no match @@ -180,6 +177,8 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when deserializing the JSON string into {{{classname}}} with oneOf schemas: {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}. Details: " + ", ".join(error_messages)) elif match == 0: # no match From f36b5400a6810f01997c6b8e8983a8433bf13899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Sun, 24 Sep 2023 08:23:21 +0900 Subject: [PATCH 56/59] [python] update test cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- .../petstore/python-pydantic-v2/tests/test_model.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/tests/test_model.py b/samples/openapi3/client/petstore/python-pydantic-v2/tests/test_model.py index 1180dc74af83..fb62780a254f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/tests/test_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/tests/test_model.py @@ -291,13 +291,14 @@ def test_anyOf(self): p2 = petstore_api.AnyOfPig.from_json("1") self.assertTrue(False) # this line shouldn't execute except ValueError as e: + self.maxDiff = None error_message = ( "No match found when deserializing the JSON string into AnyOfPig with anyOf schemas: BasquePig, " "DanishPig. Details: 1 validation error for BasquePig\n" - "__root__\n" - " BasquePig expected dict not int (type=type_error), 1 validation error for DanishPig\n" - "__root__\n" - " DanishPig expected dict not int (type=type_error)") + " Input should be a valid dictionary or instance of BasquePig [type=model_type, input_value=1, input_type=int]\n" + " For further information visit https://errors.pydantic.dev/2.3/v/model_type, 1 validation error for DanishPig\n" + " Input should be a valid dictionary or instance of DanishPig [type=model_type, input_value=1, input_type=int]\n" + " For further information visit https://errors.pydantic.dev/2.3/v/model_type") self.assertEqual(str(e), error_message) # test to_json From fc3e0249351f114ba8e10d131d9487d8d9ba3a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Sun, 24 Sep 2023 08:56:35 +0900 Subject: [PATCH 57/59] [python] update circular import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- .../resources/python/api_doc_example.mustache | 5 ++- .../resources/python/model_anyof.mustache | 5 ++- .../resources/python/model_generic.mustache | 5 ++- .../resources/python/model_oneof.mustache | 5 ++- ...points-models-for-testing-pydantic-v2.yaml | 42 +++++++++---------- 5 files changed, 37 insertions(+), 25 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache b/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache index 99855d3ee392..b6fe413d1001 100644 --- a/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache @@ -34,5 +34,8 @@ from pprint import pprint {{#vendorExtensions.x-py-postponed-example-imports}} {{{.}}} {{/vendorExtensions.x-py-postponed-example-imports}} -{{classname}}.{{#usePydanticV2}}model_rebuild{{/usePydanticV2}}{{^usePydanticV2}}update_forward_refs{{/usePydanticV2}}() +try: + {{classname}}.{{#usePydanticV2}}model_rebuild{{/usePydanticV2}}{{^usePydanticV2}}update_forward_refs{{/usePydanticV2}}() +except Exception: + pass {{/vendorExtensions.x-py-postponed-example-imports.size}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache index bf2ac0034b0b..ccf005ba3f55 100644 --- a/modules/openapi-generator/src/main/resources/python/model_anyof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_anyof.mustache @@ -185,5 +185,8 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{#vendorExtensions.x-py-postponed-model-imports}} {{{.}}} {{/vendorExtensions.x-py-postponed-model-imports}} -{{classname}}.{{#usePydanticV2}}model_rebuild{{/usePydanticV2}}{{^usePydanticV2}}update_forward_refs{{/usePydanticV2}}() +try: + {{classname}}.{{#usePydanticV2}}model_rebuild{{/usePydanticV2}}{{^usePydanticV2}}update_forward_refs{{/usePydanticV2}}() +except Exception: + pass {{/vendorExtensions.x-py-postponed-model-imports.size}} diff --git a/modules/openapi-generator/src/main/resources/python/model_generic.mustache b/modules/openapi-generator/src/main/resources/python/model_generic.mustache index af5d4be052b2..f6b10ebeeb31 100644 --- a/modules/openapi-generator/src/main/resources/python/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_generic.mustache @@ -369,5 +369,8 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{#vendorExtensions.x-py-postponed-model-imports}} {{{.}}} {{/vendorExtensions.x-py-postponed-model-imports}} -{{classname}}.{{#usePydanticV2}}model_rebuild{{/usePydanticV2}}{{^usePydanticV2}}update_forward_refs{{/usePydanticV2}}() +try: + {{classname}}.{{#usePydanticV2}}model_rebuild{{/usePydanticV2}}{{^usePydanticV2}}update_forward_refs{{/usePydanticV2}}() +except Exception: + pass {{/vendorExtensions.x-py-postponed-model-imports.size}} diff --git a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache index d8eeb968278f..40dd820edb6b 100644 --- a/modules/openapi-generator/src/main/resources/python/model_oneof.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_oneof.mustache @@ -217,5 +217,8 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}} {{#vendorExtensions.x-py-postponed-model-imports}} {{{.}}} {{/vendorExtensions.x-py-postponed-model-imports}} -{{classname}}.{{#usePydanticV2}}model_rebuild{{/usePydanticV2}}{{^usePydanticV2}}update_forward_refs{{/usePydanticV2}}() +try: + {{classname}}.{{#usePydanticV2}}model_rebuild{{/usePydanticV2}}{{^usePydanticV2}}update_forward_refs{{/usePydanticV2}}() +except Exception: + pass {{/vendorExtensions.x-py-postponed-model-imports.size}} diff --git a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-pydantic-v2.yaml b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-pydantic-v2.yaml index 4fe96df00525..9a509f711008 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-pydantic-v2.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-pydantic-v2.yaml @@ -2197,27 +2197,27 @@ components: properties: optionalDict: $ref: "#/components/schemas/DictWithAdditionalProperties" - #Circular-Reference-Model: - # type: object - # properties: - # size: - # type: integer - # nested: - # $ref: '#/components/schemas/FirstRef' - #FirstRef: - # type: object - # properties: - # category: - # type: string - # self_ref: - # $ref: '#/components/schemas/SecondRef' - #SecondRef: - # type: object - # properties: - # category: - # type: string - # circular_ref: - # $ref: '#/components/schemas/Circular-Reference-Model' + Circular-Reference-Model: + type: object + properties: + size: + type: integer + nested: + $ref: '#/components/schemas/FirstRef' + FirstRef: + type: object + properties: + category: + type: string + self_ref: + $ref: '#/components/schemas/SecondRef' + SecondRef: + type: object + properties: + category: + type: string + circular_ref: + $ref: '#/components/schemas/Circular-Reference-Model' InnerDictWithAdditionalProperties: type: object additionalProperties: From 99b39eed09b1af1a018af4bb1232b4620a1990b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Sun, 24 Sep 2023 08:59:33 +0900 Subject: [PATCH 58/59] [python] update samples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- .../python/openapi_client/api_client.py | 6 +- .../python/openapi_client/models/bird.py | 1 - .../python/openapi_client/models/category.py | 1 - .../openapi_client/models/data_query.py | 1 - .../openapi_client/models/default_value.py | 1 - .../models/number_properties_only.py | 1 - .../python/openapi_client/models/pet.py | 1 - .../python/openapi_client/models/query.py | 1 - .../python/openapi_client/models/tag.py | 1 - ...ue_object_all_of_query_object_parameter.py | 1 - ...rue_array_string_query_object_parameter.py | 1 - .../python-aiohttp/petstore_api/api_client.py | 6 +- .../models/additional_properties_any_type.py | 3 +- .../models/additional_properties_class.py | 1 - .../models/additional_properties_object.py | 3 +- ...tional_properties_with_description_only.py | 3 +- .../models/all_of_with_single_ref.py | 1 - .../petstore_api/models/animal.py | 28 +++++---- .../petstore_api/models/any_of_color.py | 6 +- .../petstore_api/models/any_of_pig.py | 22 +++---- .../petstore_api/models/api_response.py | 1 - .../models/array_of_array_of_model.py | 1 - .../models/array_of_array_of_number_only.py | 1 - .../models/array_of_number_only.py | 1 - .../petstore_api/models/array_test.py | 1 - .../petstore_api/models/basque_pig.py | 1 - .../petstore_api/models/capitalization.py | 1 - .../python-aiohttp/petstore_api/models/cat.py | 1 - .../petstore_api/models/category.py | 1 - .../models/circular_reference_model.py | 6 +- .../petstore_api/models/class_model.py | 1 - .../petstore_api/models/client.py | 1 - .../petstore_api/models/color.py | 12 +++- .../petstore_api/models/creature.py | 1 - .../petstore_api/models/creature_info.py | 1 - .../petstore_api/models/danish_pig.py | 1 - .../petstore_api/models/deprecated_object.py | 1 - .../python-aiohttp/petstore_api/models/dog.py | 1 - .../petstore_api/models/dummy_model.py | 6 +- .../petstore_api/models/enum_arrays.py | 1 - .../petstore_api/models/enum_test.py | 1 - .../petstore_api/models/file.py | 1 - .../models/file_schema_test_class.py | 1 - .../petstore_api/models/first_ref.py | 6 +- .../python-aiohttp/petstore_api/models/foo.py | 1 - .../models/foo_get_default_response.py | 1 - .../petstore_api/models/format_test.py | 1 - .../petstore_api/models/has_only_read_only.py | 1 - .../models/health_check_result.py | 1 - .../models/inner_dict_with_property.py | 1 - .../petstore_api/models/int_or_string.py | 10 +++- .../petstore_api/models/list.py | 1 - .../models/map_of_array_of_model.py | 1 - .../petstore_api/models/map_test.py | 1 - ...perties_and_additional_properties_class.py | 1 - .../petstore_api/models/model200_response.py | 1 - .../petstore_api/models/model_return.py | 1 - .../petstore_api/models/name.py | 1 - .../petstore_api/models/nullable_class.py | 3 +- .../petstore_api/models/nullable_property.py | 1 - .../petstore_api/models/number_only.py | 1 - .../object_to_test_additional_properties.py | 1 - .../models/object_with_deprecated_fields.py | 1 - .../petstore_api/models/one_of_enum_string.py | 24 +++++--- .../petstore_api/models/order.py | 1 - .../petstore_api/models/outer_composite.py | 1 - .../models/outer_object_with_enum_property.py | 1 - .../petstore_api/models/parent.py | 1 - .../models/parent_with_optional_dict.py | 1 - .../python-aiohttp/petstore_api/models/pet.py | 1 - .../python-aiohttp/petstore_api/models/pig.py | 27 +++++---- .../models/property_name_collision.py | 1 - .../petstore_api/models/read_only_first.py | 1 - .../petstore_api/models/second_ref.py | 6 +- .../models/self_reference_model.py | 6 +- .../petstore_api/models/special_model_name.py | 1 - .../petstore_api/models/special_name.py | 1 - .../python-aiohttp/petstore_api/models/tag.py | 1 - .../petstore_api/models/tiger.py | 1 - .../petstore_api/models/user.py | 1 - .../petstore_api/models/with_nested_one_of.py | 1 - .../.github/workflows/python.yml | 1 + .../python-pydantic-v2/.gitlab-ci.yml | 8 ++- .../.openapi-generator/FILES | 6 ++ .../.openapi-generator/VERSION | 2 +- .../petstore/python-pydantic-v2/README.md | 3 + .../petstore_api/__init__.py | 3 + .../petstore_api/api/fake_api.py | 42 ++++++------- .../petstore_api/api/pet_api.py | 26 ++++---- .../petstore_api/api/store_api.py | 4 +- .../petstore_api/api/user_api.py | 6 +- .../petstore_api/api_client.py | 49 ++++++++------- .../petstore_api/models/__init__.py | 3 + .../models/additional_properties_any_type.py | 11 ++-- .../models/additional_properties_class.py | 11 ++-- .../models/additional_properties_object.py | 11 ++-- ...tional_properties_with_description_only.py | 11 ++-- .../models/all_of_with_single_ref.py | 11 ++-- .../petstore_api/models/animal.py | 32 +++++----- .../petstore_api/models/any_of_color.py | 16 ++--- .../petstore_api/models/any_of_pig.py | 32 +++++----- .../petstore_api/models/api_response.py | 11 ++-- .../models/array_of_array_of_model.py | 11 ++-- .../models/array_of_array_of_number_only.py | 11 ++-- .../models/array_of_number_only.py | 11 ++-- .../petstore_api/models/array_test.py | 11 ++-- .../petstore_api/models/basque_pig.py | 11 ++-- .../petstore_api/models/capitalization.py | 11 ++-- .../petstore_api/models/cat.py | 11 ++-- .../petstore_api/models/category.py | 11 ++-- .../models/circular_reference_model.py | 16 ++--- .../petstore_api/models/class_model.py | 11 ++-- .../petstore_api/models/client.py | 11 ++-- .../petstore_api/models/color.py | 22 ++++--- .../petstore_api/models/creature.py | 11 ++-- .../petstore_api/models/creature_info.py | 11 ++-- .../petstore_api/models/danish_pig.py | 11 ++-- .../petstore_api/models/deprecated_object.py | 11 ++-- .../petstore_api/models/dog.py | 11 ++-- .../petstore_api/models/dummy_model.py | 16 ++--- .../petstore_api/models/enum_arrays.py | 17 +++--- .../petstore_api/models/enum_test.py | 25 ++++---- .../petstore_api/models/file.py | 11 ++-- .../models/file_schema_test_class.py | 11 ++-- .../petstore_api/models/first_ref.py | 16 ++--- .../petstore_api/models/foo.py | 11 ++-- .../models/foo_get_default_response.py | 11 ++-- .../petstore_api/models/format_test.py | 21 ++++--- .../petstore_api/models/has_only_read_only.py | 11 ++-- .../models/health_check_result.py | 13 ++-- .../models/inner_dict_with_property.py | 11 ++-- .../petstore_api/models/int_or_string.py | 20 ++++--- .../petstore_api/models/list.py | 11 ++-- .../models/map_of_array_of_model.py | 11 ++-- .../petstore_api/models/map_test.py | 15 +++-- ...perties_and_additional_properties_class.py | 11 ++-- .../petstore_api/models/model200_response.py | 11 ++-- .../petstore_api/models/model_return.py | 11 ++-- .../petstore_api/models/name.py | 11 ++-- .../petstore_api/models/nullable_class.py | 33 +++++----- .../petstore_api/models/nullable_property.py | 17 +++--- .../petstore_api/models/number_only.py | 11 ++-- .../object_to_test_additional_properties.py | 11 ++-- .../models/object_with_deprecated_fields.py | 11 ++-- .../petstore_api/models/one_of_enum_string.py | 34 +++++++---- .../petstore_api/models/order.py | 15 +++-- .../petstore_api/models/outer_composite.py | 11 ++-- .../models/outer_object_with_enum_property.py | 13 ++-- .../petstore_api/models/parent.py | 11 ++-- .../models/parent_with_optional_dict.py | 11 ++-- .../petstore_api/models/pet.py | 15 +++-- .../petstore_api/models/pig.py | 37 +++++++----- .../models/property_name_collision.py | 11 ++-- .../petstore_api/models/read_only_first.py | 11 ++-- .../petstore_api/models/second_ref.py | 16 ++--- .../models/self_reference_model.py | 16 ++--- .../petstore_api/models/special_model_name.py | 11 ++-- .../petstore_api/models/special_name.py | 15 +++-- .../petstore_api/models/tag.py | 11 ++-- .../petstore_api/models/tiger.py | 11 ++-- .../petstore_api/models/user.py | 11 ++-- .../petstore_api/models/with_nested_one_of.py | 11 ++-- .../python-pydantic-v2/requirements.txt | 1 + .../python-pydantic-v2/test-requirements.txt | 1 - .../test/test_circular_reference_model.py | 60 +++++++++++++++++++ .../python-pydantic-v2/test/test_first_ref.py | 58 ++++++++++++++++++ .../test/test_second_ref.py | 58 ++++++++++++++++++ .../python/petstore_api/api_client.py | 6 +- .../models/additional_properties_any_type.py | 3 +- .../models/additional_properties_class.py | 3 +- .../models/additional_properties_object.py | 3 +- ...tional_properties_with_description_only.py | 3 +- .../models/all_of_with_single_ref.py | 3 +- .../python/petstore_api/models/animal.py | 28 +++++---- .../petstore_api/models/any_of_color.py | 6 +- .../python/petstore_api/models/any_of_pig.py | 22 +++---- .../petstore_api/models/api_response.py | 3 +- .../models/array_of_array_of_model.py | 3 +- .../models/array_of_array_of_number_only.py | 3 +- .../models/array_of_number_only.py | 3 +- .../python/petstore_api/models/array_test.py | 3 +- .../python/petstore_api/models/basque_pig.py | 3 +- .../petstore_api/models/capitalization.py | 3 +- .../python/petstore_api/models/cat.py | 3 +- .../python/petstore_api/models/category.py | 3 +- .../models/circular_reference_model.py | 8 ++- .../python/petstore_api/models/class_model.py | 3 +- .../python/petstore_api/models/client.py | 3 +- .../python/petstore_api/models/color.py | 12 +++- .../python/petstore_api/models/creature.py | 3 +- .../petstore_api/models/creature_info.py | 3 +- .../python/petstore_api/models/danish_pig.py | 3 +- .../petstore_api/models/deprecated_object.py | 3 +- .../python/petstore_api/models/dog.py | 3 +- .../python/petstore_api/models/dummy_model.py | 8 ++- .../python/petstore_api/models/enum_arrays.py | 3 +- .../python/petstore_api/models/enum_test.py | 3 +- .../python/petstore_api/models/file.py | 3 +- .../models/file_schema_test_class.py | 3 +- .../python/petstore_api/models/first_ref.py | 8 ++- .../python/petstore_api/models/foo.py | 3 +- .../models/foo_get_default_response.py | 3 +- .../python/petstore_api/models/format_test.py | 3 +- .../petstore_api/models/has_only_read_only.py | 3 +- .../models/health_check_result.py | 3 +- .../models/inner_dict_with_property.py | 3 +- .../petstore_api/models/int_or_string.py | 10 +++- .../python/petstore_api/models/list.py | 3 +- .../models/map_of_array_of_model.py | 3 +- .../python/petstore_api/models/map_test.py | 3 +- ...perties_and_additional_properties_class.py | 3 +- .../petstore_api/models/model200_response.py | 3 +- .../petstore_api/models/model_return.py | 3 +- .../python/petstore_api/models/name.py | 3 +- .../petstore_api/models/nullable_class.py | 3 +- .../petstore_api/models/nullable_property.py | 3 +- .../python/petstore_api/models/number_only.py | 3 +- .../object_to_test_additional_properties.py | 3 +- .../models/object_with_deprecated_fields.py | 3 +- .../petstore_api/models/one_of_enum_string.py | 24 +++++--- .../python/petstore_api/models/order.py | 3 +- .../petstore_api/models/outer_composite.py | 3 +- .../models/outer_object_with_enum_property.py | 3 +- .../python/petstore_api/models/parent.py | 3 +- .../models/parent_with_optional_dict.py | 3 +- .../python/petstore_api/models/pet.py | 3 +- .../python/petstore_api/models/pig.py | 27 +++++---- .../models/property_name_collision.py | 3 +- .../petstore_api/models/read_only_first.py | 3 +- .../python/petstore_api/models/second_ref.py | 8 ++- .../models/self_reference_model.py | 8 ++- .../petstore_api/models/special_model_name.py | 3 +- .../petstore_api/models/special_name.py | 3 +- .../python/petstore_api/models/tag.py | 3 +- .../python/petstore_api/models/tiger.py | 3 +- .../python/petstore_api/models/user.py | 3 +- .../petstore_api/models/with_nested_one_of.py | 3 +- 237 files changed, 1029 insertions(+), 872 deletions(-) create mode 100644 samples/openapi3/client/petstore/python-pydantic-v2/test/test_circular_reference_model.py create mode 100644 samples/openapi3/client/petstore/python-pydantic-v2/test/test_first_ref.py create mode 100644 samples/openapi3/client/petstore/python-pydantic-v2/test/test_second_ref.py diff --git a/samples/client/echo_api/python/openapi_client/api_client.py b/samples/client/echo_api/python/openapi_client/api_client.py index 962fad87d685..f1584c2cf820 100644 --- a/samples/client/echo_api/python/openapi_client/api_client.py +++ b/samples/client/echo_api/python/openapi_client/api_client.py @@ -224,6 +224,7 @@ def __call_api( self.last_response = response_data return_data = None # assuming deserialization is not needed + return_headers = None # data needs deserialization or returns HTTP data (deserialized) only if _preload_content or _return_http_data_only: response_type = response_types_map.get(str(response_data.status), None) @@ -244,17 +245,20 @@ def __call_api( # deserialize response data if response_type == "bytearray": return_data = response_data.data + return_headers = response_data.headers elif response_type: return_data = self.deserialize(response_data, response_type) + return_headers = response_data.getheaders() else: return_data = None + return_headers = response_data.getheaders() if _return_http_data_only: return return_data else: return ApiResponse(status_code = response_data.status, data = return_data, - headers = response_data.getheaders(), + headers = return_headers, raw_data = response_data.data) def sanitize_for_serialization(self, obj): diff --git a/samples/client/echo_api/python/openapi_client/models/bird.py b/samples/client/echo_api/python/openapi_client/models/bird.py index 7afefcc9e596..eda5597d8da4 100644 --- a/samples/client/echo_api/python/openapi_client/models/bird.py +++ b/samples/client/echo_api/python/openapi_client/models/bird.py @@ -28,7 +28,6 @@ class Bird(BaseModel): """ size: Optional[StrictStr] = None color: Optional[StrictStr] = None - __properties = ["size", "color"] """Pydantic configuration""" class Config: diff --git a/samples/client/echo_api/python/openapi_client/models/category.py b/samples/client/echo_api/python/openapi_client/models/category.py index 4a9de5bdfb04..6e6e351e8ae3 100644 --- a/samples/client/echo_api/python/openapi_client/models/category.py +++ b/samples/client/echo_api/python/openapi_client/models/category.py @@ -28,7 +28,6 @@ class Category(BaseModel): """ id: Optional[StrictInt] = None name: Optional[StrictStr] = None - __properties = ["id", "name"] """Pydantic configuration""" class Config: 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 6dc4e225ae91..c512f9e64fd2 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,6 @@ 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 = ["id", "outcomes", "suffix", "text", "date"] """Pydantic configuration""" class Config: diff --git a/samples/client/echo_api/python/openapi_client/models/default_value.py b/samples/client/echo_api/python/openapi_client/models/default_value.py index 486612d7ce5a..b370912637a4 100644 --- a/samples/client/echo_api/python/openapi_client/models/default_value.py +++ b/samples/client/echo_api/python/openapi_client/models/default_value.py @@ -35,7 +35,6 @@ class DefaultValue(BaseModel): array_string_nullable: Optional[conlist(StrictStr)] = None array_string_extension_nullable: Optional[conlist(StrictStr)] = None string_nullable: Optional[StrictStr] = None - __properties = ["array_string_enum_ref_default", "array_string_enum_default", "array_string_default", "array_integer_default", "array_string", "array_string_nullable", "array_string_extension_nullable", "string_nullable"] @validator('array_string_enum_default') def array_string_enum_default_validate_enum(cls, value): diff --git a/samples/client/echo_api/python/openapi_client/models/number_properties_only.py b/samples/client/echo_api/python/openapi_client/models/number_properties_only.py index b8a367516306..0eae5e40ad76 100644 --- a/samples/client/echo_api/python/openapi_client/models/number_properties_only.py +++ b/samples/client/echo_api/python/openapi_client/models/number_properties_only.py @@ -29,7 +29,6 @@ class NumberPropertiesOnly(BaseModel): number: Optional[Union[StrictFloat, StrictInt]] = None float: Optional[Union[StrictFloat, StrictInt]] = None double: Optional[Union[confloat(le=50.2, ge=0.8, strict=True), conint(le=50, ge=1, strict=True)]] = None - __properties = ["number", "float", "double"] """Pydantic configuration""" class Config: diff --git a/samples/client/echo_api/python/openapi_client/models/pet.py b/samples/client/echo_api/python/openapi_client/models/pet.py index b758fbf5a0ff..bcf9933c2b0f 100644 --- a/samples/client/echo_api/python/openapi_client/models/pet.py +++ b/samples/client/echo_api/python/openapi_client/models/pet.py @@ -34,7 +34,6 @@ class Pet(BaseModel): photo_urls: conlist(StrictStr) = Field(..., alias="photoUrls") tags: Optional[conlist(Tag)] = None status: Optional[StrictStr] = Field(None, description="pet status in the store") - __properties = ["id", "name", "category", "photoUrls", "tags", "status"] @validator('status') def status_validate_enum(cls, value): diff --git a/samples/client/echo_api/python/openapi_client/models/query.py b/samples/client/echo_api/python/openapi_client/models/query.py index 9342db8bc355..5b2ee54dcea8 100644 --- a/samples/client/echo_api/python/openapi_client/models/query.py +++ b/samples/client/echo_api/python/openapi_client/models/query.py @@ -28,7 +28,6 @@ class Query(BaseModel): """ id: Optional[StrictInt] = Field(None, description="Query") outcomes: Optional[conlist(StrictStr)] = None - __properties = ["id", "outcomes"] @validator('outcomes') def outcomes_validate_enum(cls, value): diff --git a/samples/client/echo_api/python/openapi_client/models/tag.py b/samples/client/echo_api/python/openapi_client/models/tag.py index 28b06fa6bff9..a94fe4c1abd2 100644 --- a/samples/client/echo_api/python/openapi_client/models/tag.py +++ b/samples/client/echo_api/python/openapi_client/models/tag.py @@ -28,7 +28,6 @@ class Tag(BaseModel): """ id: Optional[StrictInt] = None name: Optional[StrictStr] = None - __properties = ["id", "name"] """Pydantic configuration""" class Config: diff --git a/samples/client/echo_api/python/openapi_client/models/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py b/samples/client/echo_api/python/openapi_client/models/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py index ef0865cb0fbf..a0ee6b36feb6 100644 --- a/samples/client/echo_api/python/openapi_client/models/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py +++ b/samples/client/echo_api/python/openapi_client/models/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.py @@ -30,7 +30,6 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(BaseMod color: Optional[StrictStr] = None id: Optional[StrictInt] = None name: Optional[StrictStr] = None - __properties = ["size", "color", "id", "name"] """Pydantic configuration""" class Config: diff --git a/samples/client/echo_api/python/openapi_client/models/test_query_style_form_explode_true_array_string_query_object_parameter.py b/samples/client/echo_api/python/openapi_client/models/test_query_style_form_explode_true_array_string_query_object_parameter.py index 78c5e72410de..fb8d197f7232 100644 --- a/samples/client/echo_api/python/openapi_client/models/test_query_style_form_explode_true_array_string_query_object_parameter.py +++ b/samples/client/echo_api/python/openapi_client/models/test_query_style_form_explode_true_array_string_query_object_parameter.py @@ -27,7 +27,6 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(BaseModel): TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter """ values: Optional[conlist(StrictStr)] = None - __properties = ["values"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py index 733ddaed7c3e..444267d1f613 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py @@ -204,6 +204,7 @@ async def __call_api( self.last_response = response_data return_data = None # assuming deserialization is not needed + return_headers = None # data needs deserialization or returns HTTP data (deserialized) only if _preload_content or _return_http_data_only: response_type = response_types_map.get(str(response_data.status), None) @@ -224,17 +225,20 @@ async def __call_api( # deserialize response data if response_type == "bytearray": return_data = response_data.data + return_headers = response_data.headers elif response_type: return_data = self.deserialize(response_data, response_type) + return_headers = response_data.getheaders() else: return_data = None + return_headers = response_data.getheaders() if _return_http_data_only: return return_data else: return ApiResponse(status_code = response_data.status, data = return_data, - headers = response_data.getheaders(), + headers = return_headers, raw_data = response_data.data) def sanitize_for_serialization(self, obj): diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_any_type.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_any_type.py index c0d9294a9094..a29082ee88a9 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_any_type.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_any_type.py @@ -27,7 +27,6 @@ class AdditionalPropertiesAnyType(BaseModel): """ name: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["name"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> AdditionalPropertiesAnyType: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_class.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_class.py index ad1308c084a5..7deaad1e09b0 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_class.py @@ -27,7 +27,6 @@ class AdditionalPropertiesClass(BaseModel): """ map_property: Optional[Dict[str, StrictStr]] = None map_of_map_property: Optional[Dict[str, Dict[str, StrictStr]]] = None - __properties = ["map_property", "map_of_map_property"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_object.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_object.py index b3e50b40923b..89afb442762a 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_object.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_object.py @@ -27,7 +27,6 @@ class AdditionalPropertiesObject(BaseModel): """ name: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["name"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> AdditionalPropertiesObject: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_with_description_only.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_with_description_only.py index feedf9a744a7..72156d9f1431 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_with_description_only.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/additional_properties_with_description_only.py @@ -27,7 +27,6 @@ class AdditionalPropertiesWithDescriptionOnly(BaseModel): """ name: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["name"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> AdditionalPropertiesWithDescriptionOnly: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/all_of_with_single_ref.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/all_of_with_single_ref.py index f624188049d7..802e1ac74905 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/all_of_with_single_ref.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/all_of_with_single_ref.py @@ -28,7 +28,6 @@ class AllOfWithSingleRef(BaseModel): """ username: Optional[StrictStr] = None single_ref_type: Optional[SingleRefType] = Field(None, alias="SingleRefType") - __properties = ["username", "SingleRefType"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/animal.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/animal.py index 82f6b724d70e..6f9878edc827 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/animal.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/animal.py @@ -27,7 +27,6 @@ class Animal(BaseModel): """ class_name: StrictStr = Field(..., alias="className") color: Optional[StrictStr] = 'red' - __properties = ["className", "color"] """Pydantic configuration""" class Config: @@ -35,20 +34,17 @@ class Config: validate_assignment = True # JSON field name that stores the object type - __discriminator_property_name = 'className' - - # discriminator mappings - __discriminator_value_class_map = { - 'Cat': 'Cat', - 'Dog': 'Dog' - } @classmethod def get_discriminator_value(cls, obj: dict) -> str: """Returns the discriminator value (object type) of the data""" - discriminator_value = obj[cls.__discriminator_property_name] + discriminator_value = obj['className'] + discriminator_value_class_map = { + 'Cat': 'Cat','Dog': 'Dog' + } + if discriminator_value: - return cls.__discriminator_value_class_map.get(discriminator_value) + return discriminator_value_class_map.get(discriminator_value) else: return None @@ -78,15 +74,21 @@ def from_dict(cls, obj: dict) -> Union(Cat, Dog): """Create an instance of Animal from a dict""" # look up the object type based on discriminator mapping object_type = cls.get_discriminator_value(obj) + discriminator_value_class_map = { + 'Cat': 'Cat','Dog': 'Dog' + } if object_type: klass = globals()[object_type] return klass.from_dict(obj) else: raise ValueError("Animal failed to lookup discriminator value from " + - json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + - ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) + json.dumps(obj) + ". Discriminator property name: " + 'className' + + ", mapping: " + json.dumps(discriminator_value_class_map)) from petstore_api.models.cat import Cat from petstore_api.models.dog import Dog -Animal.update_forward_refs() +try: + Animal.update_forward_refs() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_color.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_color.py index 79eece679cda..caea52cba72c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_color.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_color.py @@ -38,7 +38,7 @@ class AnyOfColor(BaseModel): if TYPE_CHECKING: actual_instance: Union[List[int], str] else: - actual_instance: Any + actual_instance: Any = None any_of_schemas: List[str] = Field(ANYOFCOLOR_ANY_OF_SCHEMAS, const=True) """Pydantic configuration""" @@ -52,8 +52,10 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) @validator('actual_instance') def actual_instance_must_validate_anyof(cls, v): diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_pig.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_pig.py index 30274e51269a..4e9c82be45a0 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_pig.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_pig.py @@ -38,7 +38,7 @@ class AnyOfPig(BaseModel): if TYPE_CHECKING: actual_instance: Union[BasquePig, DanishPig] else: - actual_instance: Any + actual_instance: Any = None any_of_schemas: List[str] = Field(ANYOFPIG_ANY_OF_SCHEMAS, const=True) """Pydantic configuration""" @@ -52,25 +52,27 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) @validator('actual_instance') def actual_instance_must_validate_anyof(cls, v): instance = AnyOfPig.construct() error_messages = [] # validate data type: BasquePig - if not isinstance(v, BasquePig): - error_messages.append(f"Error! Input type `{type(v)}` is not `BasquePig`") - else: + try: + instance.anyof_schema_1_validator = v return v - + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) # validate data type: DanishPig - if not isinstance(v, DanishPig): - error_messages.append(f"Error! Input type `{type(v)}` is not `DanishPig`") - else: + try: + instance.anyof_schema_2_validator = v return v - + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) if error_messages: # no match raise ValueError("No match found when setting the actual_instance in AnyOfPig with anyOf schemas: BasquePig, DanishPig. Details: " + ", ".join(error_messages)) diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/api_response.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/api_response.py index 4f5cc095e3c2..06390e75553d 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/api_response.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/api_response.py @@ -28,7 +28,6 @@ class ApiResponse(BaseModel): code: Optional[StrictInt] = None type: Optional[StrictStr] = None message: Optional[StrictStr] = None - __properties = ["code", "type", "message"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_array_of_model.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_array_of_model.py index bd23f1c16cf1..41c59d217328 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_array_of_model.py @@ -27,7 +27,6 @@ class ArrayOfArrayOfModel(BaseModel): ArrayOfArrayOfModel """ another_property: Optional[conlist(conlist(Tag))] = None - __properties = ["another_property"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_array_of_number_only.py index eef48c4f0693..577adbce5977 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_array_of_number_only.py @@ -26,7 +26,6 @@ class ArrayOfArrayOfNumberOnly(BaseModel): ArrayOfArrayOfNumberOnly """ array_array_number: Optional[conlist(conlist(float))] = Field(None, alias="ArrayArrayNumber") - __properties = ["ArrayArrayNumber"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_number_only.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_number_only.py index 549faf416bd4..d6f875262a7a 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_of_number_only.py @@ -26,7 +26,6 @@ class ArrayOfNumberOnly(BaseModel): ArrayOfNumberOnly """ array_number: Optional[conlist(float)] = Field(None, alias="ArrayNumber") - __properties = ["ArrayNumber"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_test.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_test.py index 24faffd03434..6d5fb16e27ec 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_test.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_test.py @@ -29,7 +29,6 @@ class ArrayTest(BaseModel): array_of_string: Optional[conlist(StrictStr, max_items=3, min_items=0)] = None array_array_of_integer: Optional[conlist(conlist(StrictInt))] = None array_array_of_model: Optional[conlist(conlist(ReadOnlyFirst))] = None - __properties = ["array_of_string", "array_array_of_integer", "array_array_of_model"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/basque_pig.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/basque_pig.py index c54cec9359da..eb77a0d1bf2f 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/basque_pig.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/basque_pig.py @@ -27,7 +27,6 @@ class BasquePig(BaseModel): """ class_name: StrictStr = Field(..., alias="className") color: StrictStr = Field(...) - __properties = ["className", "color"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/capitalization.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/capitalization.py index 72c4d2e044e6..a11f804271f0 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/capitalization.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/capitalization.py @@ -31,7 +31,6 @@ class Capitalization(BaseModel): capital_snake: Optional[StrictStr] = Field(None, alias="Capital_Snake") sca_eth_flow_points: Optional[StrictStr] = Field(None, alias="SCA_ETH_Flow_Points") att_name: Optional[StrictStr] = Field(None, alias="ATT_NAME", description="Name of the pet ") - __properties = ["smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/cat.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/cat.py index 096693b202e7..5a8fbfe3b7c9 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/cat.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/cat.py @@ -27,7 +27,6 @@ class Cat(Animal): Cat """ declawed: Optional[StrictBool] = None - __properties = ["className", "color", "declawed"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/category.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/category.py index 2fd4312fad55..1dada60fef2d 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/category.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/category.py @@ -27,7 +27,6 @@ class Category(BaseModel): """ id: Optional[StrictInt] = None name: StrictStr = Field(...) - __properties = ["id", "name"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/circular_reference_model.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/circular_reference_model.py index e427ea092423..756c7b4b75c8 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/circular_reference_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/circular_reference_model.py @@ -27,7 +27,6 @@ class CircularReferenceModel(BaseModel): """ size: Optional[StrictInt] = None nested: Optional[FirstRef] = None - __properties = ["size", "nested"] """Pydantic configuration""" class Config: @@ -74,5 +73,8 @@ def from_dict(cls, obj: dict) -> CircularReferenceModel: return _obj from petstore_api.models.first_ref import FirstRef -CircularReferenceModel.update_forward_refs() +try: + CircularReferenceModel.update_forward_refs() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/class_model.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/class_model.py index ab7646983d9e..09d78f1f57a6 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/class_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/class_model.py @@ -26,7 +26,6 @@ class ClassModel(BaseModel): Model for testing model with \"_class\" property # noqa: E501 """ var_class: Optional[StrictStr] = Field(None, alias="_class") - __properties = ["_class"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/client.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/client.py index dea9123d8623..ca12ada42718 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/client.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/client.py @@ -26,7 +26,6 @@ class Client(BaseModel): Client """ client: Optional[StrictStr] = None - __properties = ["client"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/color.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/color.py index 574093092a01..51a35dba4d8f 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/color.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/color.py @@ -35,9 +35,9 @@ class Color(BaseModel): # data type: str oneof_schema_3_validator: Optional[constr(strict=True, max_length=7, min_length=7)] = Field(None, description="Hex color string, such as #00FF00.") if TYPE_CHECKING: - actual_instance: Union[List[int], str] + actual_instance: Union[List[int], str, None] else: - actual_instance: Any + actual_instance: Any = None one_of_schemas: List[str] = Field(COLOR_ONE_OF_SCHEMAS, const=True) @@ -52,8 +52,10 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) @validator('actual_instance') def actual_instance_must_validate_oneof(cls, v): @@ -83,6 +85,8 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(str(e)) if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when setting `actual_instance` in Color with oneOf schemas: List[int], str. Details: " + ", ".join(error_messages)) elif match == 0: # no match @@ -134,6 +138,8 @@ def from_json(cls, json_str: str) -> Color: if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when deserializing the JSON string into Color with oneOf schemas: List[int], str. Details: " + ", ".join(error_messages)) elif match == 0: # no match diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/creature.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/creature.py index 2567fa7565f9..c78ad2c7c6b3 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/creature.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/creature.py @@ -28,7 +28,6 @@ class Creature(BaseModel): """ info: CreatureInfo = Field(...) type: StrictStr = Field(...) - __properties = ["info", "type"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/creature_info.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/creature_info.py index f287fb975013..b1912ef4b349 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/creature_info.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/creature_info.py @@ -26,7 +26,6 @@ class CreatureInfo(BaseModel): CreatureInfo """ name: StrictStr = Field(...) - __properties = ["name"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/danish_pig.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/danish_pig.py index 47321e4adb15..1d47bd5743bd 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/danish_pig.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/danish_pig.py @@ -27,7 +27,6 @@ class DanishPig(BaseModel): """ class_name: StrictStr = Field(..., alias="className") size: StrictInt = Field(...) - __properties = ["className", "size"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/deprecated_object.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/deprecated_object.py index 0615eb18e66a..8b353fd78315 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/deprecated_object.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/deprecated_object.py @@ -26,7 +26,6 @@ class DeprecatedObject(BaseModel): DeprecatedObject """ name: Optional[StrictStr] = None - __properties = ["name"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dog.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dog.py index 2b35e739c1a0..cdff19ea158c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dog.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dog.py @@ -27,7 +27,6 @@ class Dog(Animal): Dog """ breed: Optional[StrictStr] = None - __properties = ["className", "color", "breed"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dummy_model.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dummy_model.py index 8b0242b6cf16..4606066ae8db 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dummy_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dummy_model.py @@ -27,7 +27,6 @@ class DummyModel(BaseModel): """ category: Optional[StrictStr] = None self_ref: Optional[SelfReferenceModel] = None - __properties = ["category", "self_ref"] """Pydantic configuration""" class Config: @@ -74,5 +73,8 @@ def from_dict(cls, obj: dict) -> DummyModel: return _obj from petstore_api.models.self_reference_model import SelfReferenceModel -DummyModel.update_forward_refs() +try: + DummyModel.update_forward_refs() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_arrays.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_arrays.py index 445292b697e4..74ad7ea852aa 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_arrays.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_arrays.py @@ -27,7 +27,6 @@ class EnumArrays(BaseModel): """ just_symbol: Optional[StrictStr] = None array_enum: Optional[conlist(StrictStr)] = None - __properties = ["just_symbol", "array_enum"] @validator('just_symbol') def just_symbol_validate_enum(cls, value): diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_test.py index c8caa42c35de..51594616b428 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_test.py @@ -38,7 +38,6 @@ class EnumTest(BaseModel): outer_enum_integer: Optional[OuterEnumInteger] = Field(None, alias="outerEnumInteger") outer_enum_default_value: Optional[OuterEnumDefaultValue] = Field(None, alias="outerEnumDefaultValue") outer_enum_integer_default_value: Optional[OuterEnumIntegerDefaultValue] = Field(None, alias="outerEnumIntegerDefaultValue") - __properties = ["enum_string", "enum_string_required", "enum_integer_default", "enum_integer", "enum_number", "outerEnum", "outerEnumInteger", "outerEnumDefaultValue", "outerEnumIntegerDefaultValue"] @validator('enum_string') def enum_string_validate_enum(cls, value): diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/file.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/file.py index 8e7dd176489e..090919169161 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/file.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/file.py @@ -26,7 +26,6 @@ class File(BaseModel): Must be named `File` for test. # noqa: E501 """ source_uri: Optional[StrictStr] = Field(None, alias="sourceURI", description="Test capitalization") - __properties = ["sourceURI"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/file_schema_test_class.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/file_schema_test_class.py index a4d41a8cd7d6..71b070ba2d93 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/file_schema_test_class.py @@ -28,7 +28,6 @@ class FileSchemaTestClass(BaseModel): """ file: Optional[File] = None files: Optional[conlist(File)] = None - __properties = ["file", "files"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/first_ref.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/first_ref.py index 80663edce859..3051d7a2ab36 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/first_ref.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/first_ref.py @@ -27,7 +27,6 @@ class FirstRef(BaseModel): """ category: Optional[StrictStr] = None self_ref: Optional[SecondRef] = None - __properties = ["category", "self_ref"] """Pydantic configuration""" class Config: @@ -74,5 +73,8 @@ def from_dict(cls, obj: dict) -> FirstRef: return _obj from petstore_api.models.second_ref import SecondRef -FirstRef.update_forward_refs() +try: + FirstRef.update_forward_refs() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/foo.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/foo.py index 44d47be8e6ef..ce6292936a41 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/foo.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/foo.py @@ -26,7 +26,6 @@ class Foo(BaseModel): Foo """ bar: Optional[StrictStr] = 'bar' - __properties = ["bar"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/foo_get_default_response.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/foo_get_default_response.py index 67548a902f31..119ec5bcc79d 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/foo_get_default_response.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/foo_get_default_response.py @@ -27,7 +27,6 @@ class FooGetDefaultResponse(BaseModel): FooGetDefaultResponse """ string: Optional[Foo] = None - __properties = ["string"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/format_test.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/format_test.py index 139dbeeed32b..9f9a69d28848 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/format_test.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/format_test.py @@ -42,7 +42,6 @@ class FormatTest(BaseModel): password: constr(strict=True, max_length=64, min_length=10) = Field(...) pattern_with_digits: Optional[constr(strict=True)] = Field(None, description="A string that is a 10 digit number. Can have leading zeros.") pattern_with_digits_and_delimiter: Optional[constr(strict=True)] = Field(None, description="A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.") - __properties = ["integer", "int32", "int64", "number", "float", "double", "decimal", "string", "string_with_double_quote_pattern", "byte", "binary", "date", "dateTime", "uuid", "password", "pattern_with_digits", "pattern_with_digits_and_delimiter"] @validator('string') def string_validate_regular_expression(cls, value): diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/has_only_read_only.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/has_only_read_only.py index cfacff0a12ab..cc452361cf24 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/has_only_read_only.py @@ -27,7 +27,6 @@ class HasOnlyReadOnly(BaseModel): """ bar: Optional[StrictStr] = None foo: Optional[StrictStr] = None - __properties = ["bar", "foo"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/health_check_result.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/health_check_result.py index 4fadb6f6caa6..5a43814a8f0e 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/health_check_result.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/health_check_result.py @@ -26,7 +26,6 @@ class HealthCheckResult(BaseModel): Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. # noqa: E501 """ nullable_message: Optional[StrictStr] = Field(None, alias="NullableMessage") - __properties = ["NullableMessage"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/inner_dict_with_property.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/inner_dict_with_property.py index 3576f85dde55..8803c2a8c3ae 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/inner_dict_with_property.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/inner_dict_with_property.py @@ -26,7 +26,6 @@ class InnerDictWithProperty(BaseModel): InnerDictWithProperty """ a_property: Optional[Dict[str, Any]] = Field(None, alias="aProperty") - __properties = ["aProperty"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/int_or_string.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/int_or_string.py index 574c73549525..3af97701905d 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/int_or_string.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/int_or_string.py @@ -35,7 +35,7 @@ class IntOrString(BaseModel): if TYPE_CHECKING: actual_instance: Union[int, str] else: - actual_instance: Any + actual_instance: Any = None one_of_schemas: List[str] = Field(INTORSTRING_ONE_OF_SCHEMAS, const=True) @@ -50,8 +50,10 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) @validator('actual_instance') def actual_instance_must_validate_oneof(cls, v): @@ -72,6 +74,8 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(str(e)) if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when setting `actual_instance` in IntOrString with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) elif match == 0: # no match @@ -111,6 +115,8 @@ def from_json(cls, json_str: str) -> IntOrString: if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when deserializing the JSON string into IntOrString with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) elif match == 0: # no match diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/list.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/list.py index e77c678ec09e..c716e9c2ec83 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/list.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/list.py @@ -26,7 +26,6 @@ class List(BaseModel): List """ var_123_list: Optional[StrictStr] = Field(None, alias="123-list") - __properties = ["123-list"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/map_of_array_of_model.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/map_of_array_of_model.py index 4ca8b1aadd04..23fd1ab8a604 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/map_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/map_of_array_of_model.py @@ -27,7 +27,6 @@ class MapOfArrayOfModel(BaseModel): MapOfArrayOfModel """ shop_id_to_org_online_lip_map: Optional[Dict[str, conlist(Tag)]] = Field(None, alias="shopIdToOrgOnlineLipMap") - __properties = ["shopIdToOrgOnlineLipMap"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/map_test.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/map_test.py index c11ef8376458..d8da08ff112e 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/map_test.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/map_test.py @@ -29,7 +29,6 @@ class MapTest(BaseModel): map_of_enum_string: Optional[Dict[str, StrictStr]] = None direct_map: Optional[Dict[str, StrictBool]] = None indirect_map: Optional[Dict[str, StrictBool]] = None - __properties = ["map_map_of_string", "map_of_enum_string", "direct_map", "indirect_map"] @validator('map_of_enum_string') def map_of_enum_string_validate_enum(cls, value): diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/mixed_properties_and_additional_properties_class.py index 92d55f68bbe7..bcab08dd6dc4 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -29,7 +29,6 @@ class MixedPropertiesAndAdditionalPropertiesClass(BaseModel): uuid: Optional[StrictStr] = None date_time: Optional[datetime] = Field(None, alias="dateTime") map: Optional[Dict[str, Animal]] = None - __properties = ["uuid", "dateTime", "map"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/model200_response.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/model200_response.py index 581bfcd15fe0..6207031536dc 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/model200_response.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/model200_response.py @@ -27,7 +27,6 @@ class Model200Response(BaseModel): """ name: Optional[StrictInt] = None var_class: Optional[StrictStr] = Field(None, alias="class") - __properties = ["name", "class"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/model_return.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/model_return.py index cc9d76d869e6..3053e8058985 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/model_return.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/model_return.py @@ -26,7 +26,6 @@ class ModelReturn(BaseModel): Model for testing reserved words # noqa: E501 """ var_return: Optional[StrictInt] = Field(None, alias="return") - __properties = ["return"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/name.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/name.py index f0c88a09eee2..42d90a40429f 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/name.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/name.py @@ -29,7 +29,6 @@ class Name(BaseModel): snake_case: Optional[StrictInt] = None var_property: Optional[StrictStr] = Field(None, alias="property") var_123_number: Optional[StrictInt] = Field(None, alias="123Number") - __properties = ["name", "snake_case", "property", "123Number"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_class.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_class.py index f960d26b6611..f33eca4dd301 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_class.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_class.py @@ -39,7 +39,6 @@ class NullableClass(BaseModel): object_and_items_nullable_prop: Optional[Dict[str, Dict[str, Any]]] = None object_items_nullable: Optional[Dict[str, Dict[str, Any]]] = None additional_properties: Dict[str, Any] = {} - __properties = ["required_integer_prop", "integer_prop", "number_prop", "boolean_prop", "string_prop", "date_prop", "datetime_prop", "array_nullable_prop", "array_and_items_nullable_prop", "array_items_nullable", "object_nullable_prop", "object_and_items_nullable_prop", "object_items_nullable"] """Pydantic configuration""" class Config: @@ -154,7 +153,7 @@ def from_dict(cls, obj: dict) -> NullableClass: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["required_integer_prop", "integer_prop", "number_prop", "boolean_prop", "string_prop", "date_prop", "datetime_prop", "array_nullable_prop", "array_and_items_nullable_prop", "array_items_nullable", "object_nullable_prop", "object_and_items_nullable_prop", "object_items_nullable"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_property.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_property.py index 616e4002fafa..2016915e288c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_property.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_property.py @@ -27,7 +27,6 @@ class NullableProperty(BaseModel): """ id: StrictInt = Field(...) name: Optional[constr(strict=True)] = Field(...) - __properties = ["id", "name"] @validator('name') def name_validate_regular_expression(cls, value): diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/number_only.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/number_only.py index 3092648bbca2..d509fdc7eee5 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/number_only.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/number_only.py @@ -26,7 +26,6 @@ class NumberOnly(BaseModel): NumberOnly """ just_number: Optional[float] = Field(None, alias="JustNumber") - __properties = ["JustNumber"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/object_to_test_additional_properties.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/object_to_test_additional_properties.py index 55fa9ad5da1c..98ef3c80b86c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/object_to_test_additional_properties.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/object_to_test_additional_properties.py @@ -26,7 +26,6 @@ class ObjectToTestAdditionalProperties(BaseModel): Minimal object # noqa: E501 """ var_property: Optional[StrictBool] = Field(False, alias="property", description="Property") - __properties = ["property"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/object_with_deprecated_fields.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/object_with_deprecated_fields.py index 653e292cf06a..492393b9cb4e 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/object_with_deprecated_fields.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/object_with_deprecated_fields.py @@ -30,7 +30,6 @@ class ObjectWithDeprecatedFields(BaseModel): id: Optional[float] = None deprecated_ref: Optional[DeprecatedObject] = Field(None, alias="deprecatedRef") bars: Optional[conlist(StrictStr)] = None - __properties = ["uuid", "id", "deprecatedRef", "bars"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/one_of_enum_string.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/one_of_enum_string.py index f4b18189e6f9..a781e3febe0a 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/one_of_enum_string.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/one_of_enum_string.py @@ -37,7 +37,7 @@ class OneOfEnumString(BaseModel): if TYPE_CHECKING: actual_instance: Union[EnumString1, EnumString2] else: - actual_instance: Any + actual_instance: Any = None one_of_schemas: List[str] = Field(ONEOFENUMSTRING_ONE_OF_SCHEMAS, const=True) @@ -52,8 +52,10 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) @validator('actual_instance') def actual_instance_must_validate_oneof(cls, v): @@ -61,17 +63,21 @@ def actual_instance_must_validate_oneof(cls, v): error_messages = [] match = 0 # validate data type: EnumString1 - if not isinstance(v, EnumString1): - error_messages.append(f"Error! Input type `{type(v)}` is not `EnumString1`") - else: + try: + instance.oneof_schema_1_validator = v match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) # validate data type: EnumString2 - if not isinstance(v, EnumString2): - error_messages.append(f"Error! Input type `{type(v)}` is not `EnumString2`") - else: + try: + instance.oneof_schema_2_validator = v match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when setting `actual_instance` in OneOfEnumString with oneOf schemas: EnumString1, EnumString2. Details: " + ", ".join(error_messages)) elif match == 0: # no match @@ -105,6 +111,8 @@ def from_json(cls, json_str: str) -> OneOfEnumString: if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when deserializing the JSON string into OneOfEnumString with oneOf schemas: EnumString1, EnumString2. Details: " + ", ".join(error_messages)) elif match == 0: # no match diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/order.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/order.py index 510d0eac306a..d0e9f89d3379 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/order.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/order.py @@ -31,7 +31,6 @@ class Order(BaseModel): ship_date: Optional[datetime] = Field(None, alias="shipDate") status: Optional[StrictStr] = Field(None, description="Order Status") complete: Optional[StrictBool] = False - __properties = ["id", "petId", "quantity", "shipDate", "status", "complete"] @validator('status') def status_validate_enum(cls, value): diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_composite.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_composite.py index 1b6f4f5cb35d..6da5e274f77d 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_composite.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_composite.py @@ -28,7 +28,6 @@ class OuterComposite(BaseModel): my_number: Optional[float] = None my_string: Optional[StrictStr] = None my_boolean: Optional[StrictBool] = None - __properties = ["my_number", "my_string", "my_boolean"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_object_with_enum_property.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_object_with_enum_property.py index 58959f5b17bb..bc4d1e167346 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_object_with_enum_property.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/outer_object_with_enum_property.py @@ -29,7 +29,6 @@ class OuterObjectWithEnumProperty(BaseModel): """ str_value: Optional[OuterEnum] = None value: OuterEnumInteger = Field(...) - __properties = ["str_value", "value"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/parent.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/parent.py index cc52de56a3c0..7ba4aab407e8 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/parent.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/parent.py @@ -27,7 +27,6 @@ class Parent(BaseModel): Parent """ optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(None, alias="optionalDict") - __properties = ["optionalDict"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/parent_with_optional_dict.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/parent_with_optional_dict.py index b910f83b8eae..999440310049 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/parent_with_optional_dict.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/parent_with_optional_dict.py @@ -27,7 +27,6 @@ class ParentWithOptionalDict(BaseModel): ParentWithOptionalDict """ optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(None, alias="optionalDict") - __properties = ["optionalDict"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/pet.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/pet.py index 06e8bc38ccc4..c483bc8941a8 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/pet.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/pet.py @@ -33,7 +33,6 @@ class Pet(BaseModel): photo_urls: conlist(StrictStr, min_items=0, unique_items=True) = Field(..., alias="photoUrls") tags: Optional[conlist(Tag)] = None status: Optional[StrictStr] = Field(None, description="pet status in the store") - __properties = ["id", "category", "name", "photoUrls", "tags", "status"] @validator('status') def status_validate_enum(cls, value): diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/pig.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/pig.py index 8d6478cb2cc5..42a3b40ccff3 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/pig.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/pig.py @@ -37,7 +37,7 @@ class Pig(BaseModel): if TYPE_CHECKING: actual_instance: Union[BasquePig, DanishPig] else: - actual_instance: Any + actual_instance: Any = None one_of_schemas: List[str] = Field(PIG_ONE_OF_SCHEMAS, const=True) @@ -45,9 +45,6 @@ class Pig(BaseModel): class Config: validate_assignment = True - discriminator_value_class_map = { - } - def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -55,8 +52,10 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) @validator('actual_instance') def actual_instance_must_validate_oneof(cls, v): @@ -64,17 +63,21 @@ def actual_instance_must_validate_oneof(cls, v): error_messages = [] match = 0 # validate data type: BasquePig - if not isinstance(v, BasquePig): - error_messages.append(f"Error! Input type `{type(v)}` is not `BasquePig`") - else: + try: + instance.oneof_schema_1_validator = v match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) # validate data type: DanishPig - if not isinstance(v, DanishPig): - error_messages.append(f"Error! Input type `{type(v)}` is not `DanishPig`") - else: + try: + instance.oneof_schema_2_validator = v match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when setting `actual_instance` in Pig with oneOf schemas: BasquePig, DanishPig. Details: " + ", ".join(error_messages)) elif match == 0: # no match @@ -108,6 +111,8 @@ def from_json(cls, json_str: str) -> Pig: if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when deserializing the JSON string into Pig with oneOf schemas: BasquePig, DanishPig. Details: " + ", ".join(error_messages)) elif match == 0: # no match diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/property_name_collision.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/property_name_collision.py index c6118a2fabd9..2c1bfa49906a 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/property_name_collision.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/property_name_collision.py @@ -28,7 +28,6 @@ class PropertyNameCollision(BaseModel): type: Optional[StrictStr] = Field(None, alias="_type") type: Optional[StrictStr] = None type_: Optional[StrictStr] = None - __properties = ["_type", "type", "type_"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/read_only_first.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/read_only_first.py index 892f302f304e..d9ee0ffd4f38 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/read_only_first.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/read_only_first.py @@ -27,7 +27,6 @@ class ReadOnlyFirst(BaseModel): """ bar: Optional[StrictStr] = None baz: Optional[StrictStr] = None - __properties = ["bar", "baz"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/second_ref.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/second_ref.py index 51d6b5980c0b..dbba9dabdf9c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/second_ref.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/second_ref.py @@ -27,7 +27,6 @@ class SecondRef(BaseModel): """ category: Optional[StrictStr] = None circular_ref: Optional[CircularReferenceModel] = None - __properties = ["category", "circular_ref"] """Pydantic configuration""" class Config: @@ -74,5 +73,8 @@ def from_dict(cls, obj: dict) -> SecondRef: return _obj from petstore_api.models.circular_reference_model import CircularReferenceModel -SecondRef.update_forward_refs() +try: + SecondRef.update_forward_refs() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/self_reference_model.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/self_reference_model.py index c1a61f7ea998..a837177d235c 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/self_reference_model.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/self_reference_model.py @@ -27,7 +27,6 @@ class SelfReferenceModel(BaseModel): """ size: Optional[StrictInt] = None nested: Optional[DummyModel] = None - __properties = ["size", "nested"] """Pydantic configuration""" class Config: @@ -74,5 +73,8 @@ def from_dict(cls, obj: dict) -> SelfReferenceModel: return _obj from petstore_api.models.dummy_model import DummyModel -SelfReferenceModel.update_forward_refs() +try: + SelfReferenceModel.update_forward_refs() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/special_model_name.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/special_model_name.py index d847e05341bd..bf89e1de2bd3 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/special_model_name.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/special_model_name.py @@ -26,7 +26,6 @@ class SpecialModelName(BaseModel): SpecialModelName """ special_property_name: Optional[StrictInt] = Field(None, alias="$special[property.name]") - __properties = ["$special[property.name]"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/special_name.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/special_name.py index 886252dde6ff..861203d85248 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/special_name.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/special_name.py @@ -29,7 +29,6 @@ class SpecialName(BaseModel): var_property: Optional[StrictInt] = Field(None, alias="property") var_async: Optional[Category] = Field(None, alias="async") var_schema: Optional[StrictStr] = Field(None, alias="schema", description="pet status in the store") - __properties = ["property", "async", "schema"] @validator('var_schema') def var_schema_validate_enum(cls, value): diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/tag.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/tag.py index a593806f058c..fabeeabfb98b 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/tag.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/tag.py @@ -27,7 +27,6 @@ class Tag(BaseModel): """ id: Optional[StrictInt] = None name: Optional[StrictStr] = None - __properties = ["id", "name"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/tiger.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/tiger.py index bf1111c222bc..aad2230b6d15 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/tiger.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/tiger.py @@ -26,7 +26,6 @@ class Tiger(BaseModel): Tiger """ skill: Optional[StrictStr] = None - __properties = ["skill"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/user.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/user.py index 3f04a229ede9..e424b4199ceb 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/user.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/user.py @@ -33,7 +33,6 @@ class User(BaseModel): password: Optional[StrictStr] = None phone: Optional[StrictStr] = None user_status: Optional[StrictInt] = Field(None, alias="userStatus", description="User Status") - __properties = ["id", "username", "firstName", "lastName", "email", "password", "phone", "userStatus"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/with_nested_one_of.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/with_nested_one_of.py index 9af30656878d..f25eb079ff67 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/with_nested_one_of.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/with_nested_one_of.py @@ -30,7 +30,6 @@ class WithNestedOneOf(BaseModel): size: Optional[StrictInt] = None nested_pig: Optional[Pig] = None nested_oneof_enum_string: Optional[OneOfEnumString] = None - __properties = ["size", "nested_pig", "nested_oneof_enum_string"] """Pydantic configuration""" class Config: diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/.github/workflows/python.yml b/samples/openapi3/client/petstore/python-pydantic-v2/.github/workflows/python.yml index 6752d090a969..fed030f265ed 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/.github/workflows/python.yml +++ b/samples/openapi3/client/petstore/python-pydantic-v2/.github/workflows/python.yml @@ -26,6 +26,7 @@ jobs: python -m pip install --upgrade pip pip install flake8 pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/.gitlab-ci.yml b/samples/openapi3/client/petstore/python-pydantic-v2/.gitlab-ci.yml index 1d94e3846964..b4719756536b 100755 --- a/samples/openapi3/client/petstore/python-pydantic-v2/.gitlab-ci.yml +++ b/samples/openapi3/client/petstore/python-pydantic-v2/.gitlab-ci.yml @@ -22,4 +22,10 @@ pytest-3.8: image: python:3.8-alpine pytest-3.9: extends: .pytest - image: python:3.9-alpine \ No newline at end of file + image: python:3.9-alpine +pytest-3.10: + extends: .pytest + image: python:3.10-alpine +pytest-3.11: + extends: .pytest + image: python:3.11-alpine diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/.openapi-generator/FILES b/samples/openapi3/client/petstore/python-pydantic-v2/.openapi-generator/FILES index 6aacf0a81498..fdd09778983b 100755 --- a/samples/openapi3/client/petstore/python-pydantic-v2/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python-pydantic-v2/.openapi-generator/FILES @@ -21,6 +21,7 @@ docs/BasquePig.md docs/Capitalization.md docs/Cat.md docs/Category.md +docs/CircularReferenceModel.md docs/ClassModel.md docs/Client.md docs/Color.md @@ -40,6 +41,7 @@ docs/FakeApi.md docs/FakeClassnameTags123Api.md docs/File.md docs/FileSchemaTestClass.md +docs/FirstRef.md docs/Foo.md docs/FooGetDefaultResponse.md docs/FormatTest.md @@ -74,6 +76,7 @@ docs/PetApi.md docs/Pig.md docs/PropertyNameCollision.md docs/ReadOnlyFirst.md +docs/SecondRef.md docs/SelfReferenceModel.md docs/SingleRefType.md docs/SpecialCharacterEnum.md @@ -117,6 +120,7 @@ petstore_api/models/basque_pig.py petstore_api/models/capitalization.py petstore_api/models/cat.py petstore_api/models/category.py +petstore_api/models/circular_reference_model.py petstore_api/models/class_model.py petstore_api/models/client.py petstore_api/models/color.py @@ -133,6 +137,7 @@ petstore_api/models/enum_string2.py petstore_api/models/enum_test.py petstore_api/models/file.py petstore_api/models/file_schema_test_class.py +petstore_api/models/first_ref.py petstore_api/models/foo.py petstore_api/models/foo_get_default_response.py petstore_api/models/format_test.py @@ -166,6 +171,7 @@ petstore_api/models/pet.py petstore_api/models/pig.py petstore_api/models/property_name_collision.py petstore_api/models/read_only_first.py +petstore_api/models/second_ref.py petstore_api/models/self_reference_model.py petstore_api/models/single_ref_type.py petstore_api/models/special_character_enum.py diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python-pydantic-v2/.openapi-generator/VERSION index 44bad91b171c..40e36364ab27 100755 --- a/samples/openapi3/client/petstore/python-pydantic-v2/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/python-pydantic-v2/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/README.md b/samples/openapi3/client/petstore/python-pydantic-v2/README.md index 044c74065b1c..7882186348d2 100755 --- a/samples/openapi3/client/petstore/python-pydantic-v2/README.md +++ b/samples/openapi3/client/petstore/python-pydantic-v2/README.md @@ -151,6 +151,7 @@ Class | Method | HTTP request | Description - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - [Category](docs/Category.md) + - [CircularReferenceModel](docs/CircularReferenceModel.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Color](docs/Color.md) @@ -167,6 +168,7 @@ Class | Method | HTTP request | Description - [EnumTest](docs/EnumTest.md) - [File](docs/File.md) - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [FirstRef](docs/FirstRef.md) - [Foo](docs/Foo.md) - [FooGetDefaultResponse](docs/FooGetDefaultResponse.md) - [FormatTest](docs/FormatTest.md) @@ -200,6 +202,7 @@ Class | Method | HTTP request | Description - [Pig](docs/Pig.md) - [PropertyNameCollision](docs/PropertyNameCollision.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [SecondRef](docs/SecondRef.md) - [SelfReferenceModel](docs/SelfReferenceModel.md) - [SingleRefType](docs/SingleRefType.md) - [SpecialCharacterEnum](docs/SpecialCharacterEnum.md) diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/__init__.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/__init__.py index 2fb3745aeaa2..9803f5297120 100755 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/__init__.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/__init__.py @@ -55,6 +55,7 @@ from petstore_api.models.capitalization import Capitalization from petstore_api.models.cat import Cat from petstore_api.models.category import Category +from petstore_api.models.circular_reference_model import CircularReferenceModel from petstore_api.models.class_model import ClassModel from petstore_api.models.client import Client from petstore_api.models.color import Color @@ -71,6 +72,7 @@ from petstore_api.models.enum_test import EnumTest from petstore_api.models.file import File from petstore_api.models.file_schema_test_class import FileSchemaTestClass +from petstore_api.models.first_ref import FirstRef from petstore_api.models.foo import Foo from petstore_api.models.foo_get_default_response import FooGetDefaultResponse from petstore_api.models.format_test import FormatTest @@ -104,6 +106,7 @@ from petstore_api.models.pig import Pig from petstore_api.models.property_name_collision import PropertyNameCollision from petstore_api.models.read_only_first import ReadOnlyFirst +from petstore_api.models.second_ref import SecondRef from petstore_api.models.self_reference_model import SelfReferenceModel from petstore_api.models.single_ref_type import SingleRefType from petstore_api.models.special_character_enum import SpecialCharacterEnum diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api/fake_api.py index 71ce52841e8d..4b832eb3ef71 100755 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api/fake_api.py @@ -22,7 +22,7 @@ from typing_extensions import Annotated from datetime import date, datetime -from pydantic import Field, StrictBool, StrictBytes, StrictFloat, StrictInt, StrictStr, conbytes, confloat, conint, conlist, constr, validator +from pydantic import Field, StrictBool, StrictBytes, StrictFloat, StrictInt, StrictStr, conbytes, confloat, conint, conlist, constr, field_validator from typing import Any, Dict, List, Optional, Union @@ -572,7 +572,7 @@ def fake_http_signature_test_with_http_info(self, pet : Annotated[Pet, Field(... # process the header parameters _header_params = dict(_params.get('_headers', {})) - if _params['header_1']: + if _params['header_1'] is not None: _header_params['header_1'] = _params['header_1'] # process the form parameters @@ -2510,49 +2510,49 @@ def test_endpoint_parameters_with_http_info(self, number : Annotated[confloat(le # process the form parameters _form_params = [] _files = {} - if _params['integer']: + if _params['integer'] is not None: _form_params.append(('integer', _params['integer'])) - if _params['int32']: + if _params['int32'] is not None: _form_params.append(('int32', _params['int32'])) - if _params['int64']: + if _params['int64'] is not None: _form_params.append(('int64', _params['int64'])) - if _params['number']: + if _params['number'] is not None: _form_params.append(('number', _params['number'])) - if _params['float']: + if _params['float'] is not None: _form_params.append(('float', _params['float'])) - if _params['double']: + if _params['double'] is not None: _form_params.append(('double', _params['double'])) - if _params['string']: + if _params['string'] is not None: _form_params.append(('string', _params['string'])) - if _params['pattern_without_delimiter']: + if _params['pattern_without_delimiter'] is not None: _form_params.append(('pattern_without_delimiter', _params['pattern_without_delimiter'])) - if _params['byte']: + if _params['byte'] is not None: _form_params.append(('byte', _params['byte'])) - if _params['binary']: + if _params['binary'] is not None: _files['binary'] = _params['binary'] - if _params['byte_with_max_length']: + if _params['byte_with_max_length'] is not None: _form_params.append(('byte_with_max_length', _params['byte_with_max_length'])) - if _params['var_date']: + if _params['var_date'] is not None: _form_params.append(('date', _params['var_date'])) - if _params['date_time']: + if _params['date_time'] is not None: _form_params.append(('dateTime', _params['date_time'])) - if _params['password']: + if _params['password'] is not None: _form_params.append(('password', _params['password'])) - if _params['param_callback']: + if _params['param_callback'] is not None: _form_params.append(('callback', _params['param_callback'])) # process the body parameter @@ -2727,10 +2727,10 @@ def test_group_parameters_with_http_info(self, required_string_group : Annotated # process the header parameters _header_params = dict(_params.get('_headers', {})) - if _params['required_boolean_group']: + if _params['required_boolean_group'] is not None: _header_params['required_boolean_group'] = _params['required_boolean_group'] - if _params['boolean_group']: + if _params['boolean_group'] is not None: _header_params['boolean_group'] = _params['boolean_group'] # process the form parameters @@ -3013,10 +3013,10 @@ def test_json_form_data_with_http_info(self, param : Annotated[StrictStr, Field( # process the form parameters _form_params = [] _files = {} - if _params['param']: + if _params['param'] is not None: _form_params.append(('param', _params['param'])) - if _params['param2']: + if _params['param2'] is not None: _form_params.append(('param2', _params['param2'])) # process the body parameter diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api/pet_api.py index 979aaa65a244..95f57f66521e 100755 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api/pet_api.py @@ -20,7 +20,7 @@ from typing_extensions import Annotated from typing_extensions import Annotated -from pydantic import Field, StrictBytes, StrictInt, StrictStr, conlist, validator +from pydantic import Field, StrictBytes, StrictInt, StrictStr, conlist, field_validator from typing import List, Optional, Union @@ -292,7 +292,7 @@ def delete_pet_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., des # process the path parameters _path_params = {} - if _params['pet_id']: + if _params['pet_id'] is not None: _path_params['petId'] = _params['pet_id'] @@ -300,7 +300,7 @@ def delete_pet_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., des _query_params = [] # process the header parameters _header_params = dict(_params.get('_headers', {})) - if _params['api_key']: + if _params['api_key'] is not None: _header_params['api_key'] = _params['api_key'] # process the form parameters @@ -715,7 +715,7 @@ def get_pet_by_id_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., # process the path parameters _path_params = {} - if _params['pet_id']: + if _params['pet_id'] is not None: _path_params['petId'] = _params['pet_id'] @@ -1008,7 +1008,7 @@ def update_pet_with_form_with_http_info(self, pet_id : Annotated[StrictInt, Fiel # process the path parameters _path_params = {} - if _params['pet_id']: + if _params['pet_id'] is not None: _path_params['petId'] = _params['pet_id'] @@ -1019,10 +1019,10 @@ def update_pet_with_form_with_http_info(self, pet_id : Annotated[StrictInt, Fiel # process the form parameters _form_params = [] _files = {} - if _params['name']: + if _params['name'] is not None: _form_params.append(('name', _params['name'])) - if _params['status']: + if _params['status'] is not None: _form_params.append(('status', _params['status'])) # process the body parameter @@ -1165,7 +1165,7 @@ def upload_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., de # process the path parameters _path_params = {} - if _params['pet_id']: + if _params['pet_id'] is not None: _path_params['petId'] = _params['pet_id'] @@ -1176,10 +1176,10 @@ def upload_file_with_http_info(self, pet_id : Annotated[StrictInt, Field(..., de # process the form parameters _form_params = [] _files = {} - if _params['additional_metadata']: + if _params['additional_metadata'] is not None: _form_params.append(('additionalMetadata', _params['additional_metadata'])) - if _params['file']: + if _params['file'] is not None: _files['file'] = _params['file'] # process the body parameter @@ -1328,7 +1328,7 @@ def upload_file_with_required_file_with_http_info(self, pet_id : Annotated[Stric # process the path parameters _path_params = {} - if _params['pet_id']: + if _params['pet_id'] is not None: _path_params['petId'] = _params['pet_id'] @@ -1339,10 +1339,10 @@ def upload_file_with_required_file_with_http_info(self, pet_id : Annotated[Stric # process the form parameters _form_params = [] _files = {} - if _params['additional_metadata']: + if _params['additional_metadata'] is not None: _form_params.append(('additionalMetadata', _params['additional_metadata'])) - if _params['required_file']: + if _params['required_file'] is not None: _files['requiredFile'] = _params['required_file'] # process the body parameter diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api/store_api.py index 5258426e129d..a13a8fc4e021 100755 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api/store_api.py @@ -145,7 +145,7 @@ def delete_order_with_http_info(self, order_id : Annotated[StrictStr, Field(..., # process the path parameters _path_params = {} - if _params['order_id']: + if _params['order_id'] is not None: _path_params['order_id'] = _params['order_id'] @@ -411,7 +411,7 @@ def get_order_by_id_with_http_info(self, order_id : Annotated[conint(strict=True # process the path parameters _path_params = {} - if _params['order_id']: + if _params['order_id'] is not None: _path_params['order_id'] = _params['order_id'] diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api/user_api.py index 4e5cd3eae811..6e6bb81bab4d 100755 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api/user_api.py @@ -581,7 +581,7 @@ def delete_user_with_http_info(self, username : Annotated[StrictStr, Field(..., # process the path parameters _path_params = {} - if _params['username']: + if _params['username'] is not None: _path_params['username'] = _params['username'] @@ -715,7 +715,7 @@ def get_user_by_name_with_http_info(self, username : Annotated[StrictStr, Field( # process the path parameters _path_params = {} - if _params['username']: + if _params['username'] is not None: _path_params['username'] = _params['username'] @@ -1137,7 +1137,7 @@ def update_user_with_http_info(self, username : Annotated[StrictStr, Field(..., # process the path parameters _path_params = {} - if _params['username']: + if _params['username'] is not None: _path_params['username'] = _params['username'] diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api_client.py index d5f9031e32ca..5fb593b6559a 100755 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api_client.py @@ -222,7 +222,8 @@ def __call_api( self.last_response = response_data - return_data = None # assuming derialization is not needed + return_data = None # assuming deserialization is not needed + return_headers = None # data needs deserialization or returns HTTP data (deserialized) only if _preload_content or _return_http_data_only: response_type = response_types_map.get(str(response_data.status), None) @@ -243,17 +244,20 @@ def __call_api( # deserialize response data if response_type == "bytearray": return_data = response_data.data + return_headers = response_data.headers elif response_type: return_data = self.deserialize(response_data, response_type) + return_headers = response_data.getheaders() else: return_data = None + return_headers = response_data.getheaders() if _return_http_data_only: return return_data else: return ApiResponse(status_code = response_data.status, data = return_data, - headers = response_data.getheaders(), + headers = return_headers, raw_data = response_data.data) def sanitize_for_serialization(self, obj): @@ -405,27 +409,28 @@ def call_api(self, resource_path, method, If parameter async_req is False or missing, then the method will return the response directly. """ + args = ( + resource_path, + method, + path_params, + query_params, + header_params, + body, + post_params, + files, + response_types_map, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, + _request_auth, + ) if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_types_map, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host, - _request_auth) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_types_map, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, _request_auth)) + return self.__call_api(*args) + + return self.pool.apply_async(self.__call_api, args) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/__init__.py index b3a4d362afc6..5e4468e4b56f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/__init__.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/__init__.py @@ -31,6 +31,7 @@ from petstore_api.models.capitalization import Capitalization from petstore_api.models.cat import Cat from petstore_api.models.category import Category +from petstore_api.models.circular_reference_model import CircularReferenceModel from petstore_api.models.class_model import ClassModel from petstore_api.models.client import Client from petstore_api.models.color import Color @@ -47,6 +48,7 @@ from petstore_api.models.enum_test import EnumTest from petstore_api.models.file import File from petstore_api.models.file_schema_test_class import FileSchemaTestClass +from petstore_api.models.first_ref import FirstRef from petstore_api.models.foo import Foo from petstore_api.models.foo_get_default_response import FooGetDefaultResponse from petstore_api.models.format_test import FormatTest @@ -80,6 +82,7 @@ from petstore_api.models.pig import Pig from petstore_api.models.property_name_collision import PropertyNameCollision from petstore_api.models.read_only_first import ReadOnlyFirst +from petstore_api.models.second_ref import SecondRef from petstore_api.models.self_reference_model import SelfReferenceModel from petstore_api.models.single_ref_type import SingleRefType from petstore_api.models.special_character_enum import SpecialCharacterEnum diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/additional_properties_any_type.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/additional_properties_any_type.py index 22dda9cd1174..eaef63eba2c5 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/additional_properties_any_type.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/additional_properties_any_type.py @@ -27,7 +27,6 @@ class AdditionalPropertiesAnyType(BaseModel): """ name: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["name"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class AdditionalPropertiesAnyType(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> AdditionalPropertiesAnyType: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> AdditionalPropertiesAnyType: return None if not isinstance(obj, dict): - return AdditionalPropertiesAnyType.parse_obj(obj) + return AdditionalPropertiesAnyType.model_validate(obj) - _obj = AdditionalPropertiesAnyType.parse_obj({ + _obj = AdditionalPropertiesAnyType.model_validate({ "name": obj.get("name") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/additional_properties_class.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/additional_properties_class.py index 77a275f8dd31..fc66331a3d53 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/additional_properties_class.py @@ -28,7 +28,6 @@ class AdditionalPropertiesClass(BaseModel): map_property: Optional[Dict[str, StrictStr]] = None map_of_map_property: Optional[Dict[str, Dict[str, StrictStr]]] = None additional_properties: Dict[str, Any] = {} - __properties = ["map_property", "map_of_map_property"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class AdditionalPropertiesClass(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> AdditionalPropertiesClass: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -70,15 +69,15 @@ def from_dict(cls, obj: dict) -> AdditionalPropertiesClass: return None if not isinstance(obj, dict): - return AdditionalPropertiesClass.parse_obj(obj) + return AdditionalPropertiesClass.model_validate(obj) - _obj = AdditionalPropertiesClass.parse_obj({ + _obj = AdditionalPropertiesClass.model_validate({ "map_property": obj.get("map_property"), "map_of_map_property": obj.get("map_of_map_property") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["map_property", "map_of_map_property"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/additional_properties_object.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/additional_properties_object.py index 7254315fc50e..ffd84283a415 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/additional_properties_object.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/additional_properties_object.py @@ -27,7 +27,6 @@ class AdditionalPropertiesObject(BaseModel): """ name: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["name"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class AdditionalPropertiesObject(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> AdditionalPropertiesObject: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> AdditionalPropertiesObject: return None if not isinstance(obj, dict): - return AdditionalPropertiesObject.parse_obj(obj) + return AdditionalPropertiesObject.model_validate(obj) - _obj = AdditionalPropertiesObject.parse_obj({ + _obj = AdditionalPropertiesObject.model_validate({ "name": obj.get("name") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/additional_properties_with_description_only.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/additional_properties_with_description_only.py index 59219a93c349..bb3ab9abc249 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/additional_properties_with_description_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/additional_properties_with_description_only.py @@ -27,7 +27,6 @@ class AdditionalPropertiesWithDescriptionOnly(BaseModel): """ name: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["name"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class AdditionalPropertiesWithDescriptionOnly(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> AdditionalPropertiesWithDescriptionOnly: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> AdditionalPropertiesWithDescriptionOnly: return None if not isinstance(obj, dict): - return AdditionalPropertiesWithDescriptionOnly.parse_obj(obj) + return AdditionalPropertiesWithDescriptionOnly.model_validate(obj) - _obj = AdditionalPropertiesWithDescriptionOnly.parse_obj({ + _obj = AdditionalPropertiesWithDescriptionOnly.model_validate({ "name": obj.get("name") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/all_of_with_single_ref.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/all_of_with_single_ref.py index 34eada9a625f..875eb7bf8237 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/all_of_with_single_ref.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/all_of_with_single_ref.py @@ -29,7 +29,6 @@ class AllOfWithSingleRef(BaseModel): username: Optional[StrictStr] = None single_ref_type: Optional[SingleRefType] = Field(None, alias="SingleRefType") additional_properties: Dict[str, Any] = {} - __properties = ["username", "SingleRefType"] """Pydantic configuration""" model_config = { @@ -39,7 +38,7 @@ class AllOfWithSingleRef(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -52,7 +51,7 @@ def from_json(cls, json_str: str) -> AllOfWithSingleRef: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -71,15 +70,15 @@ def from_dict(cls, obj: dict) -> AllOfWithSingleRef: return None if not isinstance(obj, dict): - return AllOfWithSingleRef.parse_obj(obj) + return AllOfWithSingleRef.model_validate(obj) - _obj = AllOfWithSingleRef.parse_obj({ + _obj = AllOfWithSingleRef.model_validate({ "username": obj.get("username"), "single_ref_type": obj.get("SingleRefType") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["username", "SingleRefType"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/animal.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/animal.py index 678dfe222968..fb469490a14c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/animal.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/animal.py @@ -28,7 +28,6 @@ class Animal(BaseModel): class_name: StrictStr = Field(..., alias="className") color: Optional[StrictStr] = 'red' additional_properties: Dict[str, Any] = {} - __properties = ["className", "color"] """Pydantic configuration""" model_config = { @@ -37,26 +36,23 @@ class Animal(BaseModel): } # JSON field name that stores the object type - __discriminator_property_name = 'className' - - # discriminator mappings - __discriminator_value_class_map = { - 'Cat': 'Cat', - 'Dog': 'Dog' - } @classmethod def get_discriminator_value(cls, obj: dict) -> str: """Returns the discriminator value (object type) of the data""" - discriminator_value = obj[cls.__discriminator_property_name] + discriminator_value = obj['className'] + discriminator_value_class_map = { + 'Cat': 'Cat','Dog': 'Dog' + } + if discriminator_value: - return cls.__discriminator_value_class_map.get(discriminator_value) + return discriminator_value_class_map.get(discriminator_value) else: return None def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -69,7 +65,7 @@ def from_json(cls, json_str: str) -> Union(Cat, Dog): def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -86,15 +82,21 @@ def from_dict(cls, obj: dict) -> Union(Cat, Dog): """Create an instance of Animal from a dict""" # look up the object type based on discriminator mapping object_type = cls.get_discriminator_value(obj) + discriminator_value_class_map = { + 'Cat': 'Cat','Dog': 'Dog' + } if object_type: klass = globals()[object_type] return klass.from_dict(obj) else: raise ValueError("Animal failed to lookup discriminator value from " + - json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + - ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) + json.dumps(obj) + ". Discriminator property name: " + 'className' + + ", mapping: " + json.dumps(discriminator_value_class_map)) from petstore_api.models.cat import Cat from petstore_api.models.dog import Dog -Animal.update_forward_refs() +try: + Animal.model_rebuild() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/any_of_color.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/any_of_color.py index e178a110e51a..476ff07df79b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/any_of_color.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/any_of_color.py @@ -19,7 +19,7 @@ import re # noqa: F401 from typing import List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, conint, conlist, constr, validator +from pydantic import BaseModel, Field, StrictStr, ValidationError, conint, conlist, constr, field_validator from typing import Union, Any, List, TYPE_CHECKING try: from typing import Literal @@ -43,7 +43,7 @@ class AnyOfColor(BaseModel): if TYPE_CHECKING: actual_instance: Union[List[int], str] else: - actual_instance: Any + actual_instance: Any = None any_of_schemas: List[str] = Literal["List[int]", "str"] """Pydantic configuration""" @@ -58,12 +58,14 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) - @validator('actual_instance') + @field_validator('actual_instance') def actual_instance_must_validate_anyof(cls, v): - instance = AnyOfColor.construct() + instance = AnyOfColor.model_construct() error_messages = [] # validate data type: List[int] try: @@ -96,7 +98,7 @@ def from_dict(cls, obj: dict) -> AnyOfColor: @classmethod def from_json(cls, json_str: str) -> AnyOfColor: """Returns the object represented by the json string""" - instance = AnyOfColor.construct() + instance = AnyOfColor.model_construct() error_messages = [] # deserialize data into List[int] try: @@ -156,6 +158,6 @@ def to_dict(self) -> dict: def to_str(self) -> str: """Returns the string representation of the actual instance""" - return pprint.pformat(self.dict()) + return pprint.pformat(self.model_dump()) diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/any_of_pig.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/any_of_pig.py index 1f5c819e7dfd..4a033002e45f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/any_of_pig.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/any_of_pig.py @@ -19,7 +19,7 @@ import re # noqa: F401 from typing import Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, validator +from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator from petstore_api.models.basque_pig import BasquePig from petstore_api.models.danish_pig import DanishPig from typing import Union, Any, List, TYPE_CHECKING @@ -43,7 +43,7 @@ class AnyOfPig(BaseModel): if TYPE_CHECKING: actual_instance: Union[BasquePig, DanishPig] else: - actual_instance: Any + actual_instance: Any = None any_of_schemas: List[str] = Literal["BasquePig", "DanishPig"] """Pydantic configuration""" @@ -58,25 +58,27 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) - @validator('actual_instance') + @field_validator('actual_instance') def actual_instance_must_validate_anyof(cls, v): - instance = AnyOfPig.construct() + instance = AnyOfPig.model_construct() error_messages = [] # validate data type: BasquePig - if not isinstance(v, BasquePig): - error_messages.append(f"Error! Input type `{type(v)}` is not `BasquePig`") - else: + try: + instance.anyof_schema_1_validator = v return v - + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) # validate data type: DanishPig - if not isinstance(v, DanishPig): - error_messages.append(f"Error! Input type `{type(v)}` is not `DanishPig`") - else: + try: + instance.anyof_schema_2_validator = v return v - + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) if error_messages: # no match raise ValueError("No match found when setting the actual_instance in AnyOfPig with anyOf schemas: BasquePig, DanishPig. Details: " + ", ".join(error_messages)) @@ -90,7 +92,7 @@ def from_dict(cls, obj: dict) -> AnyOfPig: @classmethod def from_json(cls, json_str: str) -> AnyOfPig: """Returns the object represented by the json string""" - instance = AnyOfPig.construct() + instance = AnyOfPig.model_construct() error_messages = [] # anyof_schema_1_validator: Optional[BasquePig] = None try: @@ -135,6 +137,6 @@ def to_dict(self) -> dict: def to_str(self) -> str: """Returns the string representation of the actual instance""" - return pprint.pformat(self.dict()) + return pprint.pformat(self.model_dump()) diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/api_response.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/api_response.py index 3c176c73e294..db939f2eac85 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/api_response.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/api_response.py @@ -29,7 +29,6 @@ class ApiResponse(BaseModel): type: Optional[StrictStr] = None message: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["code", "type", "message"] """Pydantic configuration""" model_config = { @@ -39,7 +38,7 @@ class ApiResponse(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -52,7 +51,7 @@ def from_json(cls, json_str: str) -> ApiResponse: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -71,16 +70,16 @@ def from_dict(cls, obj: dict) -> ApiResponse: return None if not isinstance(obj, dict): - return ApiResponse.parse_obj(obj) + return ApiResponse.model_validate(obj) - _obj = ApiResponse.parse_obj({ + _obj = ApiResponse.model_validate({ "code": obj.get("code"), "type": obj.get("type"), "message": obj.get("message") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["code", "type", "message"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/array_of_array_of_model.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/array_of_array_of_model.py index 1b6c9a6e1338..2bf2d4906c5b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/array_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/array_of_array_of_model.py @@ -28,7 +28,6 @@ class ArrayOfArrayOfModel(BaseModel): """ another_property: Optional[conlist(conlist(Tag))] = None additional_properties: Dict[str, Any] = {} - __properties = ["another_property"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class ArrayOfArrayOfModel(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> ArrayOfArrayOfModel: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -79,9 +78,9 @@ def from_dict(cls, obj: dict) -> ArrayOfArrayOfModel: return None if not isinstance(obj, dict): - return ArrayOfArrayOfModel.parse_obj(obj) + return ArrayOfArrayOfModel.model_validate(obj) - _obj = ArrayOfArrayOfModel.parse_obj({ + _obj = ArrayOfArrayOfModel.model_validate({ "another_property": [ [Tag.from_dict(_inner_item) for _inner_item in _item] for _item in obj.get("another_property") @@ -89,7 +88,7 @@ def from_dict(cls, obj: dict) -> ArrayOfArrayOfModel: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["another_property"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/array_of_array_of_number_only.py index 8e908b531f5c..4441738f78e3 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/array_of_array_of_number_only.py @@ -27,7 +27,6 @@ class ArrayOfArrayOfNumberOnly(BaseModel): """ array_array_number: Optional[conlist(conlist(StrictFloat))] = Field(None, alias="ArrayArrayNumber") additional_properties: Dict[str, Any] = {} - __properties = ["ArrayArrayNumber"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class ArrayOfArrayOfNumberOnly(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> ArrayOfArrayOfNumberOnly: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> ArrayOfArrayOfNumberOnly: return None if not isinstance(obj, dict): - return ArrayOfArrayOfNumberOnly.parse_obj(obj) + return ArrayOfArrayOfNumberOnly.model_validate(obj) - _obj = ArrayOfArrayOfNumberOnly.parse_obj({ + _obj = ArrayOfArrayOfNumberOnly.model_validate({ "array_array_number": obj.get("ArrayArrayNumber") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["ArrayArrayNumber"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/array_of_number_only.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/array_of_number_only.py index cf4fa2f1039e..63dd35643d8d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/array_of_number_only.py @@ -27,7 +27,6 @@ class ArrayOfNumberOnly(BaseModel): """ array_number: Optional[conlist(StrictFloat)] = Field(None, alias="ArrayNumber") additional_properties: Dict[str, Any] = {} - __properties = ["ArrayNumber"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class ArrayOfNumberOnly(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> ArrayOfNumberOnly: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> ArrayOfNumberOnly: return None if not isinstance(obj, dict): - return ArrayOfNumberOnly.parse_obj(obj) + return ArrayOfNumberOnly.model_validate(obj) - _obj = ArrayOfNumberOnly.parse_obj({ + _obj = ArrayOfNumberOnly.model_validate({ "array_number": obj.get("ArrayNumber") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["ArrayNumber"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/array_test.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/array_test.py index ba695c59d32a..0157b7a3db87 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/array_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/array_test.py @@ -30,7 +30,6 @@ class ArrayTest(BaseModel): array_array_of_integer: Optional[conlist(conlist(StrictInt))] = None array_array_of_model: Optional[conlist(conlist(ReadOnlyFirst))] = None additional_properties: Dict[str, Any] = {} - __properties = ["array_of_string", "array_array_of_integer", "array_array_of_model"] """Pydantic configuration""" model_config = { @@ -40,7 +39,7 @@ class ArrayTest(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -53,7 +52,7 @@ def from_json(cls, json_str: str) -> ArrayTest: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -81,9 +80,9 @@ def from_dict(cls, obj: dict) -> ArrayTest: return None if not isinstance(obj, dict): - return ArrayTest.parse_obj(obj) + return ArrayTest.model_validate(obj) - _obj = ArrayTest.parse_obj({ + _obj = ArrayTest.model_validate({ "array_of_string": obj.get("array_of_string"), "array_array_of_integer": obj.get("array_array_of_integer"), "array_array_of_model": [ @@ -93,7 +92,7 @@ def from_dict(cls, obj: dict) -> ArrayTest: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["array_of_string", "array_array_of_integer", "array_array_of_model"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/basque_pig.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/basque_pig.py index 4738611803df..42a34809caa7 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/basque_pig.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/basque_pig.py @@ -28,7 +28,6 @@ class BasquePig(BaseModel): class_name: StrictStr = Field(..., alias="className") color: StrictStr = Field(...) additional_properties: Dict[str, Any] = {} - __properties = ["className", "color"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class BasquePig(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> BasquePig: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -70,15 +69,15 @@ def from_dict(cls, obj: dict) -> BasquePig: return None if not isinstance(obj, dict): - return BasquePig.parse_obj(obj) + return BasquePig.model_validate(obj) - _obj = BasquePig.parse_obj({ + _obj = BasquePig.model_validate({ "class_name": obj.get("className"), "color": obj.get("color") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["className", "color"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/capitalization.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/capitalization.py index 0b5393374277..acc6b50d1c88 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/capitalization.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/capitalization.py @@ -32,7 +32,6 @@ class Capitalization(BaseModel): sca_eth_flow_points: Optional[StrictStr] = Field(None, alias="SCA_ETH_Flow_Points") att_name: Optional[StrictStr] = Field(None, alias="ATT_NAME", description="Name of the pet ") additional_properties: Dict[str, Any] = {} - __properties = ["smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME"] """Pydantic configuration""" model_config = { @@ -42,7 +41,7 @@ class Capitalization(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -55,7 +54,7 @@ def from_json(cls, json_str: str) -> Capitalization: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -74,9 +73,9 @@ def from_dict(cls, obj: dict) -> Capitalization: return None if not isinstance(obj, dict): - return Capitalization.parse_obj(obj) + return Capitalization.model_validate(obj) - _obj = Capitalization.parse_obj({ + _obj = Capitalization.model_validate({ "small_camel": obj.get("smallCamel"), "capital_camel": obj.get("CapitalCamel"), "small_snake": obj.get("small_Snake"), @@ -86,7 +85,7 @@ def from_dict(cls, obj: dict) -> Capitalization: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/cat.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/cat.py index 01bf3dea821b..b02ebf9d6eec 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/cat.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/cat.py @@ -28,7 +28,6 @@ class Cat(Animal): """ declawed: Optional[StrictBool] = None additional_properties: Dict[str, Any] = {} - __properties = ["className", "color", "declawed"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class Cat(Animal): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> Cat: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -70,16 +69,16 @@ def from_dict(cls, obj: dict) -> Cat: return None if not isinstance(obj, dict): - return Cat.parse_obj(obj) + return Cat.model_validate(obj) - _obj = Cat.parse_obj({ + _obj = Cat.model_validate({ "class_name": obj.get("className"), "color": obj.get("color") if obj.get("color") is not None else 'red', "declawed": obj.get("declawed") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["className", "color", "declawed"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/category.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/category.py index a8f297a19c64..f3dfc7607a09 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/category.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/category.py @@ -28,7 +28,6 @@ class Category(BaseModel): id: Optional[StrictInt] = None name: StrictStr = Field(...) additional_properties: Dict[str, Any] = {} - __properties = ["id", "name"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class Category(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> Category: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -70,15 +69,15 @@ def from_dict(cls, obj: dict) -> Category: return None if not isinstance(obj, dict): - return Category.parse_obj(obj) + return Category.model_validate(obj) - _obj = Category.parse_obj({ + _obj = Category.model_validate({ "id": obj.get("id"), "name": obj.get("name") if obj.get("name") is not None else 'default-name' }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["id", "name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/circular_reference_model.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/circular_reference_model.py index 9a3c62cfbe72..87bae3fc1de9 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/circular_reference_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/circular_reference_model.py @@ -28,7 +28,6 @@ class CircularReferenceModel(BaseModel): size: Optional[StrictInt] = None nested: Optional[FirstRef] = None additional_properties: Dict[str, Any] = {} - __properties = ["size", "nested"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class CircularReferenceModel(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> CircularReferenceModel: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -73,19 +72,22 @@ def from_dict(cls, obj: dict) -> CircularReferenceModel: return None if not isinstance(obj, dict): - return CircularReferenceModel.parse_obj(obj) + return CircularReferenceModel.model_validate(obj) - _obj = CircularReferenceModel.parse_obj({ + _obj = CircularReferenceModel.model_validate({ "size": obj.get("size"), "nested": FirstRef.from_dict(obj.get("nested")) if obj.get("nested") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["size", "nested"]: _obj.additional_properties[_key] = obj.get(_key) return _obj from petstore_api.models.first_ref import FirstRef -CircularReferenceModel.update_forward_refs() +try: + CircularReferenceModel.model_rebuild() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/class_model.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/class_model.py index 34e526e1641b..06bb096e0d49 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/class_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/class_model.py @@ -27,7 +27,6 @@ class ClassModel(BaseModel): """ var_class: Optional[StrictStr] = Field(None, alias="_class") additional_properties: Dict[str, Any] = {} - __properties = ["_class"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class ClassModel(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> ClassModel: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> ClassModel: return None if not isinstance(obj, dict): - return ClassModel.parse_obj(obj) + return ClassModel.model_validate(obj) - _obj = ClassModel.parse_obj({ + _obj = ClassModel.model_validate({ "var_class": obj.get("_class") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["_class"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/client.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/client.py index dfc21947aa42..cf59980ff0da 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/client.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/client.py @@ -27,7 +27,6 @@ class Client(BaseModel): """ client: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["client"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class Client(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> Client: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> Client: return None if not isinstance(obj, dict): - return Client.parse_obj(obj) + return Client.model_validate(obj) - _obj = Client.parse_obj({ + _obj = Client.model_validate({ "client": obj.get("client") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["client"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/color.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/color.py index a05243df89ee..544a790b85e9 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/color.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/color.py @@ -19,7 +19,7 @@ import re # noqa: F401 from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, conint, conlist, constr, validator +from pydantic import BaseModel, Field, StrictStr, ValidationError, conint, conlist, constr, field_validator from typing import Union, Any, List, TYPE_CHECKING try: from typing import Literal @@ -40,9 +40,9 @@ class Color(BaseModel): # data type: str oneof_schema_3_validator: Optional[constr(strict=True, max_length=7, min_length=7)] = Field(None, description="Hex color string, such as #00FF00.") if TYPE_CHECKING: - actual_instance: Union[List[int], str] + actual_instance: Union[List[int], str, None] else: - actual_instance: Any + actual_instance: Any = None one_of_schemas: List[str] = Literal["List[int]", "str"] @@ -58,15 +58,17 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) - @validator('actual_instance') + @field_validator('actual_instance') def actual_instance_must_validate_oneof(cls, v): if v is None: return v - instance = Color.construct() + instance = Color.model_construct() error_messages = [] match = 0 # validate data type: List[int] @@ -89,6 +91,8 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(str(e)) if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when setting `actual_instance` in Color with oneOf schemas: List[int], str. Details: " + ", ".join(error_messages)) elif match == 0: # no match @@ -103,7 +107,7 @@ def from_dict(cls, obj: dict) -> Color: @classmethod def from_json(cls, json_str: str) -> Color: """Returns the object represented by the json string""" - instance = Color.construct() + instance = Color.model_construct() if json_str is None: return instance @@ -140,6 +144,8 @@ def from_json(cls, json_str: str) -> Color: if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when deserializing the JSON string into Color with oneOf schemas: List[int], str. Details: " + ", ".join(error_messages)) elif match == 0: # no match @@ -172,6 +178,6 @@ def to_dict(self) -> dict: def to_str(self) -> str: """Returns the string representation of the actual instance""" - return pprint.pformat(self.dict()) + return pprint.pformat(self.model_dump()) diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/creature.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/creature.py index 89f8d3a162c8..5704ddb105cb 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/creature.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/creature.py @@ -29,7 +29,6 @@ class Creature(BaseModel): info: CreatureInfo = Field(...) type: StrictStr = Field(...) additional_properties: Dict[str, Any] = {} - __properties = ["info", "type"] """Pydantic configuration""" model_config = { @@ -39,7 +38,7 @@ class Creature(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -52,7 +51,7 @@ def from_json(cls, json_str: str) -> Creature: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -74,15 +73,15 @@ def from_dict(cls, obj: dict) -> Creature: return None if not isinstance(obj, dict): - return Creature.parse_obj(obj) + return Creature.model_validate(obj) - _obj = Creature.parse_obj({ + _obj = Creature.model_validate({ "info": CreatureInfo.from_dict(obj.get("info")) if obj.get("info") is not None else None, "type": obj.get("type") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["info", "type"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/creature_info.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/creature_info.py index 1ff7145528d6..be89fa13e084 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/creature_info.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/creature_info.py @@ -27,7 +27,6 @@ class CreatureInfo(BaseModel): """ name: StrictStr = Field(...) additional_properties: Dict[str, Any] = {} - __properties = ["name"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class CreatureInfo(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> CreatureInfo: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> CreatureInfo: return None if not isinstance(obj, dict): - return CreatureInfo.parse_obj(obj) + return CreatureInfo.model_validate(obj) - _obj = CreatureInfo.parse_obj({ + _obj = CreatureInfo.model_validate({ "name": obj.get("name") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/danish_pig.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/danish_pig.py index 4fec4f6fb8a2..b98ac4cef0b2 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/danish_pig.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/danish_pig.py @@ -28,7 +28,6 @@ class DanishPig(BaseModel): class_name: StrictStr = Field(..., alias="className") size: StrictInt = Field(...) additional_properties: Dict[str, Any] = {} - __properties = ["className", "size"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class DanishPig(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> DanishPig: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -70,15 +69,15 @@ def from_dict(cls, obj: dict) -> DanishPig: return None if not isinstance(obj, dict): - return DanishPig.parse_obj(obj) + return DanishPig.model_validate(obj) - _obj = DanishPig.parse_obj({ + _obj = DanishPig.model_validate({ "class_name": obj.get("className"), "size": obj.get("size") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["className", "size"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/deprecated_object.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/deprecated_object.py index ea1d52b15ccd..07c697272e37 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/deprecated_object.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/deprecated_object.py @@ -27,7 +27,6 @@ class DeprecatedObject(BaseModel): """ name: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["name"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class DeprecatedObject(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> DeprecatedObject: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> DeprecatedObject: return None if not isinstance(obj, dict): - return DeprecatedObject.parse_obj(obj) + return DeprecatedObject.model_validate(obj) - _obj = DeprecatedObject.parse_obj({ + _obj = DeprecatedObject.model_validate({ "name": obj.get("name") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/dog.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/dog.py index 28bab5868275..85434bdf0c29 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/dog.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/dog.py @@ -28,7 +28,6 @@ class Dog(Animal): """ breed: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["className", "color", "breed"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class Dog(Animal): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> Dog: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -70,16 +69,16 @@ def from_dict(cls, obj: dict) -> Dog: return None if not isinstance(obj, dict): - return Dog.parse_obj(obj) + return Dog.model_validate(obj) - _obj = Dog.parse_obj({ + _obj = Dog.model_validate({ "class_name": obj.get("className"), "color": obj.get("color") if obj.get("color") is not None else 'red', "breed": obj.get("breed") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["className", "color", "breed"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/dummy_model.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/dummy_model.py index 6085e77308fa..24ae7c25080d 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/dummy_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/dummy_model.py @@ -28,7 +28,6 @@ class DummyModel(BaseModel): category: Optional[StrictStr] = None self_ref: Optional[SelfReferenceModel] = None additional_properties: Dict[str, Any] = {} - __properties = ["category", "self_ref"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class DummyModel(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> DummyModel: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -73,19 +72,22 @@ def from_dict(cls, obj: dict) -> DummyModel: return None if not isinstance(obj, dict): - return DummyModel.parse_obj(obj) + return DummyModel.model_validate(obj) - _obj = DummyModel.parse_obj({ + _obj = DummyModel.model_validate({ "category": obj.get("category"), "self_ref": SelfReferenceModel.from_dict(obj.get("self_ref")) if obj.get("self_ref") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["category", "self_ref"]: _obj.additional_properties[_key] = obj.get(_key) return _obj from petstore_api.models.self_reference_model import SelfReferenceModel -DummyModel.update_forward_refs() +try: + DummyModel.model_rebuild() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/enum_arrays.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/enum_arrays.py index cae2015f7777..a66eef8b042e 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/enum_arrays.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/enum_arrays.py @@ -19,7 +19,7 @@ from typing import Any, Dict, List, Optional -from pydantic import BaseModel, StrictStr, conlist, validator +from pydantic import BaseModel, StrictStr, conlist, field_validator class EnumArrays(BaseModel): """ @@ -28,9 +28,8 @@ class EnumArrays(BaseModel): just_symbol: Optional[StrictStr] = None array_enum: Optional[conlist(StrictStr)] = None additional_properties: Dict[str, Any] = {} - __properties = ["just_symbol", "array_enum"] - @validator('just_symbol') + @field_validator('just_symbol') def just_symbol_validate_enum(cls, value): """Validates the enum""" if value is None: @@ -40,7 +39,7 @@ def just_symbol_validate_enum(cls, value): raise ValueError("must be one of enum values ('>=', '$')") return value - @validator('array_enum') + @field_validator('array_enum') def array_enum_validate_enum(cls, value): """Validates the enum""" if value is None: @@ -59,7 +58,7 @@ def array_enum_validate_enum(cls, value): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -72,7 +71,7 @@ def from_json(cls, json_str: str) -> EnumArrays: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -91,15 +90,15 @@ def from_dict(cls, obj: dict) -> EnumArrays: return None if not isinstance(obj, dict): - return EnumArrays.parse_obj(obj) + return EnumArrays.model_validate(obj) - _obj = EnumArrays.parse_obj({ + _obj = EnumArrays.model_validate({ "just_symbol": obj.get("just_symbol"), "array_enum": obj.get("array_enum") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["just_symbol", "array_enum"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/enum_test.py index a0226d95eed3..88a5ad903244 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/enum_test.py @@ -19,7 +19,7 @@ from typing import Any, Dict, Optional -from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, validator +from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, field_validator from petstore_api.models.outer_enum import OuterEnum from petstore_api.models.outer_enum_default_value import OuterEnumDefaultValue from petstore_api.models.outer_enum_integer import OuterEnumInteger @@ -39,9 +39,8 @@ class EnumTest(BaseModel): outer_enum_default_value: Optional[OuterEnumDefaultValue] = Field(None, alias="outerEnumDefaultValue") outer_enum_integer_default_value: Optional[OuterEnumIntegerDefaultValue] = Field(None, alias="outerEnumIntegerDefaultValue") additional_properties: Dict[str, Any] = {} - __properties = ["enum_string", "enum_string_required", "enum_integer_default", "enum_integer", "enum_number", "outerEnum", "outerEnumInteger", "outerEnumDefaultValue", "outerEnumIntegerDefaultValue"] - @validator('enum_string') + @field_validator('enum_string') def enum_string_validate_enum(cls, value): """Validates the enum""" if value is None: @@ -51,14 +50,14 @@ def enum_string_validate_enum(cls, value): raise ValueError("must be one of enum values ('UPPER', 'lower', '')") return value - @validator('enum_string_required') + @field_validator('enum_string_required') def enum_string_required_validate_enum(cls, value): """Validates the enum""" if value not in ('UPPER', 'lower', ''): raise ValueError("must be one of enum values ('UPPER', 'lower', '')") return value - @validator('enum_integer_default') + @field_validator('enum_integer_default') def enum_integer_default_validate_enum(cls, value): """Validates the enum""" if value is None: @@ -68,7 +67,7 @@ def enum_integer_default_validate_enum(cls, value): raise ValueError("must be one of enum values (1, 5, 14)") return value - @validator('enum_integer') + @field_validator('enum_integer') def enum_integer_validate_enum(cls, value): """Validates the enum""" if value is None: @@ -78,7 +77,7 @@ def enum_integer_validate_enum(cls, value): raise ValueError("must be one of enum values (1, -1)") return value - @validator('enum_number') + @field_validator('enum_number') def enum_number_validate_enum(cls, value): """Validates the enum""" if value is None: @@ -96,7 +95,7 @@ def enum_number_validate_enum(cls, value): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -109,7 +108,7 @@ def from_json(cls, json_str: str) -> EnumTest: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -121,7 +120,7 @@ def to_dict(self): # set to None if outer_enum (nullable) is None # and __fields_set__ contains the field - if self.outer_enum is None and "outer_enum" in self.__fields_set__: + if self.outer_enum is None and "outer_enum" in self.model_fields_set: _dict['outerEnum'] = None return _dict @@ -133,9 +132,9 @@ def from_dict(cls, obj: dict) -> EnumTest: return None if not isinstance(obj, dict): - return EnumTest.parse_obj(obj) + return EnumTest.model_validate(obj) - _obj = EnumTest.parse_obj({ + _obj = EnumTest.model_validate({ "enum_string": obj.get("enum_string"), "enum_string_required": obj.get("enum_string_required"), "enum_integer_default": obj.get("enum_integer_default") if obj.get("enum_integer_default") is not None else 5, @@ -148,7 +147,7 @@ def from_dict(cls, obj: dict) -> EnumTest: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["enum_string", "enum_string_required", "enum_integer_default", "enum_integer", "enum_number", "outerEnum", "outerEnumInteger", "outerEnumDefaultValue", "outerEnumIntegerDefaultValue"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/file.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/file.py index 6702d83e6209..22a3e2a5ee58 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/file.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/file.py @@ -27,7 +27,6 @@ class File(BaseModel): """ source_uri: Optional[StrictStr] = Field(None, alias="sourceURI", description="Test capitalization") additional_properties: Dict[str, Any] = {} - __properties = ["sourceURI"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class File(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> File: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> File: return None if not isinstance(obj, dict): - return File.parse_obj(obj) + return File.model_validate(obj) - _obj = File.parse_obj({ + _obj = File.model_validate({ "source_uri": obj.get("sourceURI") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["sourceURI"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/file_schema_test_class.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/file_schema_test_class.py index 86f565ac5e5f..63faa8a8890f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/file_schema_test_class.py @@ -29,7 +29,6 @@ class FileSchemaTestClass(BaseModel): file: Optional[File] = None files: Optional[conlist(File)] = None additional_properties: Dict[str, Any] = {} - __properties = ["file", "files"] """Pydantic configuration""" model_config = { @@ -39,7 +38,7 @@ class FileSchemaTestClass(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -52,7 +51,7 @@ def from_json(cls, json_str: str) -> FileSchemaTestClass: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -81,15 +80,15 @@ def from_dict(cls, obj: dict) -> FileSchemaTestClass: return None if not isinstance(obj, dict): - return FileSchemaTestClass.parse_obj(obj) + return FileSchemaTestClass.model_validate(obj) - _obj = FileSchemaTestClass.parse_obj({ + _obj = FileSchemaTestClass.model_validate({ "file": File.from_dict(obj.get("file")) if obj.get("file") is not None else None, "files": [File.from_dict(_item) for _item in obj.get("files")] if obj.get("files") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["file", "files"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/first_ref.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/first_ref.py index 3edf4c14bfaf..3317534222ae 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/first_ref.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/first_ref.py @@ -28,7 +28,6 @@ class FirstRef(BaseModel): category: Optional[StrictStr] = None self_ref: Optional[SecondRef] = None additional_properties: Dict[str, Any] = {} - __properties = ["category", "self_ref"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class FirstRef(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> FirstRef: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -73,19 +72,22 @@ def from_dict(cls, obj: dict) -> FirstRef: return None if not isinstance(obj, dict): - return FirstRef.parse_obj(obj) + return FirstRef.model_validate(obj) - _obj = FirstRef.parse_obj({ + _obj = FirstRef.model_validate({ "category": obj.get("category"), "self_ref": SecondRef.from_dict(obj.get("self_ref")) if obj.get("self_ref") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["category", "self_ref"]: _obj.additional_properties[_key] = obj.get(_key) return _obj from petstore_api.models.second_ref import SecondRef -FirstRef.update_forward_refs() +try: + FirstRef.model_rebuild() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/foo.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/foo.py index b607b20b493a..e96f9e89d212 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/foo.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/foo.py @@ -27,7 +27,6 @@ class Foo(BaseModel): """ bar: Optional[StrictStr] = 'bar' additional_properties: Dict[str, Any] = {} - __properties = ["bar"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class Foo(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> Foo: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> Foo: return None if not isinstance(obj, dict): - return Foo.parse_obj(obj) + return Foo.model_validate(obj) - _obj = Foo.parse_obj({ + _obj = Foo.model_validate({ "bar": obj.get("bar") if obj.get("bar") is not None else 'bar' }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["bar"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/foo_get_default_response.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/foo_get_default_response.py index 4814aa51bad5..43d8b4eb1f90 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/foo_get_default_response.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/foo_get_default_response.py @@ -28,7 +28,6 @@ class FooGetDefaultResponse(BaseModel): """ string: Optional[Foo] = None additional_properties: Dict[str, Any] = {} - __properties = ["string"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class FooGetDefaultResponse(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> FooGetDefaultResponse: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -73,14 +72,14 @@ def from_dict(cls, obj: dict) -> FooGetDefaultResponse: return None if not isinstance(obj, dict): - return FooGetDefaultResponse.parse_obj(obj) + return FooGetDefaultResponse.model_validate(obj) - _obj = FooGetDefaultResponse.parse_obj({ + _obj = FooGetDefaultResponse.model_validate({ "string": Foo.from_dict(obj.get("string")) if obj.get("string") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["string"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/format_test.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/format_test.py index a456b64abc7e..1488b291eb6b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/format_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/format_test.py @@ -19,7 +19,7 @@ from datetime import date, datetime from typing import Any, Dict, Optional, Union -from pydantic import BaseModel, Field, StrictBytes, StrictInt, StrictStr, condecimal, confloat, conint, constr, validator +from pydantic import BaseModel, Field, StrictBytes, StrictInt, StrictStr, condecimal, confloat, conint, constr, field_validator class FormatTest(BaseModel): """ @@ -43,9 +43,8 @@ class FormatTest(BaseModel): pattern_with_digits: Optional[constr(strict=True)] = Field(None, description="A string that is a 10 digit number. Can have leading zeros.") pattern_with_digits_and_delimiter: Optional[constr(strict=True)] = Field(None, description="A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.") additional_properties: Dict[str, Any] = {} - __properties = ["integer", "int32", "int64", "number", "float", "double", "decimal", "string", "string_with_double_quote_pattern", "byte", "binary", "date", "dateTime", "uuid", "password", "pattern_with_digits", "pattern_with_digits_and_delimiter"] - @validator('string') + @field_validator('string') def string_validate_regular_expression(cls, value): """Validates the regular expression""" if value is None: @@ -55,7 +54,7 @@ def string_validate_regular_expression(cls, value): raise ValueError(r"must validate the regular expression /[a-z]/i") return value - @validator('string_with_double_quote_pattern') + @field_validator('string_with_double_quote_pattern') def string_with_double_quote_pattern_validate_regular_expression(cls, value): """Validates the regular expression""" if value is None: @@ -65,7 +64,7 @@ def string_with_double_quote_pattern_validate_regular_expression(cls, value): raise ValueError(r"must validate the regular expression /this is \"something\"/") return value - @validator('pattern_with_digits') + @field_validator('pattern_with_digits') def pattern_with_digits_validate_regular_expression(cls, value): """Validates the regular expression""" if value is None: @@ -75,7 +74,7 @@ def pattern_with_digits_validate_regular_expression(cls, value): raise ValueError(r"must validate the regular expression /^\d{10}$/") return value - @validator('pattern_with_digits_and_delimiter') + @field_validator('pattern_with_digits_and_delimiter') def pattern_with_digits_and_delimiter_validate_regular_expression(cls, value): """Validates the regular expression""" if value is None: @@ -93,7 +92,7 @@ def pattern_with_digits_and_delimiter_validate_regular_expression(cls, value): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -106,7 +105,7 @@ def from_json(cls, json_str: str) -> FormatTest: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -125,9 +124,9 @@ def from_dict(cls, obj: dict) -> FormatTest: return None if not isinstance(obj, dict): - return FormatTest.parse_obj(obj) + return FormatTest.model_validate(obj) - _obj = FormatTest.parse_obj({ + _obj = FormatTest.model_validate({ "integer": obj.get("integer"), "int32": obj.get("int32"), "int64": obj.get("int64"), @@ -148,7 +147,7 @@ def from_dict(cls, obj: dict) -> FormatTest: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["integer", "int32", "int64", "number", "float", "double", "decimal", "string", "string_with_double_quote_pattern", "byte", "binary", "date", "dateTime", "uuid", "password", "pattern_with_digits", "pattern_with_digits_and_delimiter"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/has_only_read_only.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/has_only_read_only.py index 1b0116b2bbb5..e6ece3087b15 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/has_only_read_only.py @@ -28,7 +28,6 @@ class HasOnlyReadOnly(BaseModel): bar: Optional[StrictStr] = None foo: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["bar", "foo"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class HasOnlyReadOnly(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> HasOnlyReadOnly: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "bar", "foo", @@ -72,15 +71,15 @@ def from_dict(cls, obj: dict) -> HasOnlyReadOnly: return None if not isinstance(obj, dict): - return HasOnlyReadOnly.parse_obj(obj) + return HasOnlyReadOnly.model_validate(obj) - _obj = HasOnlyReadOnly.parse_obj({ + _obj = HasOnlyReadOnly.model_validate({ "bar": obj.get("bar"), "foo": obj.get("foo") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["bar", "foo"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/health_check_result.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/health_check_result.py index 0beb041f523a..5e695fe58b3b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/health_check_result.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/health_check_result.py @@ -27,7 +27,6 @@ class HealthCheckResult(BaseModel): """ nullable_message: Optional[StrictStr] = Field(None, alias="NullableMessage") additional_properties: Dict[str, Any] = {} - __properties = ["NullableMessage"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class HealthCheckResult(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> HealthCheckResult: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -62,7 +61,7 @@ def to_dict(self): # set to None if nullable_message (nullable) is None # and __fields_set__ contains the field - if self.nullable_message is None and "nullable_message" in self.__fields_set__: + if self.nullable_message is None and "nullable_message" in self.model_fields_set: _dict['NullableMessage'] = None return _dict @@ -74,14 +73,14 @@ def from_dict(cls, obj: dict) -> HealthCheckResult: return None if not isinstance(obj, dict): - return HealthCheckResult.parse_obj(obj) + return HealthCheckResult.model_validate(obj) - _obj = HealthCheckResult.parse_obj({ + _obj = HealthCheckResult.model_validate({ "nullable_message": obj.get("NullableMessage") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["NullableMessage"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/inner_dict_with_property.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/inner_dict_with_property.py index 053eb4c2a5da..0906e856e578 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/inner_dict_with_property.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/inner_dict_with_property.py @@ -27,7 +27,6 @@ class InnerDictWithProperty(BaseModel): """ a_property: Optional[Dict[str, Any]] = Field(None, alias="aProperty") additional_properties: Dict[str, Any] = {} - __properties = ["aProperty"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class InnerDictWithProperty(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> InnerDictWithProperty: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> InnerDictWithProperty: return None if not isinstance(obj, dict): - return InnerDictWithProperty.parse_obj(obj) + return InnerDictWithProperty.model_validate(obj) - _obj = InnerDictWithProperty.parse_obj({ + _obj = InnerDictWithProperty.model_validate({ "a_property": obj.get("aProperty") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["aProperty"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/int_or_string.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/int_or_string.py index e3420c4ae071..782abc0c10ac 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/int_or_string.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/int_or_string.py @@ -19,7 +19,7 @@ import re # noqa: F401 from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, conint, validator +from pydantic import BaseModel, Field, StrictStr, ValidationError, conint, field_validator from typing import Union, Any, List, TYPE_CHECKING try: from typing import Literal @@ -40,7 +40,7 @@ class IntOrString(BaseModel): if TYPE_CHECKING: actual_instance: Union[int, str] else: - actual_instance: Any + actual_instance: Any = None one_of_schemas: List[str] = Literal["int", "str"] @@ -56,12 +56,14 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) - @validator('actual_instance') + @field_validator('actual_instance') def actual_instance_must_validate_oneof(cls, v): - instance = IntOrString.construct() + instance = IntOrString.model_construct() error_messages = [] match = 0 # validate data type: int @@ -78,6 +80,8 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(str(e)) if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when setting `actual_instance` in IntOrString with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) elif match == 0: # no match @@ -92,7 +96,7 @@ def from_dict(cls, obj: dict) -> IntOrString: @classmethod def from_json(cls, json_str: str) -> IntOrString: """Returns the object represented by the json string""" - instance = IntOrString.construct() + instance = IntOrString.model_construct() error_messages = [] match = 0 @@ -117,6 +121,8 @@ def from_json(cls, json_str: str) -> IntOrString: if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when deserializing the JSON string into IntOrString with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) elif match == 0: # no match @@ -149,6 +155,6 @@ def to_dict(self) -> dict: def to_str(self) -> str: """Returns the string representation of the actual instance""" - return pprint.pformat(self.dict()) + return pprint.pformat(self.model_dump()) diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/list.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/list.py index 4ca9ce45ae57..19fa0d1a8110 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/list.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/list.py @@ -27,7 +27,6 @@ class List(BaseModel): """ var_123_list: Optional[StrictStr] = Field(None, alias="123-list") additional_properties: Dict[str, Any] = {} - __properties = ["123-list"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class List(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> List: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> List: return None if not isinstance(obj, dict): - return List.parse_obj(obj) + return List.model_validate(obj) - _obj = List.parse_obj({ + _obj = List.model_validate({ "var_123_list": obj.get("123-list") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["123-list"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/map_of_array_of_model.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/map_of_array_of_model.py index cdcbc232f988..01462673ee3c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/map_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/map_of_array_of_model.py @@ -28,7 +28,6 @@ class MapOfArrayOfModel(BaseModel): """ shop_id_to_org_online_lip_map: Optional[Dict[str, conlist(Tag)]] = Field(None, alias="shopIdToOrgOnlineLipMap") additional_properties: Dict[str, Any] = {} - __properties = ["shopIdToOrgOnlineLipMap"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class MapOfArrayOfModel(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> MapOfArrayOfModel: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -79,9 +78,9 @@ def from_dict(cls, obj: dict) -> MapOfArrayOfModel: return None if not isinstance(obj, dict): - return MapOfArrayOfModel.parse_obj(obj) + return MapOfArrayOfModel.model_validate(obj) - _obj = MapOfArrayOfModel.parse_obj({ + _obj = MapOfArrayOfModel.model_validate({ "shop_id_to_org_online_lip_map": dict( (_k, [Tag.from_dict(_item) for _item in _v] @@ -93,7 +92,7 @@ def from_dict(cls, obj: dict) -> MapOfArrayOfModel: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["shopIdToOrgOnlineLipMap"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/map_test.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/map_test.py index c2d729e9c9fd..947494a20cc4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/map_test.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/map_test.py @@ -19,7 +19,7 @@ from typing import Any, Dict, Optional -from pydantic import BaseModel, StrictBool, StrictStr, validator +from pydantic import BaseModel, StrictBool, StrictStr, field_validator class MapTest(BaseModel): """ @@ -30,9 +30,8 @@ class MapTest(BaseModel): direct_map: Optional[Dict[str, StrictBool]] = None indirect_map: Optional[Dict[str, StrictBool]] = None additional_properties: Dict[str, Any] = {} - __properties = ["map_map_of_string", "map_of_enum_string", "direct_map", "indirect_map"] - @validator('map_of_enum_string') + @field_validator('map_of_enum_string') def map_of_enum_string_validate_enum(cls, value): """Validates the enum""" if value is None: @@ -50,7 +49,7 @@ def map_of_enum_string_validate_enum(cls, value): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -63,7 +62,7 @@ def from_json(cls, json_str: str) -> MapTest: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -82,9 +81,9 @@ def from_dict(cls, obj: dict) -> MapTest: return None if not isinstance(obj, dict): - return MapTest.parse_obj(obj) + return MapTest.model_validate(obj) - _obj = MapTest.parse_obj({ + _obj = MapTest.model_validate({ "map_map_of_string": obj.get("map_map_of_string"), "map_of_enum_string": obj.get("map_of_enum_string"), "direct_map": obj.get("direct_map"), @@ -92,7 +91,7 @@ def from_dict(cls, obj: dict) -> MapTest: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["map_map_of_string", "map_of_enum_string", "direct_map", "indirect_map"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/mixed_properties_and_additional_properties_class.py index 257f9a737395..52c283a595e6 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -30,7 +30,6 @@ class MixedPropertiesAndAdditionalPropertiesClass(BaseModel): date_time: Optional[datetime] = Field(None, alias="dateTime") map: Optional[Dict[str, Animal]] = None additional_properties: Dict[str, Any] = {} - __properties = ["uuid", "dateTime", "map"] """Pydantic configuration""" model_config = { @@ -40,7 +39,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -53,7 +52,7 @@ def from_json(cls, json_str: str) -> MixedPropertiesAndAdditionalPropertiesClass def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -79,9 +78,9 @@ def from_dict(cls, obj: dict) -> MixedPropertiesAndAdditionalPropertiesClass: return None if not isinstance(obj, dict): - return MixedPropertiesAndAdditionalPropertiesClass.parse_obj(obj) + return MixedPropertiesAndAdditionalPropertiesClass.model_validate(obj) - _obj = MixedPropertiesAndAdditionalPropertiesClass.parse_obj({ + _obj = MixedPropertiesAndAdditionalPropertiesClass.model_validate({ "uuid": obj.get("uuid"), "date_time": obj.get("dateTime"), "map": dict( @@ -93,7 +92,7 @@ def from_dict(cls, obj: dict) -> MixedPropertiesAndAdditionalPropertiesClass: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["uuid", "dateTime", "map"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/model200_response.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/model200_response.py index d10d3e913b02..523d9af1a26a 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/model200_response.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/model200_response.py @@ -28,7 +28,6 @@ class Model200Response(BaseModel): name: Optional[StrictInt] = None var_class: Optional[StrictStr] = Field(None, alias="class") additional_properties: Dict[str, Any] = {} - __properties = ["name", "class"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class Model200Response(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> Model200Response: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -70,15 +69,15 @@ def from_dict(cls, obj: dict) -> Model200Response: return None if not isinstance(obj, dict): - return Model200Response.parse_obj(obj) + return Model200Response.model_validate(obj) - _obj = Model200Response.parse_obj({ + _obj = Model200Response.model_validate({ "name": obj.get("name"), "var_class": obj.get("class") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["name", "class"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/model_return.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/model_return.py index c7f18b149034..f7c5e2aa6a0b 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/model_return.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/model_return.py @@ -27,7 +27,6 @@ class ModelReturn(BaseModel): """ var_return: Optional[StrictInt] = Field(None, alias="return") additional_properties: Dict[str, Any] = {} - __properties = ["return"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class ModelReturn(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> ModelReturn: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> ModelReturn: return None if not isinstance(obj, dict): - return ModelReturn.parse_obj(obj) + return ModelReturn.model_validate(obj) - _obj = ModelReturn.parse_obj({ + _obj = ModelReturn.model_validate({ "var_return": obj.get("return") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["return"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/name.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/name.py index 483f75e148d6..bc6f56764765 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/name.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/name.py @@ -30,7 +30,6 @@ class Name(BaseModel): var_property: Optional[StrictStr] = Field(None, alias="property") var_123_number: Optional[StrictInt] = Field(None, alias="123Number") additional_properties: Dict[str, Any] = {} - __properties = ["name", "snake_case", "property", "123Number"] """Pydantic configuration""" model_config = { @@ -40,7 +39,7 @@ class Name(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -53,7 +52,7 @@ def from_json(cls, json_str: str) -> Name: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "snake_case", "var_123_number", @@ -74,9 +73,9 @@ def from_dict(cls, obj: dict) -> Name: return None if not isinstance(obj, dict): - return Name.parse_obj(obj) + return Name.model_validate(obj) - _obj = Name.parse_obj({ + _obj = Name.model_validate({ "name": obj.get("name"), "snake_case": obj.get("snake_case"), "var_property": obj.get("property"), @@ -84,7 +83,7 @@ def from_dict(cls, obj: dict) -> Name: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["name", "snake_case", "property", "123Number"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/nullable_class.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/nullable_class.py index 52f9ad12be36..999da9f55082 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/nullable_class.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/nullable_class.py @@ -39,7 +39,6 @@ class NullableClass(BaseModel): object_and_items_nullable_prop: Optional[Dict[str, Dict[str, Any]]] = None object_items_nullable: Optional[Dict[str, Dict[str, Any]]] = None additional_properties: Dict[str, Any] = {} - __properties = ["required_integer_prop", "integer_prop", "number_prop", "boolean_prop", "string_prop", "date_prop", "datetime_prop", "array_nullable_prop", "array_and_items_nullable_prop", "array_items_nullable", "object_nullable_prop", "object_and_items_nullable_prop", "object_items_nullable"] """Pydantic configuration""" model_config = { @@ -49,7 +48,7 @@ class NullableClass(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -62,7 +61,7 @@ def from_json(cls, json_str: str) -> NullableClass: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -74,57 +73,57 @@ def to_dict(self): # set to None if required_integer_prop (nullable) is None # and __fields_set__ contains the field - if self.required_integer_prop is None and "required_integer_prop" in self.__fields_set__: + if self.required_integer_prop is None and "required_integer_prop" in self.model_fields_set: _dict['required_integer_prop'] = None # set to None if integer_prop (nullable) is None # and __fields_set__ contains the field - if self.integer_prop is None and "integer_prop" in self.__fields_set__: + if self.integer_prop is None and "integer_prop" in self.model_fields_set: _dict['integer_prop'] = None # set to None if number_prop (nullable) is None # and __fields_set__ contains the field - if self.number_prop is None and "number_prop" in self.__fields_set__: + if self.number_prop is None and "number_prop" in self.model_fields_set: _dict['number_prop'] = None # set to None if boolean_prop (nullable) is None # and __fields_set__ contains the field - if self.boolean_prop is None and "boolean_prop" in self.__fields_set__: + if self.boolean_prop is None and "boolean_prop" in self.model_fields_set: _dict['boolean_prop'] = None # set to None if string_prop (nullable) is None # and __fields_set__ contains the field - if self.string_prop is None and "string_prop" in self.__fields_set__: + if self.string_prop is None and "string_prop" in self.model_fields_set: _dict['string_prop'] = None # set to None if date_prop (nullable) is None # and __fields_set__ contains the field - if self.date_prop is None and "date_prop" in self.__fields_set__: + if self.date_prop is None and "date_prop" in self.model_fields_set: _dict['date_prop'] = None # set to None if datetime_prop (nullable) is None # and __fields_set__ contains the field - if self.datetime_prop is None and "datetime_prop" in self.__fields_set__: + if self.datetime_prop is None and "datetime_prop" in self.model_fields_set: _dict['datetime_prop'] = None # set to None if array_nullable_prop (nullable) is None # and __fields_set__ contains the field - if self.array_nullable_prop is None and "array_nullable_prop" in self.__fields_set__: + if self.array_nullable_prop is None and "array_nullable_prop" in self.model_fields_set: _dict['array_nullable_prop'] = None # set to None if array_and_items_nullable_prop (nullable) is None # and __fields_set__ contains the field - if self.array_and_items_nullable_prop is None and "array_and_items_nullable_prop" in self.__fields_set__: + if self.array_and_items_nullable_prop is None and "array_and_items_nullable_prop" in self.model_fields_set: _dict['array_and_items_nullable_prop'] = None # set to None if object_nullable_prop (nullable) is None # and __fields_set__ contains the field - if self.object_nullable_prop is None and "object_nullable_prop" in self.__fields_set__: + if self.object_nullable_prop is None and "object_nullable_prop" in self.model_fields_set: _dict['object_nullable_prop'] = None # set to None if object_and_items_nullable_prop (nullable) is None # and __fields_set__ contains the field - if self.object_and_items_nullable_prop is None and "object_and_items_nullable_prop" in self.__fields_set__: + if self.object_and_items_nullable_prop is None and "object_and_items_nullable_prop" in self.model_fields_set: _dict['object_and_items_nullable_prop'] = None return _dict @@ -136,9 +135,9 @@ def from_dict(cls, obj: dict) -> NullableClass: return None if not isinstance(obj, dict): - return NullableClass.parse_obj(obj) + return NullableClass.model_validate(obj) - _obj = NullableClass.parse_obj({ + _obj = NullableClass.model_validate({ "required_integer_prop": obj.get("required_integer_prop"), "integer_prop": obj.get("integer_prop"), "number_prop": obj.get("number_prop"), @@ -155,7 +154,7 @@ def from_dict(cls, obj: dict) -> NullableClass: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["required_integer_prop", "integer_prop", "number_prop", "boolean_prop", "string_prop", "date_prop", "datetime_prop", "array_nullable_prop", "array_and_items_nullable_prop", "array_items_nullable", "object_nullable_prop", "object_and_items_nullable_prop", "object_items_nullable"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/nullable_property.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/nullable_property.py index 3cbde9fd5406..41013b164b59 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/nullable_property.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/nullable_property.py @@ -19,7 +19,7 @@ from typing import Any, Dict, Optional -from pydantic import BaseModel, Field, StrictInt, constr, validator +from pydantic import BaseModel, Field, StrictInt, constr, field_validator class NullableProperty(BaseModel): """ @@ -28,9 +28,8 @@ class NullableProperty(BaseModel): id: StrictInt = Field(...) name: Optional[constr(strict=True)] = Field(...) additional_properties: Dict[str, Any] = {} - __properties = ["id", "name"] - @validator('name') + @field_validator('name') def name_validate_regular_expression(cls, value): """Validates the regular expression""" if value is None: @@ -48,7 +47,7 @@ def name_validate_regular_expression(cls, value): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -61,7 +60,7 @@ def from_json(cls, json_str: str) -> NullableProperty: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -73,7 +72,7 @@ def to_dict(self): # set to None if name (nullable) is None # and __fields_set__ contains the field - if self.name is None and "name" in self.__fields_set__: + if self.name is None and "name" in self.model_fields_set: _dict['name'] = None return _dict @@ -85,15 +84,15 @@ def from_dict(cls, obj: dict) -> NullableProperty: return None if not isinstance(obj, dict): - return NullableProperty.parse_obj(obj) + return NullableProperty.model_validate(obj) - _obj = NullableProperty.parse_obj({ + _obj = NullableProperty.model_validate({ "id": obj.get("id"), "name": obj.get("name") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["id", "name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/number_only.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/number_only.py index 9d9f9ed9df08..159c41a9e5af 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/number_only.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/number_only.py @@ -27,7 +27,6 @@ class NumberOnly(BaseModel): """ just_number: Optional[StrictFloat] = Field(None, alias="JustNumber") additional_properties: Dict[str, Any] = {} - __properties = ["JustNumber"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class NumberOnly(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> NumberOnly: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> NumberOnly: return None if not isinstance(obj, dict): - return NumberOnly.parse_obj(obj) + return NumberOnly.model_validate(obj) - _obj = NumberOnly.parse_obj({ + _obj = NumberOnly.model_validate({ "just_number": obj.get("JustNumber") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["JustNumber"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/object_to_test_additional_properties.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/object_to_test_additional_properties.py index ff8f56fa9d6e..d7dda3c9442f 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/object_to_test_additional_properties.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/object_to_test_additional_properties.py @@ -27,7 +27,6 @@ class ObjectToTestAdditionalProperties(BaseModel): """ var_property: Optional[StrictBool] = Field(False, alias="property", description="Property") additional_properties: Dict[str, Any] = {} - __properties = ["property"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class ObjectToTestAdditionalProperties(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> ObjectToTestAdditionalProperties: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> ObjectToTestAdditionalProperties: return None if not isinstance(obj, dict): - return ObjectToTestAdditionalProperties.parse_obj(obj) + return ObjectToTestAdditionalProperties.model_validate(obj) - _obj = ObjectToTestAdditionalProperties.parse_obj({ + _obj = ObjectToTestAdditionalProperties.model_validate({ "var_property": obj.get("property") if obj.get("property") is not None else False }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["property"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/object_with_deprecated_fields.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/object_with_deprecated_fields.py index c2236b329861..03c00f0af7f9 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/object_with_deprecated_fields.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/object_with_deprecated_fields.py @@ -31,7 +31,6 @@ class ObjectWithDeprecatedFields(BaseModel): deprecated_ref: Optional[DeprecatedObject] = Field(None, alias="deprecatedRef") bars: Optional[conlist(StrictStr)] = None additional_properties: Dict[str, Any] = {} - __properties = ["uuid", "id", "deprecatedRef", "bars"] """Pydantic configuration""" model_config = { @@ -41,7 +40,7 @@ class ObjectWithDeprecatedFields(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -54,7 +53,7 @@ def from_json(cls, json_str: str) -> ObjectWithDeprecatedFields: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -76,9 +75,9 @@ def from_dict(cls, obj: dict) -> ObjectWithDeprecatedFields: return None if not isinstance(obj, dict): - return ObjectWithDeprecatedFields.parse_obj(obj) + return ObjectWithDeprecatedFields.model_validate(obj) - _obj = ObjectWithDeprecatedFields.parse_obj({ + _obj = ObjectWithDeprecatedFields.model_validate({ "uuid": obj.get("uuid"), "id": obj.get("id"), "deprecated_ref": DeprecatedObject.from_dict(obj.get("deprecatedRef")) if obj.get("deprecatedRef") is not None else None, @@ -86,7 +85,7 @@ def from_dict(cls, obj: dict) -> ObjectWithDeprecatedFields: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["uuid", "id", "deprecatedRef", "bars"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/one_of_enum_string.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/one_of_enum_string.py index ab6c7a72586a..7e3fc3da5f89 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/one_of_enum_string.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/one_of_enum_string.py @@ -19,7 +19,7 @@ import re # noqa: F401 from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, validator +from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator from petstore_api.models.enum_string1 import EnumString1 from petstore_api.models.enum_string2 import EnumString2 from typing import Union, Any, List, TYPE_CHECKING @@ -42,7 +42,7 @@ class OneOfEnumString(BaseModel): if TYPE_CHECKING: actual_instance: Union[EnumString1, EnumString2] else: - actual_instance: Any + actual_instance: Any = None one_of_schemas: List[str] = Literal["EnumString1", "EnumString2"] @@ -58,26 +58,32 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) - @validator('actual_instance') + @field_validator('actual_instance') def actual_instance_must_validate_oneof(cls, v): - instance = OneOfEnumString.construct() + instance = OneOfEnumString.model_construct() error_messages = [] match = 0 # validate data type: EnumString1 - if not isinstance(v, EnumString1): - error_messages.append(f"Error! Input type `{type(v)}` is not `EnumString1`") - else: + try: + instance.oneof_schema_1_validator = v match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) # validate data type: EnumString2 - if not isinstance(v, EnumString2): - error_messages.append(f"Error! Input type `{type(v)}` is not `EnumString2`") - else: + try: + instance.oneof_schema_2_validator = v match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when setting `actual_instance` in OneOfEnumString with oneOf schemas: EnumString1, EnumString2. Details: " + ", ".join(error_messages)) elif match == 0: # no match @@ -92,7 +98,7 @@ def from_dict(cls, obj: dict) -> OneOfEnumString: @classmethod def from_json(cls, json_str: str) -> OneOfEnumString: """Returns the object represented by the json string""" - instance = OneOfEnumString.construct() + instance = OneOfEnumString.model_construct() error_messages = [] match = 0 @@ -111,6 +117,8 @@ def from_json(cls, json_str: str) -> OneOfEnumString: if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when deserializing the JSON string into OneOfEnumString with oneOf schemas: EnumString1, EnumString2. Details: " + ", ".join(error_messages)) elif match == 0: # no match @@ -143,6 +151,6 @@ def to_dict(self) -> dict: def to_str(self) -> str: """Returns the string representation of the actual instance""" - return pprint.pformat(self.dict()) + return pprint.pformat(self.model_dump()) diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/order.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/order.py index 8e6b41dfbc18..6d3e4d669036 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/order.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/order.py @@ -19,7 +19,7 @@ from datetime import datetime from typing import Any, Dict, Optional -from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, validator +from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, field_validator class Order(BaseModel): """ @@ -32,9 +32,8 @@ class Order(BaseModel): status: Optional[StrictStr] = Field(None, description="Order Status") complete: Optional[StrictBool] = False additional_properties: Dict[str, Any] = {} - __properties = ["id", "petId", "quantity", "shipDate", "status", "complete"] - @validator('status') + @field_validator('status') def status_validate_enum(cls, value): """Validates the enum""" if value is None: @@ -52,7 +51,7 @@ def status_validate_enum(cls, value): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -65,7 +64,7 @@ def from_json(cls, json_str: str) -> Order: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -84,9 +83,9 @@ def from_dict(cls, obj: dict) -> Order: return None if not isinstance(obj, dict): - return Order.parse_obj(obj) + return Order.model_validate(obj) - _obj = Order.parse_obj({ + _obj = Order.model_validate({ "id": obj.get("id"), "pet_id": obj.get("petId"), "quantity": obj.get("quantity"), @@ -96,7 +95,7 @@ def from_dict(cls, obj: dict) -> Order: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["id", "petId", "quantity", "shipDate", "status", "complete"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/outer_composite.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/outer_composite.py index 478c1b53622b..d90223f6acf4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/outer_composite.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/outer_composite.py @@ -29,7 +29,6 @@ class OuterComposite(BaseModel): my_string: Optional[StrictStr] = None my_boolean: Optional[StrictBool] = None additional_properties: Dict[str, Any] = {} - __properties = ["my_number", "my_string", "my_boolean"] """Pydantic configuration""" model_config = { @@ -39,7 +38,7 @@ class OuterComposite(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -52,7 +51,7 @@ def from_json(cls, json_str: str) -> OuterComposite: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -71,16 +70,16 @@ def from_dict(cls, obj: dict) -> OuterComposite: return None if not isinstance(obj, dict): - return OuterComposite.parse_obj(obj) + return OuterComposite.model_validate(obj) - _obj = OuterComposite.parse_obj({ + _obj = OuterComposite.model_validate({ "my_number": obj.get("my_number"), "my_string": obj.get("my_string"), "my_boolean": obj.get("my_boolean") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["my_number", "my_string", "my_boolean"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/outer_object_with_enum_property.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/outer_object_with_enum_property.py index 8d7ad9f5c6d2..3d83ba884784 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/outer_object_with_enum_property.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/outer_object_with_enum_property.py @@ -30,7 +30,6 @@ class OuterObjectWithEnumProperty(BaseModel): str_value: Optional[OuterEnum] = None value: OuterEnumInteger = Field(...) additional_properties: Dict[str, Any] = {} - __properties = ["str_value", "value"] """Pydantic configuration""" model_config = { @@ -40,7 +39,7 @@ class OuterObjectWithEnumProperty(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -53,7 +52,7 @@ def from_json(cls, json_str: str) -> OuterObjectWithEnumProperty: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -65,7 +64,7 @@ def to_dict(self): # set to None if str_value (nullable) is None # and __fields_set__ contains the field - if self.str_value is None and "str_value" in self.__fields_set__: + if self.str_value is None and "str_value" in self.model_fields_set: _dict['str_value'] = None return _dict @@ -77,15 +76,15 @@ def from_dict(cls, obj: dict) -> OuterObjectWithEnumProperty: return None if not isinstance(obj, dict): - return OuterObjectWithEnumProperty.parse_obj(obj) + return OuterObjectWithEnumProperty.model_validate(obj) - _obj = OuterObjectWithEnumProperty.parse_obj({ + _obj = OuterObjectWithEnumProperty.model_validate({ "str_value": obj.get("str_value"), "value": obj.get("value") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["str_value", "value"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/parent.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/parent.py index f06c8c6f94e4..181958dc1140 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/parent.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/parent.py @@ -28,7 +28,6 @@ class Parent(BaseModel): """ optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(None, alias="optionalDict") additional_properties: Dict[str, Any] = {} - __properties = ["optionalDict"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class Parent(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> Parent: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -77,9 +76,9 @@ def from_dict(cls, obj: dict) -> Parent: return None if not isinstance(obj, dict): - return Parent.parse_obj(obj) + return Parent.model_validate(obj) - _obj = Parent.parse_obj({ + _obj = Parent.model_validate({ "optional_dict": dict( (_k, InnerDictWithProperty.from_dict(_v)) for _k, _v in obj.get("optionalDict").items() @@ -89,7 +88,7 @@ def from_dict(cls, obj: dict) -> Parent: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["optionalDict"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/parent_with_optional_dict.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/parent_with_optional_dict.py index 229a0b5f6e23..dde2bcd774a0 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/parent_with_optional_dict.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/parent_with_optional_dict.py @@ -28,7 +28,6 @@ class ParentWithOptionalDict(BaseModel): """ optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(None, alias="optionalDict") additional_properties: Dict[str, Any] = {} - __properties = ["optionalDict"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class ParentWithOptionalDict(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> ParentWithOptionalDict: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -77,9 +76,9 @@ def from_dict(cls, obj: dict) -> ParentWithOptionalDict: return None if not isinstance(obj, dict): - return ParentWithOptionalDict.parse_obj(obj) + return ParentWithOptionalDict.model_validate(obj) - _obj = ParentWithOptionalDict.parse_obj({ + _obj = ParentWithOptionalDict.model_validate({ "optional_dict": dict( (_k, InnerDictWithProperty.from_dict(_v)) for _k, _v in obj.get("optionalDict").items() @@ -89,7 +88,7 @@ def from_dict(cls, obj: dict) -> ParentWithOptionalDict: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["optionalDict"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/pet.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/pet.py index dee18eb28c9c..f5ebae825c7c 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/pet.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/pet.py @@ -19,7 +19,7 @@ from typing import Any, Dict, List, Optional -from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist, validator +from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist, field_validator from petstore_api.models.category import Category from petstore_api.models.tag import Tag @@ -34,9 +34,8 @@ class Pet(BaseModel): tags: Optional[conlist(Tag)] = None status: Optional[StrictStr] = Field(None, description="pet status in the store") additional_properties: Dict[str, Any] = {} - __properties = ["id", "category", "name", "photoUrls", "tags", "status"] - @validator('status') + @field_validator('status') def status_validate_enum(cls, value): """Validates the enum""" if value is None: @@ -54,7 +53,7 @@ def status_validate_enum(cls, value): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -67,7 +66,7 @@ def from_json(cls, json_str: str) -> Pet: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -96,9 +95,9 @@ def from_dict(cls, obj: dict) -> Pet: return None if not isinstance(obj, dict): - return Pet.parse_obj(obj) + return Pet.model_validate(obj) - _obj = Pet.parse_obj({ + _obj = Pet.model_validate({ "id": obj.get("id"), "category": Category.from_dict(obj.get("category")) if obj.get("category") is not None else None, "name": obj.get("name"), @@ -108,7 +107,7 @@ def from_dict(cls, obj: dict) -> Pet: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["id", "category", "name", "photoUrls", "tags", "status"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/pig.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/pig.py index 7ceaec51ee85..81335b164e87 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/pig.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/pig.py @@ -19,7 +19,7 @@ import re # noqa: F401 from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, validator +from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator from petstore_api.models.basque_pig import BasquePig from petstore_api.models.danish_pig import DanishPig from typing import Union, Any, List, TYPE_CHECKING @@ -42,7 +42,7 @@ class Pig(BaseModel): if TYPE_CHECKING: actual_instance: Union[BasquePig, DanishPig] else: - actual_instance: Any + actual_instance: Any = None one_of_schemas: List[str] = Literal["BasquePig", "DanishPig"] @@ -51,9 +51,6 @@ class Pig(BaseModel): "validate_assignment": True, } - discriminator_value_class_map = { - } - def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -61,26 +58,32 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) - @validator('actual_instance') + @field_validator('actual_instance') def actual_instance_must_validate_oneof(cls, v): - instance = Pig.construct() + instance = Pig.model_construct() error_messages = [] match = 0 # validate data type: BasquePig - if not isinstance(v, BasquePig): - error_messages.append(f"Error! Input type `{type(v)}` is not `BasquePig`") - else: + try: + instance.oneof_schema_1_validator = v match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) # validate data type: DanishPig - if not isinstance(v, DanishPig): - error_messages.append(f"Error! Input type `{type(v)}` is not `DanishPig`") - else: + try: + instance.oneof_schema_2_validator = v match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when setting `actual_instance` in Pig with oneOf schemas: BasquePig, DanishPig. Details: " + ", ".join(error_messages)) elif match == 0: # no match @@ -95,7 +98,7 @@ def from_dict(cls, obj: dict) -> Pig: @classmethod def from_json(cls, json_str: str) -> Pig: """Returns the object represented by the json string""" - instance = Pig.construct() + instance = Pig.model_construct() error_messages = [] match = 0 @@ -129,6 +132,8 @@ def from_json(cls, json_str: str) -> Pig: if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when deserializing the JSON string into Pig with oneOf schemas: BasquePig, DanishPig. Details: " + ", ".join(error_messages)) elif match == 0: # no match @@ -161,6 +166,6 @@ def to_dict(self) -> dict: def to_str(self) -> str: """Returns the string representation of the actual instance""" - return pprint.pformat(self.dict()) + return pprint.pformat(self.model_dump()) diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/property_name_collision.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/property_name_collision.py index 0bc34c0540c2..63554d1d89f4 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/property_name_collision.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/property_name_collision.py @@ -29,7 +29,6 @@ class PropertyNameCollision(BaseModel): type: Optional[StrictStr] = None type_with_underscore: Optional[StrictStr] = Field(None, alias="type_") additional_properties: Dict[str, Any] = {} - __properties = ["_type", "type", "type_"] """Pydantic configuration""" model_config = { @@ -39,7 +38,7 @@ class PropertyNameCollision(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -52,7 +51,7 @@ def from_json(cls, json_str: str) -> PropertyNameCollision: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -71,16 +70,16 @@ def from_dict(cls, obj: dict) -> PropertyNameCollision: return None if not isinstance(obj, dict): - return PropertyNameCollision.parse_obj(obj) + return PropertyNameCollision.model_validate(obj) - _obj = PropertyNameCollision.parse_obj({ + _obj = PropertyNameCollision.model_validate({ "underscore_type": obj.get("_type"), "type": obj.get("type"), "type_with_underscore": obj.get("type_") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["_type", "type", "type_"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/read_only_first.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/read_only_first.py index b158341ff4c8..fba35533e476 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/read_only_first.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/read_only_first.py @@ -28,7 +28,6 @@ class ReadOnlyFirst(BaseModel): bar: Optional[StrictStr] = None baz: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["bar", "baz"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class ReadOnlyFirst(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> ReadOnlyFirst: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "bar", "additional_properties" @@ -71,15 +70,15 @@ def from_dict(cls, obj: dict) -> ReadOnlyFirst: return None if not isinstance(obj, dict): - return ReadOnlyFirst.parse_obj(obj) + return ReadOnlyFirst.model_validate(obj) - _obj = ReadOnlyFirst.parse_obj({ + _obj = ReadOnlyFirst.model_validate({ "bar": obj.get("bar"), "baz": obj.get("baz") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["bar", "baz"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/second_ref.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/second_ref.py index f4583d5fd584..219b6ebfbba3 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/second_ref.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/second_ref.py @@ -28,7 +28,6 @@ class SecondRef(BaseModel): category: Optional[StrictStr] = None circular_ref: Optional[CircularReferenceModel] = None additional_properties: Dict[str, Any] = {} - __properties = ["category", "circular_ref"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class SecondRef(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> SecondRef: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -73,19 +72,22 @@ def from_dict(cls, obj: dict) -> SecondRef: return None if not isinstance(obj, dict): - return SecondRef.parse_obj(obj) + return SecondRef.model_validate(obj) - _obj = SecondRef.parse_obj({ + _obj = SecondRef.model_validate({ "category": obj.get("category"), "circular_ref": CircularReferenceModel.from_dict(obj.get("circular_ref")) if obj.get("circular_ref") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["category", "circular_ref"]: _obj.additional_properties[_key] = obj.get(_key) return _obj from petstore_api.models.circular_reference_model import CircularReferenceModel -SecondRef.update_forward_refs() +try: + SecondRef.model_rebuild() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/self_reference_model.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/self_reference_model.py index fb6699d8ca33..ecad3b7a2357 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/self_reference_model.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/self_reference_model.py @@ -28,7 +28,6 @@ class SelfReferenceModel(BaseModel): size: Optional[StrictInt] = None nested: Optional[DummyModel] = None additional_properties: Dict[str, Any] = {} - __properties = ["size", "nested"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class SelfReferenceModel(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> SelfReferenceModel: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -73,19 +72,22 @@ def from_dict(cls, obj: dict) -> SelfReferenceModel: return None if not isinstance(obj, dict): - return SelfReferenceModel.parse_obj(obj) + return SelfReferenceModel.model_validate(obj) - _obj = SelfReferenceModel.parse_obj({ + _obj = SelfReferenceModel.model_validate({ "size": obj.get("size"), "nested": DummyModel.from_dict(obj.get("nested")) if obj.get("nested") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["size", "nested"]: _obj.additional_properties[_key] = obj.get(_key) return _obj from petstore_api.models.dummy_model import DummyModel -SelfReferenceModel.update_forward_refs() +try: + SelfReferenceModel.model_rebuild() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/special_model_name.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/special_model_name.py index 9d4671a535e8..eaeba63d4c56 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/special_model_name.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/special_model_name.py @@ -27,7 +27,6 @@ class SpecialModelName(BaseModel): """ special_property_name: Optional[StrictInt] = Field(None, alias="$special[property.name]") additional_properties: Dict[str, Any] = {} - __properties = ["$special[property.name]"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class SpecialModelName(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> SpecialModelName: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> SpecialModelName: return None if not isinstance(obj, dict): - return SpecialModelName.parse_obj(obj) + return SpecialModelName.model_validate(obj) - _obj = SpecialModelName.parse_obj({ + _obj = SpecialModelName.model_validate({ "special_property_name": obj.get("$special[property.name]") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["$special[property.name]"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/special_name.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/special_name.py index 0c1db5f7d2ec..2dfa625e8188 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/special_name.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/special_name.py @@ -19,7 +19,7 @@ from typing import Any, Dict, Optional -from pydantic import BaseModel, Field, StrictInt, StrictStr, validator +from pydantic import BaseModel, Field, StrictInt, StrictStr, field_validator from petstore_api.models.category import Category class SpecialName(BaseModel): @@ -30,9 +30,8 @@ class SpecialName(BaseModel): var_async: Optional[Category] = Field(None, alias="async") var_schema: Optional[StrictStr] = Field(None, alias="schema", description="pet status in the store") additional_properties: Dict[str, Any] = {} - __properties = ["property", "async", "schema"] - @validator('var_schema') + @field_validator('var_schema') def var_schema_validate_enum(cls, value): """Validates the enum""" if value is None: @@ -50,7 +49,7 @@ def var_schema_validate_enum(cls, value): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -63,7 +62,7 @@ def from_json(cls, json_str: str) -> SpecialName: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -85,16 +84,16 @@ def from_dict(cls, obj: dict) -> SpecialName: return None if not isinstance(obj, dict): - return SpecialName.parse_obj(obj) + return SpecialName.model_validate(obj) - _obj = SpecialName.parse_obj({ + _obj = SpecialName.model_validate({ "var_property": obj.get("property"), "var_async": Category.from_dict(obj.get("async")) if obj.get("async") is not None else None, "var_schema": obj.get("schema") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["property", "async", "schema"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/tag.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/tag.py index 76347c44fe18..b128fee5e740 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/tag.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/tag.py @@ -28,7 +28,6 @@ class Tag(BaseModel): id: Optional[StrictInt] = None name: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["id", "name"] """Pydantic configuration""" model_config = { @@ -38,7 +37,7 @@ class Tag(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -51,7 +50,7 @@ def from_json(cls, json_str: str) -> Tag: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -70,15 +69,15 @@ def from_dict(cls, obj: dict) -> Tag: return None if not isinstance(obj, dict): - return Tag.parse_obj(obj) + return Tag.model_validate(obj) - _obj = Tag.parse_obj({ + _obj = Tag.model_validate({ "id": obj.get("id"), "name": obj.get("name") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["id", "name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/tiger.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/tiger.py index 7c1c35949194..1236029d81f9 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/tiger.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/tiger.py @@ -27,7 +27,6 @@ class Tiger(BaseModel): """ skill: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["skill"] """Pydantic configuration""" model_config = { @@ -37,7 +36,7 @@ class Tiger(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -50,7 +49,7 @@ def from_json(cls, json_str: str) -> Tiger: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -69,14 +68,14 @@ def from_dict(cls, obj: dict) -> Tiger: return None if not isinstance(obj, dict): - return Tiger.parse_obj(obj) + return Tiger.model_validate(obj) - _obj = Tiger.parse_obj({ + _obj = Tiger.model_validate({ "skill": obj.get("skill") }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["skill"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/user.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/user.py index c4791674d1b1..3b77e98fb1b7 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/user.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/user.py @@ -34,7 +34,6 @@ class User(BaseModel): phone: Optional[StrictStr] = None user_status: Optional[StrictInt] = Field(None, alias="userStatus", description="User Status") additional_properties: Dict[str, Any] = {} - __properties = ["id", "username", "firstName", "lastName", "email", "password", "phone", "userStatus"] """Pydantic configuration""" model_config = { @@ -44,7 +43,7 @@ class User(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -57,7 +56,7 @@ def from_json(cls, json_str: str) -> User: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -76,9 +75,9 @@ def from_dict(cls, obj: dict) -> User: return None if not isinstance(obj, dict): - return User.parse_obj(obj) + return User.model_validate(obj) - _obj = User.parse_obj({ + _obj = User.model_validate({ "id": obj.get("id"), "username": obj.get("username"), "first_name": obj.get("firstName"), @@ -90,7 +89,7 @@ def from_dict(cls, obj: dict) -> User: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["id", "username", "firstName", "lastName", "email", "password", "phone", "userStatus"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/with_nested_one_of.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/with_nested_one_of.py index 3dc7c65504c6..b0d7c6fabf97 100644 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/with_nested_one_of.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/models/with_nested_one_of.py @@ -31,7 +31,6 @@ class WithNestedOneOf(BaseModel): nested_pig: Optional[Pig] = None nested_oneof_enum_string: Optional[OneOfEnumString] = None additional_properties: Dict[str, Any] = {} - __properties = ["size", "nested_pig", "nested_oneof_enum_string"] """Pydantic configuration""" model_config = { @@ -41,7 +40,7 @@ class WithNestedOneOf(BaseModel): def to_str(self) -> str: """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) + return pprint.pformat(self.model_dump(by_alias=True)) def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -54,7 +53,7 @@ def from_json(cls, json_str: str) -> WithNestedOneOf: def to_dict(self): """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, + _dict = self.model_dump(by_alias=True, exclude={ "additional_properties" }, @@ -79,16 +78,16 @@ def from_dict(cls, obj: dict) -> WithNestedOneOf: return None if not isinstance(obj, dict): - return WithNestedOneOf.parse_obj(obj) + return WithNestedOneOf.model_validate(obj) - _obj = WithNestedOneOf.parse_obj({ + _obj = WithNestedOneOf.model_validate({ "size": obj.get("size"), "nested_pig": Pig.from_dict(obj.get("nested_pig")) if obj.get("nested_pig") is not None else None, "nested_oneof_enum_string": OneOfEnumString.from_dict(obj.get("nested_oneof_enum_string")) if obj.get("nested_oneof_enum_string") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["size", "nested_pig", "nested_oneof_enum_string"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/requirements.txt b/samples/openapi3/client/petstore/python-pydantic-v2/requirements.txt index 358a78535383..479e795a2b57 100755 --- a/samples/openapi3/client/petstore/python-pydantic-v2/requirements.txt +++ b/samples/openapi3/client/petstore/python-pydantic-v2/requirements.txt @@ -3,3 +3,4 @@ setuptools >= 21.0.0 urllib3 >= 1.25.3, < 2.1.0 pydantic >= 2 aenum >= 3.1.11 +pycryptodome >= 3.9.0 diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/test-requirements.txt b/samples/openapi3/client/petstore/python-pydantic-v2/test-requirements.txt index 8fc452fe6edd..3a0d0b939a1e 100755 --- a/samples/openapi3/client/petstore/python-pydantic-v2/test-requirements.txt +++ b/samples/openapi3/client/petstore/python-pydantic-v2/test-requirements.txt @@ -1,4 +1,3 @@ pytest~=7.1.3 pytest-cov>=2.8.1 pytest-randomly>=3.12.0 -pycryptodome>=3.9.0 diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/test/test_circular_reference_model.py b/samples/openapi3/client/petstore/python-pydantic-v2/test/test_circular_reference_model.py new file mode 100644 index 000000000000..f23f02000225 --- /dev/null +++ b/samples/openapi3/client/petstore/python-pydantic-v2/test/test_circular_reference_model.py @@ -0,0 +1,60 @@ +# 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: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from petstore_api.models.circular_reference_model import CircularReferenceModel # noqa: E501 + +class TestCircularReferenceModel(unittest.TestCase): + """CircularReferenceModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CircularReferenceModel: + """Test CircularReferenceModel + 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 `CircularReferenceModel` + """ + model = CircularReferenceModel() # noqa: E501 + if include_optional: + return CircularReferenceModel( + size = 56, + nested = petstore_api.models.first_ref.FirstRef( + category = '', + self_ref = petstore_api.models.second_ref.SecondRef( + category = '', + circular_ref = petstore_api.models.circular_reference_model.Circular-Reference-Model( + size = 56, + nested = petstore_api.models.first_ref.FirstRef( + category = '', ), ), ), ) + ) + else: + return CircularReferenceModel( + ) + """ + + def testCircularReferenceModel(self): + """Test CircularReferenceModel""" + # 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-pydantic-v2/test/test_first_ref.py b/samples/openapi3/client/petstore/python-pydantic-v2/test/test_first_ref.py new file mode 100644 index 000000000000..a99fc7cfc796 --- /dev/null +++ b/samples/openapi3/client/petstore/python-pydantic-v2/test/test_first_ref.py @@ -0,0 +1,58 @@ +# 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: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from petstore_api.models.first_ref import FirstRef # noqa: E501 + +class TestFirstRef(unittest.TestCase): + """FirstRef unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirstRef: + """Test FirstRef + 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 `FirstRef` + """ + model = FirstRef() # noqa: E501 + if include_optional: + return FirstRef( + category = '', + self_ref = petstore_api.models.second_ref.SecondRef( + category = '', + circular_ref = petstore_api.models.circular_reference_model.Circular-Reference-Model( + size = 56, + nested = petstore_api.models.first_ref.FirstRef( + category = '', ), ), ) + ) + else: + return FirstRef( + ) + """ + + def testFirstRef(self): + """Test FirstRef""" + # 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-pydantic-v2/test/test_second_ref.py b/samples/openapi3/client/petstore/python-pydantic-v2/test/test_second_ref.py new file mode 100644 index 000000000000..44194f94544f --- /dev/null +++ b/samples/openapi3/client/petstore/python-pydantic-v2/test/test_second_ref.py @@ -0,0 +1,58 @@ +# 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: \" \\ + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from petstore_api.models.second_ref import SecondRef # noqa: E501 + +class TestSecondRef(unittest.TestCase): + """SecondRef unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SecondRef: + """Test SecondRef + 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 `SecondRef` + """ + model = SecondRef() # noqa: E501 + if include_optional: + return SecondRef( + category = '', + circular_ref = petstore_api.models.circular_reference_model.Circular-Reference-Model( + size = 56, + nested = petstore_api.models.first_ref.FirstRef( + category = '', + self_ref = petstore_api.models.second_ref.SecondRef( + category = '', ), ), ) + ) + else: + return SecondRef( + ) + """ + + def testSecondRef(self): + """Test SecondRef""" + # 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/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py index 9579cce1349c..5fb593b6559a 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -223,6 +223,7 @@ def __call_api( self.last_response = response_data return_data = None # assuming deserialization is not needed + return_headers = None # data needs deserialization or returns HTTP data (deserialized) only if _preload_content or _return_http_data_only: response_type = response_types_map.get(str(response_data.status), None) @@ -243,17 +244,20 @@ def __call_api( # deserialize response data if response_type == "bytearray": return_data = response_data.data + return_headers = response_data.headers elif response_type: return_data = self.deserialize(response_data, response_type) + return_headers = response_data.getheaders() else: return_data = None + return_headers = response_data.getheaders() if _return_http_data_only: return return_data else: return ApiResponse(status_code = response_data.status, data = return_data, - headers = response_data.getheaders(), + headers = return_headers, raw_data = response_data.data) def sanitize_for_serialization(self, obj): diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_any_type.py b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_any_type.py index eba260e84f41..89f2b10fc197 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_any_type.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_any_type.py @@ -27,7 +27,6 @@ class AdditionalPropertiesAnyType(BaseModel): """ name: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["name"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> AdditionalPropertiesAnyType: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py index f7c4f8663e89..532c78772af3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_class.py @@ -28,7 +28,6 @@ class AdditionalPropertiesClass(BaseModel): map_property: Optional[Dict[str, StrictStr]] = None map_of_map_property: Optional[Dict[str, Dict[str, StrictStr]]] = None additional_properties: Dict[str, Any] = {} - __properties = ["map_property", "map_of_map_property"] """Pydantic configuration""" class Config: @@ -77,7 +76,7 @@ def from_dict(cls, obj: dict) -> AdditionalPropertiesClass: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["map_property", "map_of_map_property"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_object.py b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_object.py index 14707fa99697..f30640a9b562 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_object.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_object.py @@ -27,7 +27,6 @@ class AdditionalPropertiesObject(BaseModel): """ name: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["name"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> AdditionalPropertiesObject: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_with_description_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_with_description_only.py index 3c64a8134d65..c6c38c9eb3ec 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_with_description_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/additional_properties_with_description_only.py @@ -27,7 +27,6 @@ class AdditionalPropertiesWithDescriptionOnly(BaseModel): """ name: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["name"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> AdditionalPropertiesWithDescriptionOnly: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/all_of_with_single_ref.py b/samples/openapi3/client/petstore/python/petstore_api/models/all_of_with_single_ref.py index b28814c3a4ca..325491e077fb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/all_of_with_single_ref.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/all_of_with_single_ref.py @@ -29,7 +29,6 @@ class AllOfWithSingleRef(BaseModel): username: Optional[StrictStr] = None single_ref_type: Optional[SingleRefType] = Field(None, alias="SingleRefType") additional_properties: Dict[str, Any] = {} - __properties = ["username", "SingleRefType"] """Pydantic configuration""" class Config: @@ -78,7 +77,7 @@ def from_dict(cls, obj: dict) -> AllOfWithSingleRef: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["username", "SingleRefType"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/animal.py b/samples/openapi3/client/petstore/python/petstore_api/models/animal.py index a4a2f85ec7ff..9fbf48c7183f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/animal.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/animal.py @@ -28,7 +28,6 @@ class Animal(BaseModel): class_name: StrictStr = Field(..., alias="className") color: Optional[StrictStr] = 'red' additional_properties: Dict[str, Any] = {} - __properties = ["className", "color"] """Pydantic configuration""" class Config: @@ -36,20 +35,17 @@ class Config: validate_assignment = True # JSON field name that stores the object type - __discriminator_property_name = 'className' - - # discriminator mappings - __discriminator_value_class_map = { - 'Cat': 'Cat', - 'Dog': 'Dog' - } @classmethod def get_discriminator_value(cls, obj: dict) -> str: """Returns the discriminator value (object type) of the data""" - discriminator_value = obj[cls.__discriminator_property_name] + discriminator_value = obj['className'] + discriminator_value_class_map = { + 'Cat': 'Cat','Dog': 'Dog' + } + if discriminator_value: - return cls.__discriminator_value_class_map.get(discriminator_value) + return discriminator_value_class_map.get(discriminator_value) else: return None @@ -85,15 +81,21 @@ def from_dict(cls, obj: dict) -> Union(Cat, Dog): """Create an instance of Animal from a dict""" # look up the object type based on discriminator mapping object_type = cls.get_discriminator_value(obj) + discriminator_value_class_map = { + 'Cat': 'Cat','Dog': 'Dog' + } if object_type: klass = globals()[object_type] return klass.from_dict(obj) else: raise ValueError("Animal failed to lookup discriminator value from " + - json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + - ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) + json.dumps(obj) + ". Discriminator property name: " + 'className' + + ", mapping: " + json.dumps(discriminator_value_class_map)) from petstore_api.models.cat import Cat from petstore_api.models.dog import Dog -Animal.update_forward_refs() +try: + Animal.update_forward_refs() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/any_of_color.py b/samples/openapi3/client/petstore/python/petstore_api/models/any_of_color.py index 79eece679cda..caea52cba72c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/any_of_color.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/any_of_color.py @@ -38,7 +38,7 @@ class AnyOfColor(BaseModel): if TYPE_CHECKING: actual_instance: Union[List[int], str] else: - actual_instance: Any + actual_instance: Any = None any_of_schemas: List[str] = Field(ANYOFCOLOR_ANY_OF_SCHEMAS, const=True) """Pydantic configuration""" @@ -52,8 +52,10 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) @validator('actual_instance') def actual_instance_must_validate_anyof(cls, v): diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/any_of_pig.py b/samples/openapi3/client/petstore/python/petstore_api/models/any_of_pig.py index 30274e51269a..4e9c82be45a0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/any_of_pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/any_of_pig.py @@ -38,7 +38,7 @@ class AnyOfPig(BaseModel): if TYPE_CHECKING: actual_instance: Union[BasquePig, DanishPig] else: - actual_instance: Any + actual_instance: Any = None any_of_schemas: List[str] = Field(ANYOFPIG_ANY_OF_SCHEMAS, const=True) """Pydantic configuration""" @@ -52,25 +52,27 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) @validator('actual_instance') def actual_instance_must_validate_anyof(cls, v): instance = AnyOfPig.construct() error_messages = [] # validate data type: BasquePig - if not isinstance(v, BasquePig): - error_messages.append(f"Error! Input type `{type(v)}` is not `BasquePig`") - else: + try: + instance.anyof_schema_1_validator = v return v - + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) # validate data type: DanishPig - if not isinstance(v, DanishPig): - error_messages.append(f"Error! Input type `{type(v)}` is not `DanishPig`") - else: + try: + instance.anyof_schema_2_validator = v return v - + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) if error_messages: # no match raise ValueError("No match found when setting the actual_instance in AnyOfPig with anyOf schemas: BasquePig, DanishPig. Details: " + ", ".join(error_messages)) diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py b/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py index 56e7928f07be..112dbba70820 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/api_response.py @@ -29,7 +29,6 @@ class ApiResponse(BaseModel): type: Optional[StrictStr] = None message: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["code", "type", "message"] """Pydantic configuration""" class Config: @@ -79,7 +78,7 @@ def from_dict(cls, obj: dict) -> ApiResponse: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["code", "type", "message"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_model.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_model.py index 293c13902dbe..9a3773162d43 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_model.py @@ -28,7 +28,6 @@ class ArrayOfArrayOfModel(BaseModel): """ another_property: Optional[conlist(conlist(Tag))] = None additional_properties: Dict[str, Any] = {} - __properties = ["another_property"] """Pydantic configuration""" class Config: @@ -88,7 +87,7 @@ def from_dict(cls, obj: dict) -> ArrayOfArrayOfModel: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["another_property"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py index 2a52c2936ba1..9caaf1133cd9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_array_of_number_only.py @@ -27,7 +27,6 @@ class ArrayOfArrayOfNumberOnly(BaseModel): """ array_array_number: Optional[conlist(conlist(StrictFloat))] = Field(None, alias="ArrayArrayNumber") additional_properties: Dict[str, Any] = {} - __properties = ["ArrayArrayNumber"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> ArrayOfArrayOfNumberOnly: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["ArrayArrayNumber"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py index 10dd656729ce..590eb855e911 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_of_number_only.py @@ -27,7 +27,6 @@ class ArrayOfNumberOnly(BaseModel): """ array_number: Optional[conlist(StrictFloat)] = Field(None, alias="ArrayNumber") additional_properties: Dict[str, Any] = {} - __properties = ["ArrayNumber"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> ArrayOfNumberOnly: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["ArrayNumber"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py index 8fcc378f6d48..83e43f0590a5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py @@ -30,7 +30,6 @@ class ArrayTest(BaseModel): array_array_of_integer: Optional[conlist(conlist(StrictInt))] = None array_array_of_model: Optional[conlist(conlist(ReadOnlyFirst))] = None additional_properties: Dict[str, Any] = {} - __properties = ["array_of_string", "array_array_of_integer", "array_array_of_model"] """Pydantic configuration""" class Config: @@ -92,7 +91,7 @@ def from_dict(cls, obj: dict) -> ArrayTest: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["array_of_string", "array_array_of_integer", "array_array_of_model"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/basque_pig.py b/samples/openapi3/client/petstore/python/petstore_api/models/basque_pig.py index e1455ef6aac3..53bfd2b137f2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/basque_pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/basque_pig.py @@ -28,7 +28,6 @@ class BasquePig(BaseModel): class_name: StrictStr = Field(..., alias="className") color: StrictStr = Field(...) additional_properties: Dict[str, Any] = {} - __properties = ["className", "color"] """Pydantic configuration""" class Config: @@ -77,7 +76,7 @@ def from_dict(cls, obj: dict) -> BasquePig: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["className", "color"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py b/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py index b5b6be2e7b1f..530f8ee7b343 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/capitalization.py @@ -32,7 +32,6 @@ class Capitalization(BaseModel): sca_eth_flow_points: Optional[StrictStr] = Field(None, alias="SCA_ETH_Flow_Points") att_name: Optional[StrictStr] = Field(None, alias="ATT_NAME", description="Name of the pet ") additional_properties: Dict[str, Any] = {} - __properties = ["smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME"] """Pydantic configuration""" class Config: @@ -85,7 +84,7 @@ def from_dict(cls, obj: dict) -> Capitalization: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/cat.py b/samples/openapi3/client/petstore/python/petstore_api/models/cat.py index a0767dcda8db..85b3f6cd5438 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/cat.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/cat.py @@ -28,7 +28,6 @@ class Cat(Animal): """ declawed: Optional[StrictBool] = None additional_properties: Dict[str, Any] = {} - __properties = ["className", "color", "declawed"] """Pydantic configuration""" class Config: @@ -78,7 +77,7 @@ def from_dict(cls, obj: dict) -> Cat: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["className", "color", "declawed"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/category.py b/samples/openapi3/client/petstore/python/petstore_api/models/category.py index e741639d3d26..a4777afedcd1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/category.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/category.py @@ -28,7 +28,6 @@ class Category(BaseModel): id: Optional[StrictInt] = None name: StrictStr = Field(...) additional_properties: Dict[str, Any] = {} - __properties = ["id", "name"] """Pydantic configuration""" class Config: @@ -77,7 +76,7 @@ def from_dict(cls, obj: dict) -> Category: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["id", "name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/circular_reference_model.py b/samples/openapi3/client/petstore/python/petstore_api/models/circular_reference_model.py index 4c65c3e7e9df..3bc5fd8666e4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/circular_reference_model.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/circular_reference_model.py @@ -28,7 +28,6 @@ class CircularReferenceModel(BaseModel): size: Optional[StrictInt] = None nested: Optional[FirstRef] = None additional_properties: Dict[str, Any] = {} - __properties = ["size", "nested"] """Pydantic configuration""" class Config: @@ -80,11 +79,14 @@ def from_dict(cls, obj: dict) -> CircularReferenceModel: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["size", "nested"]: _obj.additional_properties[_key] = obj.get(_key) return _obj from petstore_api.models.first_ref import FirstRef -CircularReferenceModel.update_forward_refs() +try: + CircularReferenceModel.update_forward_refs() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py b/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py index 8dbe440495f4..b07086e5fb0f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/class_model.py @@ -27,7 +27,6 @@ class ClassModel(BaseModel): """ var_class: Optional[StrictStr] = Field(None, alias="_class") additional_properties: Dict[str, Any] = {} - __properties = ["_class"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> ClassModel: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["_class"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/client.py b/samples/openapi3/client/petstore/python/petstore_api/models/client.py index d33089c7acf2..438d32b0ad58 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/client.py @@ -27,7 +27,6 @@ class Client(BaseModel): """ client: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["client"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> Client: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["client"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/color.py b/samples/openapi3/client/petstore/python/petstore_api/models/color.py index 574093092a01..51a35dba4d8f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/color.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/color.py @@ -35,9 +35,9 @@ class Color(BaseModel): # data type: str oneof_schema_3_validator: Optional[constr(strict=True, max_length=7, min_length=7)] = Field(None, description="Hex color string, such as #00FF00.") if TYPE_CHECKING: - actual_instance: Union[List[int], str] + actual_instance: Union[List[int], str, None] else: - actual_instance: Any + actual_instance: Any = None one_of_schemas: List[str] = Field(COLOR_ONE_OF_SCHEMAS, const=True) @@ -52,8 +52,10 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) @validator('actual_instance') def actual_instance_must_validate_oneof(cls, v): @@ -83,6 +85,8 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(str(e)) if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when setting `actual_instance` in Color with oneOf schemas: List[int], str. Details: " + ", ".join(error_messages)) elif match == 0: # no match @@ -134,6 +138,8 @@ def from_json(cls, json_str: str) -> Color: if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when deserializing the JSON string into Color with oneOf schemas: List[int], str. Details: " + ", ".join(error_messages)) elif match == 0: # no match diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/creature.py b/samples/openapi3/client/petstore/python/petstore_api/models/creature.py index b825d112ffde..dc04d6cabefb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/creature.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/creature.py @@ -29,7 +29,6 @@ class Creature(BaseModel): info: CreatureInfo = Field(...) type: StrictStr = Field(...) additional_properties: Dict[str, Any] = {} - __properties = ["info", "type"] """Pydantic configuration""" class Config: @@ -81,7 +80,7 @@ def from_dict(cls, obj: dict) -> Creature: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["info", "type"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/creature_info.py b/samples/openapi3/client/petstore/python/petstore_api/models/creature_info.py index 1e3f89ba59bc..db671f32ca63 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/creature_info.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/creature_info.py @@ -27,7 +27,6 @@ class CreatureInfo(BaseModel): """ name: StrictStr = Field(...) additional_properties: Dict[str, Any] = {} - __properties = ["name"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> CreatureInfo: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/danish_pig.py b/samples/openapi3/client/petstore/python/petstore_api/models/danish_pig.py index 63ac5adc7c93..be678472d38d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/danish_pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/danish_pig.py @@ -28,7 +28,6 @@ class DanishPig(BaseModel): class_name: StrictStr = Field(..., alias="className") size: StrictInt = Field(...) additional_properties: Dict[str, Any] = {} - __properties = ["className", "size"] """Pydantic configuration""" class Config: @@ -77,7 +76,7 @@ def from_dict(cls, obj: dict) -> DanishPig: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["className", "size"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/deprecated_object.py b/samples/openapi3/client/petstore/python/petstore_api/models/deprecated_object.py index 072a70136f7d..b6245ab754ef 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/deprecated_object.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/deprecated_object.py @@ -27,7 +27,6 @@ class DeprecatedObject(BaseModel): """ name: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["name"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> DeprecatedObject: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/dog.py b/samples/openapi3/client/petstore/python/petstore_api/models/dog.py index 8c64d451b9ed..c8fa1f3b7b97 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/dog.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/dog.py @@ -28,7 +28,6 @@ class Dog(Animal): """ breed: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["className", "color", "breed"] """Pydantic configuration""" class Config: @@ -78,7 +77,7 @@ def from_dict(cls, obj: dict) -> Dog: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["className", "color", "breed"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/dummy_model.py b/samples/openapi3/client/petstore/python/petstore_api/models/dummy_model.py index fd5e54166033..41dd3be90cb2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/dummy_model.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/dummy_model.py @@ -28,7 +28,6 @@ class DummyModel(BaseModel): category: Optional[StrictStr] = None self_ref: Optional[SelfReferenceModel] = None additional_properties: Dict[str, Any] = {} - __properties = ["category", "self_ref"] """Pydantic configuration""" class Config: @@ -80,11 +79,14 @@ def from_dict(cls, obj: dict) -> DummyModel: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["category", "self_ref"]: _obj.additional_properties[_key] = obj.get(_key) return _obj from petstore_api.models.self_reference_model import SelfReferenceModel -DummyModel.update_forward_refs() +try: + DummyModel.update_forward_refs() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py b/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py index af6d88417552..ff1ffdd738bf 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/enum_arrays.py @@ -28,7 +28,6 @@ class EnumArrays(BaseModel): just_symbol: Optional[StrictStr] = None array_enum: Optional[conlist(StrictStr)] = None additional_properties: Dict[str, Any] = {} - __properties = ["just_symbol", "array_enum"] @validator('just_symbol') def just_symbol_validate_enum(cls, value): @@ -98,7 +97,7 @@ def from_dict(cls, obj: dict) -> EnumArrays: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["just_symbol", "array_enum"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py index 0bae41973e41..d4bbd50c3994 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/enum_test.py @@ -39,7 +39,6 @@ class EnumTest(BaseModel): outer_enum_default_value: Optional[OuterEnumDefaultValue] = Field(None, alias="outerEnumDefaultValue") outer_enum_integer_default_value: Optional[OuterEnumIntegerDefaultValue] = Field(None, alias="outerEnumIntegerDefaultValue") additional_properties: Dict[str, Any] = {} - __properties = ["enum_string", "enum_string_required", "enum_integer_default", "enum_integer", "enum_number", "outerEnum", "outerEnumInteger", "outerEnumDefaultValue", "outerEnumIntegerDefaultValue"] @validator('enum_string') def enum_string_validate_enum(cls, value): @@ -147,7 +146,7 @@ def from_dict(cls, obj: dict) -> EnumTest: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["enum_string", "enum_string_required", "enum_integer_default", "enum_integer", "enum_number", "outerEnum", "outerEnumInteger", "outerEnumDefaultValue", "outerEnumIntegerDefaultValue"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/file.py b/samples/openapi3/client/petstore/python/petstore_api/models/file.py index 38c1c6628984..aecaa35c00f8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/file.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/file.py @@ -27,7 +27,6 @@ class File(BaseModel): """ source_uri: Optional[StrictStr] = Field(None, alias="sourceURI", description="Test capitalization") additional_properties: Dict[str, Any] = {} - __properties = ["sourceURI"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> File: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["sourceURI"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py index 65561c5e061d..e921e8293814 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/file_schema_test_class.py @@ -29,7 +29,6 @@ class FileSchemaTestClass(BaseModel): file: Optional[File] = None files: Optional[conlist(File)] = None additional_properties: Dict[str, Any] = {} - __properties = ["file", "files"] """Pydantic configuration""" class Config: @@ -88,7 +87,7 @@ def from_dict(cls, obj: dict) -> FileSchemaTestClass: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["file", "files"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/first_ref.py b/samples/openapi3/client/petstore/python/petstore_api/models/first_ref.py index ee6cf8a9ca00..883cea6ac861 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/first_ref.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/first_ref.py @@ -28,7 +28,6 @@ class FirstRef(BaseModel): category: Optional[StrictStr] = None self_ref: Optional[SecondRef] = None additional_properties: Dict[str, Any] = {} - __properties = ["category", "self_ref"] """Pydantic configuration""" class Config: @@ -80,11 +79,14 @@ def from_dict(cls, obj: dict) -> FirstRef: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["category", "self_ref"]: _obj.additional_properties[_key] = obj.get(_key) return _obj from petstore_api.models.second_ref import SecondRef -FirstRef.update_forward_refs() +try: + FirstRef.update_forward_refs() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/foo.py b/samples/openapi3/client/petstore/python/petstore_api/models/foo.py index 72cb376c34b0..266f5826db56 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/foo.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/foo.py @@ -27,7 +27,6 @@ class Foo(BaseModel): """ bar: Optional[StrictStr] = 'bar' additional_properties: Dict[str, Any] = {} - __properties = ["bar"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> Foo: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["bar"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/foo_get_default_response.py b/samples/openapi3/client/petstore/python/petstore_api/models/foo_get_default_response.py index 5a0b5e662a6f..9eddc861bcf0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/foo_get_default_response.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/foo_get_default_response.py @@ -28,7 +28,6 @@ class FooGetDefaultResponse(BaseModel): """ string: Optional[Foo] = None additional_properties: Dict[str, Any] = {} - __properties = ["string"] """Pydantic configuration""" class Config: @@ -79,7 +78,7 @@ def from_dict(cls, obj: dict) -> FooGetDefaultResponse: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["string"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py index 9593187ab837..ef3b19f22a16 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py @@ -43,7 +43,6 @@ class FormatTest(BaseModel): pattern_with_digits: Optional[constr(strict=True)] = Field(None, description="A string that is a 10 digit number. Can have leading zeros.") pattern_with_digits_and_delimiter: Optional[constr(strict=True)] = Field(None, description="A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.") additional_properties: Dict[str, Any] = {} - __properties = ["integer", "int32", "int64", "number", "float", "double", "decimal", "string", "string_with_double_quote_pattern", "byte", "binary", "date", "dateTime", "uuid", "password", "pattern_with_digits", "pattern_with_digits_and_delimiter"] @validator('string') def string_validate_regular_expression(cls, value): @@ -147,7 +146,7 @@ def from_dict(cls, obj: dict) -> FormatTest: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["integer", "int32", "int64", "number", "float", "double", "decimal", "string", "string_with_double_quote_pattern", "byte", "binary", "date", "dateTime", "uuid", "password", "pattern_with_digits", "pattern_with_digits_and_delimiter"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py index d1325c9ff63c..2058a418a7ea 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/has_only_read_only.py @@ -28,7 +28,6 @@ class HasOnlyReadOnly(BaseModel): bar: Optional[StrictStr] = None foo: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["bar", "foo"] """Pydantic configuration""" class Config: @@ -79,7 +78,7 @@ def from_dict(cls, obj: dict) -> HasOnlyReadOnly: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["bar", "foo"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/health_check_result.py b/samples/openapi3/client/petstore/python/petstore_api/models/health_check_result.py index b3f08f79162d..662420fb8841 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/health_check_result.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/health_check_result.py @@ -27,7 +27,6 @@ class HealthCheckResult(BaseModel): """ nullable_message: Optional[StrictStr] = Field(None, alias="NullableMessage") additional_properties: Dict[str, Any] = {} - __properties = ["NullableMessage"] """Pydantic configuration""" class Config: @@ -80,7 +79,7 @@ def from_dict(cls, obj: dict) -> HealthCheckResult: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["NullableMessage"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/inner_dict_with_property.py b/samples/openapi3/client/petstore/python/petstore_api/models/inner_dict_with_property.py index 97c87383862b..4c47dd933fae 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/inner_dict_with_property.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/inner_dict_with_property.py @@ -27,7 +27,6 @@ class InnerDictWithProperty(BaseModel): """ a_property: Optional[Dict[str, Any]] = Field(None, alias="aProperty") additional_properties: Dict[str, Any] = {} - __properties = ["aProperty"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> InnerDictWithProperty: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["aProperty"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/int_or_string.py b/samples/openapi3/client/petstore/python/petstore_api/models/int_or_string.py index 574c73549525..3af97701905d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/int_or_string.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/int_or_string.py @@ -35,7 +35,7 @@ class IntOrString(BaseModel): if TYPE_CHECKING: actual_instance: Union[int, str] else: - actual_instance: Any + actual_instance: Any = None one_of_schemas: List[str] = Field(INTORSTRING_ONE_OF_SCHEMAS, const=True) @@ -50,8 +50,10 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) @validator('actual_instance') def actual_instance_must_validate_oneof(cls, v): @@ -72,6 +74,8 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(str(e)) if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when setting `actual_instance` in IntOrString with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) elif match == 0: # no match @@ -111,6 +115,8 @@ def from_json(cls, json_str: str) -> IntOrString: if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when deserializing the JSON string into IntOrString with oneOf schemas: int, str. Details: " + ", ".join(error_messages)) elif match == 0: # no match diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/list.py b/samples/openapi3/client/petstore/python/petstore_api/models/list.py index c1e80a8bf1d6..dc1900090a36 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/list.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/list.py @@ -27,7 +27,6 @@ class List(BaseModel): """ var_123_list: Optional[StrictStr] = Field(None, alias="123-list") additional_properties: Dict[str, Any] = {} - __properties = ["123-list"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> List: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["123-list"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/map_of_array_of_model.py b/samples/openapi3/client/petstore/python/petstore_api/models/map_of_array_of_model.py index 5339b05fb0ae..90cb32bcc888 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/map_of_array_of_model.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/map_of_array_of_model.py @@ -28,7 +28,6 @@ class MapOfArrayOfModel(BaseModel): """ shop_id_to_org_online_lip_map: Optional[Dict[str, conlist(Tag)]] = Field(None, alias="shopIdToOrgOnlineLipMap") additional_properties: Dict[str, Any] = {} - __properties = ["shopIdToOrgOnlineLipMap"] """Pydantic configuration""" class Config: @@ -92,7 +91,7 @@ def from_dict(cls, obj: dict) -> MapOfArrayOfModel: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["shopIdToOrgOnlineLipMap"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py index d9a35e2e76c4..14fb340672ea 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/map_test.py @@ -30,7 +30,6 @@ class MapTest(BaseModel): direct_map: Optional[Dict[str, StrictBool]] = None indirect_map: Optional[Dict[str, StrictBool]] = None additional_properties: Dict[str, Any] = {} - __properties = ["map_map_of_string", "map_of_enum_string", "direct_map", "indirect_map"] @validator('map_of_enum_string') def map_of_enum_string_validate_enum(cls, value): @@ -91,7 +90,7 @@ def from_dict(cls, obj: dict) -> MapTest: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["map_map_of_string", "map_of_enum_string", "direct_map", "indirect_map"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py index 656a0c70c329..39a44af60b9a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -30,7 +30,6 @@ class MixedPropertiesAndAdditionalPropertiesClass(BaseModel): date_time: Optional[datetime] = Field(None, alias="dateTime") map: Optional[Dict[str, Animal]] = None additional_properties: Dict[str, Any] = {} - __properties = ["uuid", "dateTime", "map"] """Pydantic configuration""" class Config: @@ -92,7 +91,7 @@ def from_dict(cls, obj: dict) -> MixedPropertiesAndAdditionalPropertiesClass: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["uuid", "dateTime", "map"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py b/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py index a3955bcb9632..1fed6c711e01 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/model200_response.py @@ -28,7 +28,6 @@ class Model200Response(BaseModel): name: Optional[StrictInt] = None var_class: Optional[StrictStr] = Field(None, alias="class") additional_properties: Dict[str, Any] = {} - __properties = ["name", "class"] """Pydantic configuration""" class Config: @@ -77,7 +76,7 @@ def from_dict(cls, obj: dict) -> Model200Response: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["name", "class"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py b/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py index 5d73d5ff459c..6a304ea51107 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/model_return.py @@ -27,7 +27,6 @@ class ModelReturn(BaseModel): """ var_return: Optional[StrictInt] = Field(None, alias="return") additional_properties: Dict[str, Any] = {} - __properties = ["return"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> ModelReturn: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["return"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/name.py b/samples/openapi3/client/petstore/python/petstore_api/models/name.py index 78691119c80d..b53c0848a129 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/name.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/name.py @@ -30,7 +30,6 @@ class Name(BaseModel): var_property: Optional[StrictStr] = Field(None, alias="property") var_123_number: Optional[StrictInt] = Field(None, alias="123Number") additional_properties: Dict[str, Any] = {} - __properties = ["name", "snake_case", "property", "123Number"] """Pydantic configuration""" class Config: @@ -83,7 +82,7 @@ def from_dict(cls, obj: dict) -> Name: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["name", "snake_case", "property", "123Number"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py index f9f75200a479..3393c1a6c0f0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py @@ -39,7 +39,6 @@ class NullableClass(BaseModel): object_and_items_nullable_prop: Optional[Dict[str, Dict[str, Any]]] = None object_items_nullable: Optional[Dict[str, Dict[str, Any]]] = None additional_properties: Dict[str, Any] = {} - __properties = ["required_integer_prop", "integer_prop", "number_prop", "boolean_prop", "string_prop", "date_prop", "datetime_prop", "array_nullable_prop", "array_and_items_nullable_prop", "array_items_nullable", "object_nullable_prop", "object_and_items_nullable_prop", "object_items_nullable"] """Pydantic configuration""" class Config: @@ -154,7 +153,7 @@ def from_dict(cls, obj: dict) -> NullableClass: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["required_integer_prop", "integer_prop", "number_prop", "boolean_prop", "string_prop", "date_prop", "datetime_prop", "array_nullable_prop", "array_and_items_nullable_prop", "array_items_nullable", "object_nullable_prop", "object_and_items_nullable_prop", "object_items_nullable"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/nullable_property.py b/samples/openapi3/client/petstore/python/petstore_api/models/nullable_property.py index f9852c6d4c50..d200563a69ba 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/nullable_property.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/nullable_property.py @@ -28,7 +28,6 @@ class NullableProperty(BaseModel): id: StrictInt = Field(...) name: Optional[constr(strict=True)] = Field(...) additional_properties: Dict[str, Any] = {} - __properties = ["id", "name"] @validator('name') def name_validate_regular_expression(cls, value): @@ -92,7 +91,7 @@ def from_dict(cls, obj: dict) -> NullableProperty: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["id", "name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py b/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py index b615444e8cb4..ce73a0df547c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/number_only.py @@ -27,7 +27,6 @@ class NumberOnly(BaseModel): """ just_number: Optional[StrictFloat] = Field(None, alias="JustNumber") additional_properties: Dict[str, Any] = {} - __properties = ["JustNumber"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> NumberOnly: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["JustNumber"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/object_to_test_additional_properties.py b/samples/openapi3/client/petstore/python/petstore_api/models/object_to_test_additional_properties.py index 69889866bbad..568f4e5cf296 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/object_to_test_additional_properties.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/object_to_test_additional_properties.py @@ -27,7 +27,6 @@ class ObjectToTestAdditionalProperties(BaseModel): """ var_property: Optional[StrictBool] = Field(False, alias="property", description="Property") additional_properties: Dict[str, Any] = {} - __properties = ["property"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> ObjectToTestAdditionalProperties: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["property"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/object_with_deprecated_fields.py b/samples/openapi3/client/petstore/python/petstore_api/models/object_with_deprecated_fields.py index 1b23fea5022e..71cb09c56a83 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/object_with_deprecated_fields.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/object_with_deprecated_fields.py @@ -31,7 +31,6 @@ class ObjectWithDeprecatedFields(BaseModel): deprecated_ref: Optional[DeprecatedObject] = Field(None, alias="deprecatedRef") bars: Optional[conlist(StrictStr)] = None additional_properties: Dict[str, Any] = {} - __properties = ["uuid", "id", "deprecatedRef", "bars"] """Pydantic configuration""" class Config: @@ -85,7 +84,7 @@ def from_dict(cls, obj: dict) -> ObjectWithDeprecatedFields: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["uuid", "id", "deprecatedRef", "bars"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/one_of_enum_string.py b/samples/openapi3/client/petstore/python/petstore_api/models/one_of_enum_string.py index f4b18189e6f9..a781e3febe0a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/one_of_enum_string.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/one_of_enum_string.py @@ -37,7 +37,7 @@ class OneOfEnumString(BaseModel): if TYPE_CHECKING: actual_instance: Union[EnumString1, EnumString2] else: - actual_instance: Any + actual_instance: Any = None one_of_schemas: List[str] = Field(ONEOFENUMSTRING_ONE_OF_SCHEMAS, const=True) @@ -52,8 +52,10 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) @validator('actual_instance') def actual_instance_must_validate_oneof(cls, v): @@ -61,17 +63,21 @@ def actual_instance_must_validate_oneof(cls, v): error_messages = [] match = 0 # validate data type: EnumString1 - if not isinstance(v, EnumString1): - error_messages.append(f"Error! Input type `{type(v)}` is not `EnumString1`") - else: + try: + instance.oneof_schema_1_validator = v match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) # validate data type: EnumString2 - if not isinstance(v, EnumString2): - error_messages.append(f"Error! Input type `{type(v)}` is not `EnumString2`") - else: + try: + instance.oneof_schema_2_validator = v match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when setting `actual_instance` in OneOfEnumString with oneOf schemas: EnumString1, EnumString2. Details: " + ", ".join(error_messages)) elif match == 0: # no match @@ -105,6 +111,8 @@ def from_json(cls, json_str: str) -> OneOfEnumString: if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when deserializing the JSON string into OneOfEnumString with oneOf schemas: EnumString1, EnumString2. Details: " + ", ".join(error_messages)) elif match == 0: # no match diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/order.py b/samples/openapi3/client/petstore/python/petstore_api/models/order.py index 46744c6d899c..c372d10443a7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/order.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/order.py @@ -32,7 +32,6 @@ class Order(BaseModel): status: Optional[StrictStr] = Field(None, description="Order Status") complete: Optional[StrictBool] = False additional_properties: Dict[str, Any] = {} - __properties = ["id", "petId", "quantity", "shipDate", "status", "complete"] @validator('status') def status_validate_enum(cls, value): @@ -95,7 +94,7 @@ def from_dict(cls, obj: dict) -> Order: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["id", "petId", "quantity", "shipDate", "status", "complete"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py index ab19c5478cab..5dbc893d2ac2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_composite.py @@ -29,7 +29,6 @@ class OuterComposite(BaseModel): my_string: Optional[StrictStr] = None my_boolean: Optional[StrictBool] = None additional_properties: Dict[str, Any] = {} - __properties = ["my_number", "my_string", "my_boolean"] """Pydantic configuration""" class Config: @@ -79,7 +78,7 @@ def from_dict(cls, obj: dict) -> OuterComposite: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["my_number", "my_string", "my_boolean"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/outer_object_with_enum_property.py b/samples/openapi3/client/petstore/python/petstore_api/models/outer_object_with_enum_property.py index f925d15226d0..1d0c83ee1eae 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/outer_object_with_enum_property.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/outer_object_with_enum_property.py @@ -30,7 +30,6 @@ class OuterObjectWithEnumProperty(BaseModel): str_value: Optional[OuterEnum] = None value: OuterEnumInteger = Field(...) additional_properties: Dict[str, Any] = {} - __properties = ["str_value", "value"] """Pydantic configuration""" class Config: @@ -84,7 +83,7 @@ def from_dict(cls, obj: dict) -> OuterObjectWithEnumProperty: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["str_value", "value"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/parent.py b/samples/openapi3/client/petstore/python/petstore_api/models/parent.py index ffd387db12e9..1c87d16db279 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/parent.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/parent.py @@ -28,7 +28,6 @@ class Parent(BaseModel): """ optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(None, alias="optionalDict") additional_properties: Dict[str, Any] = {} - __properties = ["optionalDict"] """Pydantic configuration""" class Config: @@ -88,7 +87,7 @@ def from_dict(cls, obj: dict) -> Parent: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["optionalDict"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/parent_with_optional_dict.py b/samples/openapi3/client/petstore/python/petstore_api/models/parent_with_optional_dict.py index a7832616daed..4c4b39bd7273 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/parent_with_optional_dict.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/parent_with_optional_dict.py @@ -28,7 +28,6 @@ class ParentWithOptionalDict(BaseModel): """ optional_dict: Optional[Dict[str, InnerDictWithProperty]] = Field(None, alias="optionalDict") additional_properties: Dict[str, Any] = {} - __properties = ["optionalDict"] """Pydantic configuration""" class Config: @@ -88,7 +87,7 @@ def from_dict(cls, obj: dict) -> ParentWithOptionalDict: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["optionalDict"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/pet.py b/samples/openapi3/client/petstore/python/petstore_api/models/pet.py index 2f68cf79f205..e7aa0f53e650 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/pet.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/pet.py @@ -34,7 +34,6 @@ class Pet(BaseModel): tags: Optional[conlist(Tag)] = None status: Optional[StrictStr] = Field(None, description="pet status in the store") additional_properties: Dict[str, Any] = {} - __properties = ["id", "category", "name", "photoUrls", "tags", "status"] @validator('status') def status_validate_enum(cls, value): @@ -107,7 +106,7 @@ def from_dict(cls, obj: dict) -> Pet: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["id", "category", "name", "photoUrls", "tags", "status"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/pig.py b/samples/openapi3/client/petstore/python/petstore_api/models/pig.py index 0f96725a08b9..0647ef1208ca 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/pig.py @@ -37,7 +37,7 @@ class Pig(BaseModel): if TYPE_CHECKING: actual_instance: Union[BasquePig, DanishPig] else: - actual_instance: Any + actual_instance: Any = None one_of_schemas: List[str] = Field(PIG_ONE_OF_SCHEMAS, const=True) @@ -45,9 +45,6 @@ class Pig(BaseModel): class Config: validate_assignment = True - discriminator_value_class_map = { - } - def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -55,8 +52,10 @@ def __init__(self, *args, **kwargs) -> None: if kwargs: raise ValueError("If a position argument is used, keyword arguments cannot be used.") super().__init__(actual_instance=args[0]) - else: + elif kwargs: super().__init__(**kwargs) + else: + super().__init__(actual_instance=None) @validator('actual_instance') def actual_instance_must_validate_oneof(cls, v): @@ -64,17 +63,21 @@ def actual_instance_must_validate_oneof(cls, v): error_messages = [] match = 0 # validate data type: BasquePig - if not isinstance(v, BasquePig): - error_messages.append(f"Error! Input type `{type(v)}` is not `BasquePig`") - else: + try: + instance.oneof_schema_1_validator = v match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) # validate data type: DanishPig - if not isinstance(v, DanishPig): - error_messages.append(f"Error! Input type `{type(v)}` is not `DanishPig`") - else: + try: + instance.oneof_schema_2_validator = v match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when setting `actual_instance` in Pig with oneOf schemas: BasquePig, DanishPig. Details: " + ", ".join(error_messages)) elif match == 0: # no match @@ -123,6 +126,8 @@ def from_json(cls, json_str: str) -> Pig: if match > 1: # more than 1 match + if v is None: + return v raise ValueError("Multiple matches found when deserializing the JSON string into Pig with oneOf schemas: BasquePig, DanishPig. Details: " + ", ".join(error_messages)) elif match == 0: # no match diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/property_name_collision.py b/samples/openapi3/client/petstore/python/petstore_api/models/property_name_collision.py index 10a53fc54ddd..f74682800ccd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/property_name_collision.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/property_name_collision.py @@ -29,7 +29,6 @@ class PropertyNameCollision(BaseModel): type: Optional[StrictStr] = None type_with_underscore: Optional[StrictStr] = Field(None, alias="type_") additional_properties: Dict[str, Any] = {} - __properties = ["_type", "type", "type_"] """Pydantic configuration""" class Config: @@ -79,7 +78,7 @@ def from_dict(cls, obj: dict) -> PropertyNameCollision: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["_type", "type", "type_"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py b/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py index 00fccbdf1a48..4a2fd25376c1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/read_only_first.py @@ -28,7 +28,6 @@ class ReadOnlyFirst(BaseModel): bar: Optional[StrictStr] = None baz: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["bar", "baz"] """Pydantic configuration""" class Config: @@ -78,7 +77,7 @@ def from_dict(cls, obj: dict) -> ReadOnlyFirst: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["bar", "baz"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/second_ref.py b/samples/openapi3/client/petstore/python/petstore_api/models/second_ref.py index 8fc160607612..82490f7c7d36 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/second_ref.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/second_ref.py @@ -28,7 +28,6 @@ class SecondRef(BaseModel): category: Optional[StrictStr] = None circular_ref: Optional[CircularReferenceModel] = None additional_properties: Dict[str, Any] = {} - __properties = ["category", "circular_ref"] """Pydantic configuration""" class Config: @@ -80,11 +79,14 @@ def from_dict(cls, obj: dict) -> SecondRef: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["category", "circular_ref"]: _obj.additional_properties[_key] = obj.get(_key) return _obj from petstore_api.models.circular_reference_model import CircularReferenceModel -SecondRef.update_forward_refs() +try: + SecondRef.update_forward_refs() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/self_reference_model.py b/samples/openapi3/client/petstore/python/petstore_api/models/self_reference_model.py index 6176d7327d7f..ef185b1056a2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/self_reference_model.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/self_reference_model.py @@ -28,7 +28,6 @@ class SelfReferenceModel(BaseModel): size: Optional[StrictInt] = None nested: Optional[DummyModel] = None additional_properties: Dict[str, Any] = {} - __properties = ["size", "nested"] """Pydantic configuration""" class Config: @@ -80,11 +79,14 @@ def from_dict(cls, obj: dict) -> SelfReferenceModel: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["size", "nested"]: _obj.additional_properties[_key] = obj.get(_key) return _obj from petstore_api.models.dummy_model import DummyModel -SelfReferenceModel.update_forward_refs() +try: + SelfReferenceModel.update_forward_refs() +except Exception: + pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py b/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py index 373b1209fe04..2d603f0cdcba 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/special_model_name.py @@ -27,7 +27,6 @@ class SpecialModelName(BaseModel): """ special_property_name: Optional[StrictInt] = Field(None, alias="$special[property.name]") additional_properties: Dict[str, Any] = {} - __properties = ["$special[property.name]"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> SpecialModelName: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["$special[property.name]"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/special_name.py b/samples/openapi3/client/petstore/python/petstore_api/models/special_name.py index 01075364c1b2..d9892515330f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/special_name.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/special_name.py @@ -30,7 +30,6 @@ class SpecialName(BaseModel): var_async: Optional[Category] = Field(None, alias="async") var_schema: Optional[StrictStr] = Field(None, alias="schema", description="pet status in the store") additional_properties: Dict[str, Any] = {} - __properties = ["property", "async", "schema"] @validator('var_schema') def var_schema_validate_enum(cls, value): @@ -93,7 +92,7 @@ def from_dict(cls, obj: dict) -> SpecialName: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["property", "async", "schema"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/tag.py b/samples/openapi3/client/petstore/python/petstore_api/models/tag.py index 28766eda136a..a67b9a99d074 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/tag.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/tag.py @@ -28,7 +28,6 @@ class Tag(BaseModel): id: Optional[StrictInt] = None name: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["id", "name"] """Pydantic configuration""" class Config: @@ -77,7 +76,7 @@ def from_dict(cls, obj: dict) -> Tag: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["id", "name"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/tiger.py b/samples/openapi3/client/petstore/python/petstore_api/models/tiger.py index 26c12744c636..56103e75a314 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/tiger.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/tiger.py @@ -27,7 +27,6 @@ class Tiger(BaseModel): """ skill: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties = ["skill"] """Pydantic configuration""" class Config: @@ -75,7 +74,7 @@ def from_dict(cls, obj: dict) -> Tiger: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["skill"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/user.py b/samples/openapi3/client/petstore/python/petstore_api/models/user.py index 2c1e32c81ce7..0795e68aa576 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/user.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/user.py @@ -34,7 +34,6 @@ class User(BaseModel): phone: Optional[StrictStr] = None user_status: Optional[StrictInt] = Field(None, alias="userStatus", description="User Status") additional_properties: Dict[str, Any] = {} - __properties = ["id", "username", "firstName", "lastName", "email", "password", "phone", "userStatus"] """Pydantic configuration""" class Config: @@ -89,7 +88,7 @@ def from_dict(cls, obj: dict) -> User: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["id", "username", "firstName", "lastName", "email", "password", "phone", "userStatus"]: _obj.additional_properties[_key] = obj.get(_key) return _obj diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/with_nested_one_of.py b/samples/openapi3/client/petstore/python/petstore_api/models/with_nested_one_of.py index 8bf965cd87e7..df210096d07f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/with_nested_one_of.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/with_nested_one_of.py @@ -31,7 +31,6 @@ class WithNestedOneOf(BaseModel): nested_pig: Optional[Pig] = None nested_oneof_enum_string: Optional[OneOfEnumString] = None additional_properties: Dict[str, Any] = {} - __properties = ["size", "nested_pig", "nested_oneof_enum_string"] """Pydantic configuration""" class Config: @@ -87,7 +86,7 @@ def from_dict(cls, obj: dict) -> WithNestedOneOf: }) # store additional fields in additional_properties for _key in obj.keys(): - if _key not in cls.__properties: + if _key not in ["size", "nested_pig", "nested_oneof_enum_string"]: _obj.additional_properties[_key] = obj.get(_key) return _obj From 91a1d9a831aa6b7ad3818d22dbdedc35fc9b77b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Sun, 24 Sep 2023 09:17:53 +0900 Subject: [PATCH 59/59] [python] restore getheaders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- .../src/main/resources/python/api_client.mustache | 2 +- samples/client/echo_api/python/openapi_client/api_client.py | 2 +- .../client/petstore/python-aiohttp/petstore_api/api_client.py | 2 +- .../petstore/python-pydantic-v2/petstore_api/api_client.py | 2 +- .../openapi3/client/petstore/python/petstore_api/api_client.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/api_client.mustache b/modules/openapi-generator/src/main/resources/python/api_client.mustache index ef082f8615a7..2610fd772610 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -258,7 +258,7 @@ class ApiClient: # deserialize response data if response_type == "bytearray": return_data = response_data.data - return_headers = response_data.headers + return_headers = response_data.getheaders() elif response_type: return_data = self.deserialize(response_data, response_type) return_headers = response_data.getheaders() diff --git a/samples/client/echo_api/python/openapi_client/api_client.py b/samples/client/echo_api/python/openapi_client/api_client.py index f1584c2cf820..05cd10bc87f8 100644 --- a/samples/client/echo_api/python/openapi_client/api_client.py +++ b/samples/client/echo_api/python/openapi_client/api_client.py @@ -245,7 +245,7 @@ def __call_api( # deserialize response data if response_type == "bytearray": return_data = response_data.data - return_headers = response_data.headers + return_headers = response_data.getheaders() elif response_type: return_data = self.deserialize(response_data, response_type) return_headers = response_data.getheaders() diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py index 444267d1f613..86a6ba55bdc2 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py @@ -225,7 +225,7 @@ async def __call_api( # deserialize response data if response_type == "bytearray": return_data = response_data.data - return_headers = response_data.headers + return_headers = response_data.getheaders() elif response_type: return_data = self.deserialize(response_data, response_type) return_headers = response_data.getheaders() diff --git a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api_client.py index 5fb593b6559a..3bb6987e7831 100755 --- a/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-pydantic-v2/petstore_api/api_client.py @@ -244,7 +244,7 @@ def __call_api( # deserialize response data if response_type == "bytearray": return_data = response_data.data - return_headers = response_data.headers + return_headers = response_data.getheaders() elif response_type: return_data = self.deserialize(response_data, response_type) return_headers = response_data.getheaders() diff --git a/samples/openapi3/client/petstore/python/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py index 5fb593b6559a..3bb6987e7831 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -244,7 +244,7 @@ def __call_api( # deserialize response data if response_type == "bytearray": return_data = response_data.data - return_headers = response_data.headers + return_headers = response_data.getheaders() elif response_type: return_data = self.deserialize(response_data, response_type) return_headers = response_data.getheaders()