From a4ac55938fbebf9b0dda5e19f307788f197d3d72 Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Wed, 11 Oct 2023 17:46:21 +0100 Subject: [PATCH 01/13] Avoid overriding user's settings from config --- .../Writers/CSharp/CodeMethodWriter.cs | 28 ++++----- .../Writers/Go/CodeMethodWriter.cs | 57 ++++++++++--------- .../Writers/Java/CodeMethodWriter.cs | 40 ++++++------- .../Writers/Php/CodeMethodWriter.cs | 4 +- .../Writers/Python/CodeMethodWriter.cs | 4 +- .../Writers/Ruby/CodeMethodWriter.cs | 14 ++--- .../Writers/TypeScript/CodeMethodWriter.cs | 14 ++--- .../Writers/CSharp/CodeMethodWriterTests.cs | 6 +- .../Writers/Go/CodeMethodWriterTests.cs | 8 +-- .../Writers/Java/CodeMethodWriterTests.cs | 6 +- .../Writers/Python/CodeMethodWriterTests.cs | 4 +- .../Writers/Ruby/CodeMethodWriterTests.cs | 2 +- .../TypeScript/CodeMethodWriterTests.cs | 4 +- 13 files changed, 99 insertions(+), 92 deletions(-) diff --git a/src/Kiota.Builder/Writers/CSharp/CodeMethodWriter.cs b/src/Kiota.Builder/Writers/CSharp/CodeMethodWriter.cs index dd95265e3c..8bbf7c0845 100644 --- a/src/Kiota.Builder/Writers/CSharp/CodeMethodWriter.cs +++ b/src/Kiota.Builder/Writers/CSharp/CodeMethodWriter.cs @@ -418,19 +418,6 @@ private void WriteRequestGeneratorBody(CodeMethod codeElement, RequestParams req writer.WriteLines($"UrlTemplate = {GetPropertyCall(urlTemplateProperty, "string.Empty")},", $"PathParameters = {GetPropertyCall(urlTemplateParamsProperty, "string.Empty")},"); writer.CloseBlock("};"); - if (codeElement.AcceptedResponseTypes.Any()) - writer.WriteLine($"{RequestInfoVarName}.Headers.Add(\"Accept\", \"{string.Join(", ", codeElement.AcceptedResponseTypes)}\");"); - if (requestParams.requestBody != null) - { - var suffix = requestParams.requestBody.Type.IsCollection ? "Collection" : string.Empty; - if (requestParams.requestBody.Type.Name.Equals(conventions.StreamTypeName, StringComparison.OrdinalIgnoreCase)) - writer.WriteLine($"{RequestInfoVarName}.SetStreamContent({requestParams.requestBody.Name});"); - else if (currentClass.GetPropertyOfKind(CodePropertyKind.RequestAdapter) is CodeProperty requestAdapterProperty) - if (requestParams.requestBody.Type is CodeType bodyType && (bodyType.TypeDefinition is CodeClass || bodyType.Name.Equals("MultipartBody", StringComparison.OrdinalIgnoreCase))) - writer.WriteLine($"{RequestInfoVarName}.SetContentFromParsable({requestAdapterProperty.Name.ToFirstCharacterUpperCase()}, \"{codeElement.RequestBodyContentType}\", {requestParams.requestBody.Name});"); - else - writer.WriteLine($"{RequestInfoVarName}.SetContentFromScalar{suffix}({requestAdapterProperty.Name.ToFirstCharacterUpperCase()}, \"{codeElement.RequestBodyContentType}\", {requestParams.requestBody.Name});"); - } if (requestParams.requestConfiguration != null) { @@ -445,6 +432,21 @@ private void WriteRequestGeneratorBody(CodeMethod codeElement, RequestParams req $"{RequestInfoVarName}.AddHeaders({RequestConfigVarName}.Headers);"); writer.CloseBlock(); } + + if (codeElement.AcceptedResponseTypes.Any()) + writer.WriteLine($"{RequestInfoVarName}.Headers.TryAdd(\"Accept\", \"{string.Join(", ", codeElement.AcceptedResponseTypes)}\");"); + if (requestParams.requestBody != null) + { + var suffix = requestParams.requestBody.Type.IsCollection ? "Collection" : string.Empty; + if (requestParams.requestBody.Type.Name.Equals(conventions.StreamTypeName, StringComparison.OrdinalIgnoreCase)) + writer.WriteLine($"{RequestInfoVarName}.SetStreamContent({requestParams.requestBody.Name});"); + else if (currentClass.GetPropertyOfKind(CodePropertyKind.RequestAdapter) is CodeProperty requestAdapterProperty) + if (requestParams.requestBody.Type is CodeType bodyType && (bodyType.TypeDefinition is CodeClass || bodyType.Name.Equals("MultipartBody", StringComparison.OrdinalIgnoreCase))) + writer.WriteLine($"{RequestInfoVarName}.SetContentFromParsable({requestAdapterProperty.Name.ToFirstCharacterUpperCase()}, \"{codeElement.RequestBodyContentType}\", {requestParams.requestBody.Name});"); + else + writer.WriteLine($"{RequestInfoVarName}.SetContentFromScalar{suffix}({requestAdapterProperty.Name.ToFirstCharacterUpperCase()}, \"{codeElement.RequestBodyContentType}\", {requestParams.requestBody.Name});"); + } + writer.WriteLine($"return {RequestInfoVarName};"); } private static string GetPropertyCall(CodeProperty property, string defaultValue) => property == null ? defaultValue : $"{property.Name.ToFirstCharacterUpperCase()}"; diff --git a/src/Kiota.Builder/Writers/Go/CodeMethodWriter.cs b/src/Kiota.Builder/Writers/Go/CodeMethodWriter.cs index 73364bc8fb..7055214838 100644 --- a/src/Kiota.Builder/Writers/Go/CodeMethodWriter.cs +++ b/src/Kiota.Builder/Writers/Go/CodeMethodWriter.cs @@ -819,33 +819,7 @@ private void WriteRequestGeneratorBody(CodeMethod codeElement, RequestParams req var requestAdapterPropertyName = BaseRequestBuilderVarName + "." + parentClass.GetPropertyOfKind(CodePropertyKind.RequestAdapter)?.Name.ToFirstCharacterUpperCase(); var contextParameterName = codeElement.Parameters.OfKind(CodeParameterKind.Cancellation)?.Name.ToFirstCharacterLowerCase(); writer.WriteLine($"{RequestInfoVarName} := {conventions.AbstractionsHash}.NewRequestInformation()"); - if (parentClass.GetPropertyOfKind(CodePropertyKind.UrlTemplate) is CodeProperty urlTemplateProperty && - parentClass.GetPropertyOfKind(CodePropertyKind.PathParameters) is CodeProperty urlTemplateParamsProperty) - writer.WriteLines($"{RequestInfoVarName}.UrlTemplate = {GetPropertyCall(urlTemplateProperty, "\"\"")}", - $"{RequestInfoVarName}.PathParameters = {GetPropertyCall(urlTemplateParamsProperty, "\"\"")}"); - writer.WriteLine($"{RequestInfoVarName}.Method = {conventions.AbstractionsHash}.{codeElement.HttpMethod.Value.ToString().ToUpperInvariant()}"); - if (codeElement.AcceptedResponseTypes.Any()) - writer.WriteLine($"{RequestInfoVarName}.Headers.Add(\"Accept\", \"{string.Join(", ", codeElement.AcceptedResponseTypes)}\")"); - if (requestParams.requestBody != null) - { - var bodyParamReference = $"{requestParams.requestBody.Name.ToFirstCharacterLowerCase()}"; - var collectionSuffix = requestParams.requestBody.Type.IsCollection ? "Collection" : string.Empty; - if (requestParams.requestBody.Type.Name.Equals("binary", StringComparison.OrdinalIgnoreCase)) - writer.WriteLine($"{RequestInfoVarName}.SetStreamContent({bodyParamReference})"); - else if (requestParams.requestBody.Type is CodeType bodyType && (bodyType.TypeDefinition is CodeClass || bodyType.TypeDefinition is CodeInterface || bodyType.Name.Equals("MultipartBody", StringComparison.OrdinalIgnoreCase))) - { - if (bodyType.IsCollection) - { - var parsableSymbol = GetConversionHelperMethodImport(parentClass, "Parsable"); - WriteCollectionCast(parsableSymbol, bodyParamReference, "cast", writer, string.Empty, false); - bodyParamReference = "cast"; - } - writer.WriteLine($"err := {RequestInfoVarName}.SetContentFromParsable{collectionSuffix}({contextParameterName}, m.{requestAdapterPropertyName}, \"{codeElement.RequestBodyContentType}\", {bodyParamReference})"); - writer.WriteBlock("if err != nil {", "}", "return nil, err"); - } - else - writer.WriteLine($"{RequestInfoVarName}.SetContentFromScalar{collectionSuffix}({contextParameterName}, m.{requestAdapterPropertyName}, \"{codeElement.RequestBodyContentType}\", {bodyParamReference})"); - } + if (requestParams.requestConfiguration != null) { var headers = requestParams.Headers; @@ -874,6 +848,35 @@ private void WriteRequestGeneratorBody(CodeMethod codeElement, RequestParams req } writer.CloseBlock(); } + + if (parentClass.GetPropertyOfKind(CodePropertyKind.UrlTemplate) is CodeProperty urlTemplateProperty && + parentClass.GetPropertyOfKind(CodePropertyKind.PathParameters) is CodeProperty urlTemplateParamsProperty) + writer.WriteLines($"{RequestInfoVarName}.UrlTemplate = {GetPropertyCall(urlTemplateProperty, "\"\"")}", + $"{RequestInfoVarName}.PathParameters = {GetPropertyCall(urlTemplateParamsProperty, "\"\"")}"); + writer.WriteLine($"{RequestInfoVarName}.Method = {conventions.AbstractionsHash}.{codeElement.HttpMethod.Value.ToString().ToUpperInvariant()}"); + if (codeElement.AcceptedResponseTypes.Any()) + writer.WriteLine($"{RequestInfoVarName}.Headers.TryAdd(\"Accept\", \"{string.Join(", ", codeElement.AcceptedResponseTypes)}\")"); + if (requestParams.requestBody != null) + { + var bodyParamReference = $"{requestParams.requestBody.Name.ToFirstCharacterLowerCase()}"; + var collectionSuffix = requestParams.requestBody.Type.IsCollection ? "Collection" : string.Empty; + if (requestParams.requestBody.Type.Name.Equals("binary", StringComparison.OrdinalIgnoreCase)) + writer.WriteLine($"{RequestInfoVarName}.SetStreamContent({bodyParamReference})"); + else if (requestParams.requestBody.Type is CodeType bodyType && (bodyType.TypeDefinition is CodeClass || bodyType.TypeDefinition is CodeInterface || bodyType.Name.Equals("MultipartBody", StringComparison.OrdinalIgnoreCase))) + { + if (bodyType.IsCollection) + { + var parsableSymbol = GetConversionHelperMethodImport(parentClass, "Parsable"); + WriteCollectionCast(parsableSymbol, bodyParamReference, "cast", writer, string.Empty, false); + bodyParamReference = "cast"; + } + writer.WriteLine($"err := {RequestInfoVarName}.SetContentFromParsable{collectionSuffix}({contextParameterName}, m.{requestAdapterPropertyName}, \"{codeElement.RequestBodyContentType}\", {bodyParamReference})"); + writer.WriteBlock("if err != nil {", "}", "return nil, err"); + } + else + writer.WriteLine($"{RequestInfoVarName}.SetContentFromScalar{collectionSuffix}({contextParameterName}, m.{requestAdapterPropertyName}, \"{codeElement.RequestBodyContentType}\", {bodyParamReference})"); + } + writer.WriteLine($"return {RequestInfoVarName}, nil"); } private const string BaseRequestBuilderVarName = "BaseRequestBuilder"; diff --git a/src/Kiota.Builder/Writers/Java/CodeMethodWriter.cs b/src/Kiota.Builder/Writers/Java/CodeMethodWriter.cs index b26c9513ff..70f05ece23 100644 --- a/src/Kiota.Builder/Writers/Java/CodeMethodWriter.cs +++ b/src/Kiota.Builder/Writers/Java/CodeMethodWriter.cs @@ -541,26 +541,7 @@ private void WriteRequestGeneratorBody(CodeMethod codeElement, RequestParams req if (codeElement.HttpMethod == null) throw new InvalidOperationException("http method cannot be null"); writer.WriteLine($"final RequestInformation {RequestInfoVarName} = new RequestInformation();"); - writer.WriteLine($"{RequestInfoVarName}.httpMethod = HttpMethod.{codeElement.HttpMethod.ToString()?.ToUpperInvariant()};"); - if (currentClass.GetPropertyOfKind(CodePropertyKind.PathParameters) is CodeProperty urlTemplateParamsProperty && - currentClass.GetPropertyOfKind(CodePropertyKind.UrlTemplate) is CodeProperty urlTemplateProperty) - writer.WriteLines($"{RequestInfoVarName}.urlTemplate = {GetPropertyCall(urlTemplateProperty, "\"\"")};", - $"{RequestInfoVarName}.pathParameters = {GetPropertyCall(urlTemplateParamsProperty, "null")};"); - if (codeElement.AcceptedResponseTypes.Any()) - writer.WriteLine($"{RequestInfoVarName}.headers.add(\"Accept\", \"{string.Join(", ", codeElement.AcceptedResponseTypes)}\");"); - if (requestParams.requestBody != null && - currentClass.GetPropertyOfKind(CodePropertyKind.RequestAdapter) is CodeProperty requestAdapterProperty) - { - var toArrayPostfix = requestParams.requestBody.Type.IsCollection ? $".toArray(new {requestParams.requestBody.Type.Name}[0])" : string.Empty; - var collectionPostfix = requestParams.requestBody.Type.IsCollection ? "Collection" : string.Empty; - if (requestParams.requestBody.Type.Name.Equals(conventions.StreamTypeName, StringComparison.OrdinalIgnoreCase)) - writer.WriteLine($"{RequestInfoVarName}.setStreamContent({requestParams.requestBody.Name});"); - else if (requestParams.requestBody.Type is CodeType bodyType && (bodyType.TypeDefinition is CodeClass || bodyType.Name.Equals("MultipartBody", StringComparison.OrdinalIgnoreCase))) - writer.WriteLine($"{RequestInfoVarName}.setContentFromParsable({requestAdapterProperty.Name}, \"{codeElement.RequestBodyContentType}\", {requestParams.requestBody.Name}{toArrayPostfix});"); - else - writer.WriteLine($"{RequestInfoVarName}.setContentFromScalar{collectionPostfix}({requestAdapterProperty.Name}, \"{codeElement.RequestBodyContentType}\", {requestParams.requestBody.Name}{toArrayPostfix});"); - } if (requestParams.requestConfiguration != null) { writer.WriteLine($"if ({requestParams.requestConfiguration.Name} != null) {{"); @@ -580,6 +561,27 @@ private void WriteRequestGeneratorBody(CodeMethod codeElement, RequestParams req writer.CloseBlock(); } + writer.WriteLine($"{RequestInfoVarName}.httpMethod = HttpMethod.{codeElement.HttpMethod.ToString()?.ToUpperInvariant()};"); + if (currentClass.GetPropertyOfKind(CodePropertyKind.PathParameters) is CodeProperty urlTemplateParamsProperty && + currentClass.GetPropertyOfKind(CodePropertyKind.UrlTemplate) is CodeProperty urlTemplateProperty) + writer.WriteLines($"{RequestInfoVarName}.urlTemplate = {GetPropertyCall(urlTemplateProperty, "\"\"")};", + $"{RequestInfoVarName}.pathParameters = {GetPropertyCall(urlTemplateParamsProperty, "null")};"); + if (codeElement.AcceptedResponseTypes.Any()) + writer.WriteLine($"{RequestInfoVarName}.headers.tryAdd(\"Accept\", \"{string.Join(", ", codeElement.AcceptedResponseTypes)}\");"); + + if (requestParams.requestBody != null && + currentClass.GetPropertyOfKind(CodePropertyKind.RequestAdapter) is CodeProperty requestAdapterProperty) + { + var toArrayPostfix = requestParams.requestBody.Type.IsCollection ? $".toArray(new {requestParams.requestBody.Type.Name}[0])" : string.Empty; + var collectionPostfix = requestParams.requestBody.Type.IsCollection ? "Collection" : string.Empty; + if (requestParams.requestBody.Type.Name.Equals(conventions.StreamTypeName, StringComparison.OrdinalIgnoreCase)) + writer.WriteLine($"{RequestInfoVarName}.setStreamContent({requestParams.requestBody.Name});"); + else if (requestParams.requestBody.Type is CodeType bodyType && (bodyType.TypeDefinition is CodeClass || bodyType.Name.Equals("MultipartBody", StringComparison.OrdinalIgnoreCase))) + writer.WriteLine($"{RequestInfoVarName}.setContentFromParsable({requestAdapterProperty.Name}, \"{codeElement.RequestBodyContentType}\", {requestParams.requestBody.Name}{toArrayPostfix});"); + else + writer.WriteLine($"{RequestInfoVarName}.setContentFromScalar{collectionPostfix}({requestAdapterProperty.Name}, \"{codeElement.RequestBodyContentType}\", {requestParams.requestBody.Name}{toArrayPostfix});"); + } + writer.WriteLine($"return {RequestInfoVarName};"); } private static string GetPropertyCall(CodeProperty property, string defaultValue) => property == null ? defaultValue : $"{property.Name}"; diff --git a/src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs b/src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs index 5fc92e6d0a..d09af82b0a 100644 --- a/src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs +++ b/src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs @@ -555,8 +555,8 @@ private void WriteRequestGeneratorBody(CodeMethod codeElement, RequestParams req writer.WriteLines($"{RequestInfoVarName}->urlTemplate = {GetPropertyCall(urlTemplateProperty, "''")};", $"{RequestInfoVarName}->pathParameters = {GetPropertyCall(pathParametersProperty, "''")};"); writer.WriteLine($"{RequestInfoVarName}->httpMethod = HttpMethod::{codeElement.HttpMethod.Value.ToString().ToUpperInvariant()};"); - WriteAcceptHeaderDef(codeElement, writer); WriteRequestConfiguration(requestParams, writer); + WriteAcceptHeaderDef(codeElement, writer); if (requestParams.requestBody != null) { var suffix = requestParams.requestBody.Type.IsCollection ? "Collection" : string.Empty; @@ -599,7 +599,7 @@ private void WriteRequestConfiguration(RequestParams requestParams, LanguageWrit private void WriteAcceptHeaderDef(CodeMethod codeMethod, LanguageWriter writer) { if (codeMethod.AcceptedResponseTypes.Any()) - writer.WriteLine($"{RequestInfoVarName}->addHeader('Accept', \"{string.Join(", ", codeMethod.AcceptedResponseTypes)}\");"); + writer.WriteLine($"{RequestInfoVarName}->headers->tryAdd('Accept', \"{string.Join(", ", codeMethod.AcceptedResponseTypes)}\");"); } private void WriteDeserializerBody(CodeClass parentClass, LanguageWriter writer, CodeMethod method, bool extendsModelClass = false) { diff --git a/src/Kiota.Builder/Writers/Python/CodeMethodWriter.cs b/src/Kiota.Builder/Writers/Python/CodeMethodWriter.cs index 65b0ec8c4a..9a400cd7df 100644 --- a/src/Kiota.Builder/Writers/Python/CodeMethodWriter.cs +++ b/src/Kiota.Builder/Writers/Python/CodeMethodWriter.cs @@ -610,14 +610,14 @@ private void WriteRequestGeneratorBody(CodeMethod codeElement, RequestParams req if (codeElement.HttpMethod == null) throw new InvalidOperationException("http method cannot be null"); writer.WriteLine($"{RequestInfoVarName} = RequestInformation()"); + UpdateRequestInformationFromRequestConfiguration(requestParams, writer); if (currentClass.GetPropertyOfKind(CodePropertyKind.PathParameters) is CodeProperty urlTemplateParamsProperty && currentClass.GetPropertyOfKind(CodePropertyKind.UrlTemplate) is CodeProperty urlTemplateProperty) writer.WriteLines($"{RequestInfoVarName}.url_template = {GetPropertyCall(urlTemplateProperty, "''")}", $"{RequestInfoVarName}.path_parameters = {GetPropertyCall(urlTemplateParamsProperty, "''")}"); writer.WriteLine($"{RequestInfoVarName}.http_method = Method.{codeElement.HttpMethod.Value.ToString().ToUpperInvariant()}"); if (codeElement.AcceptedResponseTypes.Any()) - writer.WriteLine($"{RequestInfoVarName}.headers[\"Accept\"] = [\"{string.Join(", ", codeElement.AcceptedResponseTypes)}\"]"); - UpdateRequestInformationFromRequestConfiguration(requestParams, writer); + writer.WriteLine($"{RequestInfoVarName}.try_add_request_header(\"Accept\", \"{string.Join(", ", codeElement.AcceptedResponseTypes)}\")"); if (currentClass.GetPropertyOfKind(CodePropertyKind.RequestAdapter) is CodeProperty requestAdapterProperty) UpdateRequestInformationFromRequestBody(codeElement, requestParams, requestAdapterProperty, writer); writer.WriteLine($"return {RequestInfoVarName}"); diff --git a/src/Kiota.Builder/Writers/Ruby/CodeMethodWriter.cs b/src/Kiota.Builder/Writers/Ruby/CodeMethodWriter.cs index a6ee1d88d6..cbccdf170a 100644 --- a/src/Kiota.Builder/Writers/Ruby/CodeMethodWriter.cs +++ b/src/Kiota.Builder/Writers/Ruby/CodeMethodWriter.cs @@ -281,13 +281,6 @@ private void WriteRequestGeneratorBody(CodeMethod codeElement, RequestParams req if (codeElement.HttpMethod == null) throw new InvalidOperationException("http method cannot be null"); writer.WriteLine("request_info = MicrosoftKiotaAbstractions::RequestInformation.new()"); - if (parentClass.GetPropertyOfKind(CodePropertyKind.PathParameters) is CodeProperty urlTemplateParamsProperty && - parentClass.GetPropertyOfKind(CodePropertyKind.UrlTemplate) is CodeProperty urlTemplateProperty) - writer.WriteLines($"request_info.url_template = {GetPropertyCall(urlTemplateProperty, "''")}", - $"request_info.path_parameters = {GetPropertyCall(urlTemplateParamsProperty, "''")}"); - writer.WriteLine($"request_info.http_method = :{codeElement.HttpMethod.Value.ToString().ToUpperInvariant()}"); - if (codeElement.AcceptedResponseTypes.Any()) - writer.WriteLine($"request_info.headers.add('Accept', '{string.Join(", ", codeElement.AcceptedResponseTypes)}')"); if (requestParams.requestConfiguration != null) { var queryString = requestParams.QueryParameters; @@ -313,6 +306,13 @@ private void WriteRequestGeneratorBody(CodeMethod codeElement, RequestParams req writer.WriteLine($"request_info.set_content_from_parsable(@{requestAdapterProperty.Name.ToSnakeCase()}, \"{codeElement.RequestBodyContentType}\", {requestParams.requestBody.Name})"); } } + if (parentClass.GetPropertyOfKind(CodePropertyKind.PathParameters) is CodeProperty urlTemplateParamsProperty && + parentClass.GetPropertyOfKind(CodePropertyKind.UrlTemplate) is CodeProperty urlTemplateProperty) + writer.WriteLines($"request_info.url_template = {GetPropertyCall(urlTemplateProperty, "''")}", + $"request_info.path_parameters = {GetPropertyCall(urlTemplateParamsProperty, "''")}"); + writer.WriteLine($"request_info.http_method = :{codeElement.HttpMethod.Value.ToString().ToUpperInvariant()}"); + if (codeElement.AcceptedResponseTypes.Any()) + writer.WriteLine($"request_info.headers.try_add('Accept', '{string.Join(", ", codeElement.AcceptedResponseTypes)}')"); writer.WriteLine("return request_info"); } private static string GetPropertyCall(CodeProperty property, string defaultValue) => property == null ? defaultValue : $"@{property.NamePrefix}{property.Name.ToSnakeCase()}"; diff --git a/src/Kiota.Builder/Writers/TypeScript/CodeMethodWriter.cs b/src/Kiota.Builder/Writers/TypeScript/CodeMethodWriter.cs index e68845ae38..42f5354569 100644 --- a/src/Kiota.Builder/Writers/TypeScript/CodeMethodWriter.cs +++ b/src/Kiota.Builder/Writers/TypeScript/CodeMethodWriter.cs @@ -345,13 +345,6 @@ private void WriteRequestGeneratorBody(CodeMethod codeElement, RequestParams req if (codeElement.HttpMethod == null) throw new InvalidOperationException("http method cannot be null"); writer.WriteLine($"const {RequestInfoVarName} = new RequestInformation();"); - if (currentClass.GetPropertyOfKind(CodePropertyKind.PathParameters) is CodeProperty urlTemplateParamsProperty && - currentClass.GetPropertyOfKind(CodePropertyKind.UrlTemplate) is CodeProperty urlTemplateProperty) - writer.WriteLines($"{RequestInfoVarName}.urlTemplate = {GetPropertyCall(urlTemplateProperty)};", - $"{RequestInfoVarName}.pathParameters = {GetPropertyCall(urlTemplateParamsProperty)};"); - writer.WriteLine($"{RequestInfoVarName}.httpMethod = HttpMethod.{codeElement.HttpMethod.Value.ToString().ToUpperInvariant()};"); - if (codeElement.AcceptedResponseTypes.Any()) - writer.WriteLine($"{RequestInfoVarName}.headers[\"Accept\"] = [\"{string.Join(", ", codeElement.AcceptedResponseTypes)}\"];"); if (requestParams.requestConfiguration != null) { writer.WriteLine($"if ({requestParams.requestConfiguration.Name}) {{"); @@ -367,6 +360,13 @@ private void WriteRequestGeneratorBody(CodeMethod codeElement, RequestParams req writer.WriteLine($"{RequestInfoVarName}.addRequestOptions({requestParams.requestConfiguration.Name}.{options.Name});"); writer.CloseBlock(); } + if (currentClass.GetPropertyOfKind(CodePropertyKind.PathParameters) is CodeProperty urlTemplateParamsProperty && + currentClass.GetPropertyOfKind(CodePropertyKind.UrlTemplate) is CodeProperty urlTemplateProperty) + writer.WriteLines($"{RequestInfoVarName}.urlTemplate = {GetPropertyCall(urlTemplateProperty)};", + $"{RequestInfoVarName}.pathParameters = {GetPropertyCall(urlTemplateParamsProperty)};"); + writer.WriteLine($"{RequestInfoVarName}.httpMethod = HttpMethod.{codeElement.HttpMethod.Value.ToString().ToUpperInvariant()};"); + if (codeElement.AcceptedResponseTypes.Any()) + writer.WriteLine($"{RequestInfoVarName}.tryAddRequestHeaders(\"Accept\", \"{string.Join(", ", codeElement.AcceptedResponseTypes)}\");"); if (requestParams.requestBody != null) { if (requestParams.requestBody.Type.Name.Equals(conventions.StreamTypeName, StringComparison.OrdinalIgnoreCase)) diff --git a/tests/Kiota.Builder.Tests/Writers/CSharp/CodeMethodWriterTests.cs b/tests/Kiota.Builder.Tests/Writers/CSharp/CodeMethodWriterTests.cs index ec7a15c3bd..d55e5dcfe3 100644 --- a/tests/Kiota.Builder.Tests/Writers/CSharp/CodeMethodWriterTests.cs +++ b/tests/Kiota.Builder.Tests/Writers/CSharp/CodeMethodWriterTests.cs @@ -936,7 +936,7 @@ public void WritesRequestGeneratorBodyForNullableScalar() Assert.Contains("if (config != null)", result); Assert.Contains("var requestConfig = new RequestConfig()", result); Assert.Contains("config.Invoke(requestConfig)", result); - Assert.Contains("requestInfo.Headers.Add(\"Accept\", \"application/json\")", result); + Assert.Contains("requestInfo.Headers.TryAdd(\"Accept\", \"application/json\")", result); Assert.Contains("requestInfo.AddHeaders(requestConfig.Headers)", result); Assert.Contains("requestInfo.AddQueryParameters(requestConfig.QueryParameters)", result); Assert.Contains("requestInfo.AddRequestOptions(requestConfig.Options)", result); @@ -963,7 +963,7 @@ public void WritesRequestGeneratorBodyForScalar() Assert.Contains("if (config != null)", result); Assert.Contains("var requestConfig = new RequestConfig()", result); Assert.Contains("config.Invoke(requestConfig)", result); - Assert.Contains("requestInfo.Headers.Add(\"Accept\", \"application/json\")", result); + Assert.Contains("requestInfo.Headers.TryAdd(\"Accept\", \"application/json\")", result); Assert.Contains("requestInfo.AddHeaders(requestConfig.Headers)", result); Assert.Contains("requestInfo.AddQueryParameters(requestConfig.QueryParameters)", result); Assert.Contains("requestInfo.AddRequestOptions(requestConfig.Options)", result); @@ -991,7 +991,7 @@ public void WritesRequestGeneratorBodyForParsable() Assert.Contains("if (config != null)", result); Assert.Contains("var requestConfig = new RequestConfig()", result); Assert.Contains("config.Invoke(requestConfig)", result); - Assert.Contains("requestInfo.Headers.Add(\"Accept\", \"application/json\")", result); + Assert.Contains("requestInfo.Headers.TryAdd(\"Accept\", \"application/json\")", result); Assert.Contains("requestInfo.AddHeaders(requestConfig.Headers)", result); Assert.Contains("requestInfo.AddQueryParameters(requestConfig.QueryParameters)", result); Assert.Contains("requestInfo.AddRequestOptions(requestConfig.Options)", result); diff --git a/tests/Kiota.Builder.Tests/Writers/Go/CodeMethodWriterTests.cs b/tests/Kiota.Builder.Tests/Writers/Go/CodeMethodWriterTests.cs index 2e31b9fdc6..117d50adf9 100644 --- a/tests/Kiota.Builder.Tests/Writers/Go/CodeMethodWriterTests.cs +++ b/tests/Kiota.Builder.Tests/Writers/Go/CodeMethodWriterTests.cs @@ -1163,7 +1163,7 @@ public async Task WritesRequestGeneratorBodyForScalar() Assert.Contains($"requestInfo := {AbstractionsPackageHash}.NewRequestInformation()", result); Assert.Contains("requestInfo.UrlTemplate = ", result); Assert.Contains("requestInfo.PathParameters", result); - Assert.Contains("requestInfo.Headers.Add(\"Accept\", \"application/json\")", result); + Assert.Contains("requestInfo.Headers.TryAdd(\"Accept\", \"application/json\")", result); Assert.Contains($"Method = {AbstractionsPackageHash}.GET", result); Assert.Contains("if c != nil", result); Assert.Contains("requestInfo.Headers.AddAll(", result); @@ -1203,7 +1203,7 @@ public async Task WritesRequestGeneratorBodyForScalarCollection() Assert.Contains($"requestInfo := {AbstractionsPackageHash}.NewRequestInformation()", result); Assert.Contains("requestInfo.UrlTemplate = ", result); Assert.Contains("requestInfo.PathParameters", result); - Assert.Contains("requestInfo.Headers.Add(\"Accept\", \"application/json\")", result); + Assert.Contains("requestInfo.Headers.TryAdd(\"Accept\", \"application/json\")", result); Assert.Contains($"Method = {AbstractionsPackageHash}.GET", result); Assert.Contains("if c != nil", result); Assert.Contains("requestInfo.Headers.AddAll(", result); @@ -1241,7 +1241,7 @@ public async Task WritesRequestGeneratorBodyForParsable() Assert.Contains($"requestInfo := {AbstractionsPackageHash}.NewRequestInformation()", result); Assert.Contains("requestInfo.UrlTemplate = ", result); Assert.Contains("requestInfo.PathParameters", result); - Assert.Contains("requestInfo.Headers.Add(\"Accept\", \"application/json\")", result); + Assert.Contains("requestInfo.Headers.TryAdd(\"Accept\", \"application/json\")", result); Assert.Contains($"Method = {AbstractionsPackageHash}.GET", result); Assert.Contains("if c != nil", result); Assert.Contains("requestInfo.Headers.AddAll(", result); @@ -1281,7 +1281,7 @@ public async Task WritesRequestGeneratorBodyForParsableCollection() Assert.Contains($"requestInfo := {AbstractionsPackageHash}.NewRequestInformation()", result); Assert.Contains("requestInfo.UrlTemplate = ", result); Assert.Contains("requestInfo.PathParameters", result); - Assert.Contains("requestInfo.Headers.Add(\"Accept\", \"application/json\")", result); + Assert.Contains("requestInfo.Headers.TryAdd(\"Accept\", \"application/json\")", result); Assert.Contains($"Method = {AbstractionsPackageHash}.GET", result); Assert.Contains("if c != nil", result); Assert.Contains("requestInfo.Headers.AddAll(", result); diff --git a/tests/Kiota.Builder.Tests/Writers/Java/CodeMethodWriterTests.cs b/tests/Kiota.Builder.Tests/Writers/Java/CodeMethodWriterTests.cs index 01078f7390..b50fdc0d87 100644 --- a/tests/Kiota.Builder.Tests/Writers/Java/CodeMethodWriterTests.cs +++ b/tests/Kiota.Builder.Tests/Writers/Java/CodeMethodWriterTests.cs @@ -1192,7 +1192,7 @@ public void WritesRequestGeneratorBodyForScalar() Assert.Contains("urlTemplate =", result); Assert.Contains("pathParameters =", result); Assert.Contains("httpMethod = HttpMethod.GET", result); - Assert.Contains("requestInfo.headers.add(\"Accept\", \"application/json\")", result); + Assert.Contains("requestInfo.headers.tryAdd(\"Accept\", \"application/json\")", result); Assert.Contains("if (c != null)", result); Assert.Contains("final RequestConfig requestConfig = new RequestConfig()", result); Assert.Contains("c.accept(requestConfig)", result); @@ -1220,7 +1220,7 @@ public void WritesRequestGeneratorBodyForScalarCollection() Assert.Contains("urlTemplate =", result); Assert.Contains("pathParameters =", result); Assert.Contains("httpMethod = HttpMethod.GET", result); - Assert.Contains("requestInfo.headers.add(\"Accept\", \"application/json\")", result); + Assert.Contains("requestInfo.headers.tryAdd(\"Accept\", \"application/json\")", result); Assert.Contains("if (c != null)", result); Assert.Contains("final RequestConfig requestConfig = new RequestConfig()", result); Assert.Contains("c.accept(requestConfig)", result); @@ -1247,7 +1247,7 @@ public void WritesRequestGeneratorBodyForParsable() Assert.Contains("urlTemplate =", result); Assert.Contains("pathParameters =", result); Assert.Contains("httpMethod = HttpMethod.GET", result); - Assert.Contains("requestInfo.headers.add(\"Accept\", \"application/json\")", result); + Assert.Contains("requestInfo.headers.tryAdd(\"Accept\", \"application/json\")", result); Assert.Contains("if (c != null)", result); Assert.Contains("final RequestConfig requestConfig = new RequestConfig()", result); Assert.Contains("c.accept(requestConfig)", result); diff --git a/tests/Kiota.Builder.Tests/Writers/Python/CodeMethodWriterTests.cs b/tests/Kiota.Builder.Tests/Writers/Python/CodeMethodWriterTests.cs index a885bd4525..f1259f0cf5 100644 --- a/tests/Kiota.Builder.Tests/Writers/Python/CodeMethodWriterTests.cs +++ b/tests/Kiota.Builder.Tests/Writers/Python/CodeMethodWriterTests.cs @@ -673,7 +673,7 @@ public void WritesRequestGeneratorBodyForScalar() Assert.Contains("request_info.http_method = Method", result); Assert.Contains("request_info.url_template = ", result); Assert.Contains("request_info.path_parameters = ", result); - Assert.Contains("request_info.headers[\"Accept\"] = [\"application/json, text/plain\"]", result); + Assert.Contains("request_info.try_add_request_header(\"Accept\", \"application/json, text/plain\")", result); Assert.Contains("if c:", result); Assert.Contains("request_info.add_request_headers", result); Assert.Contains("request_info.add_request_options", result); @@ -698,7 +698,7 @@ public void WritesRequestGeneratorBodyForParsable() Assert.Contains("request_info.http_method = Method", result); Assert.Contains("request_info.url_template = ", result); Assert.Contains("request_info.path_parameters = ", result); - Assert.Contains("request_info.headers[\"Accept\"] = [\"application/json, text/plain\"]", result); + Assert.Contains("request_info.try_add_request_headers(\"Accept\", \"application/json, text/plain\")", result); Assert.Contains("if c:", result); Assert.Contains("request_info.add_request_headers", result); Assert.Contains("request_info.add_request_options", result); diff --git a/tests/Kiota.Builder.Tests/Writers/Ruby/CodeMethodWriterTests.cs b/tests/Kiota.Builder.Tests/Writers/Ruby/CodeMethodWriterTests.cs index ccfdeb7b0e..f08ac02348 100644 --- a/tests/Kiota.Builder.Tests/Writers/Ruby/CodeMethodWriterTests.cs +++ b/tests/Kiota.Builder.Tests/Writers/Ruby/CodeMethodWriterTests.cs @@ -517,7 +517,7 @@ public void WritesRequestGeneratorBody() Assert.Contains("request_info.path_parameters", result); Assert.Contains("request_info.url_template", result); Assert.Contains("http_method = :GET", result); - Assert.Contains("request_info.headers.add('Accept', 'application/json')", result); + Assert.Contains("request_info.headers.try_add('Accept', 'application/json')", result); Assert.Contains("set_query_string_parameters_from_raw_object", result); Assert.Contains("add_headers_from_raw_object", result); Assert.Contains("add_request_options", result); diff --git a/tests/Kiota.Builder.Tests/Writers/TypeScript/CodeMethodWriterTests.cs b/tests/Kiota.Builder.Tests/Writers/TypeScript/CodeMethodWriterTests.cs index eb5b715349..47babf4fca 100644 --- a/tests/Kiota.Builder.Tests/Writers/TypeScript/CodeMethodWriterTests.cs +++ b/tests/Kiota.Builder.Tests/Writers/TypeScript/CodeMethodWriterTests.cs @@ -275,7 +275,7 @@ public void WritesRequestGeneratorBodyForScalar() Assert.Contains("requestInfo.httpMethod = HttpMethod", result); Assert.Contains("requestInfo.urlTemplate = ", result); Assert.Contains("requestInfo.pathParameters = ", result); - Assert.Contains("requestInfo.headers[\"Accept\"] = [\"application/json\"]", result); + Assert.Contains("requestInfo.tryAddRequestHeaders(\"Accept\", \"application/json\")", result); Assert.Contains("if (c)", result); Assert.Contains("requestInfo.addRequestHeaders", result); Assert.Contains("requestInfo.addRequestOptions", result); @@ -299,7 +299,7 @@ public async Task WritesRequestGeneratorBodyForParsable() Assert.Contains("requestInfo.httpMethod = HttpMethod", result); Assert.Contains("requestInfo.urlTemplate = ", result); Assert.Contains("requestInfo.pathParameters = ", result); - Assert.Contains("requestInfo.headers[\"Accept\"] = [\"application/json\"]", result); + Assert.Contains("requestInfo.tryAddRequestHeaders(\"Accept\", \"application/json\")", result); Assert.Contains("if (c)", result); Assert.Contains("requestInfo.addRequestHeaders", result); Assert.Contains("requestInfo.addRequestOptions", result); From a9d8bbec65631cbd2f8ad386b8cfc6b21fe38ea2 Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Wed, 11 Oct 2023 17:47:41 +0100 Subject: [PATCH 02/13] revert me: test in ci --- .github/workflows/dotnet.yml | 46 ++++++++++++------------- .github/workflows/integration-tests.yml | 46 ++++++++++++------------- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 716f769c29..cba1332fb3 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -1,30 +1,30 @@ name: .NET on: - workflow_dispatch: + # workflow_dispatch: push: - branches: [main] - paths-ignore: - [ - "abstractions/**", - "authentication/**", - "serialization/**", - "http/**", - "**.md", - ".vscode/**", - "**.svg", - ] - pull_request: - paths-ignore: - [ - "abstractions/**", - "authentication/**", - "serialization/**", - "http/**", - "**.md", - ".vscode/**", - "**.svg", - ] + # branches: [main] + # paths-ignore: + # [ + # "abstractions/**", + # "authentication/**", + # "serialization/**", + # "http/**", + # "**.md", + # ".vscode/**", + # "**.svg", + # ] + # pull_request: + # paths-ignore: + # [ + # "abstractions/**", + # "authentication/**", + # "serialization/**", + # "http/**", + # "**.md", + # ".vscode/**", + # "**.svg", + # ] jobs: build: diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index c53e44ff15..81629d418d 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,30 +1,30 @@ name: integration-tests on: - workflow_dispatch: + # workflow_dispatch: push: - branches: [main] - paths-ignore: - [ - "abstractions/**", - "authentication/**", - "serialization/**", - "http/**", - "**.md", - ".vscode/**", - "**.svg", - ] - pull_request: - paths-ignore: - [ - "abstractions/**", - "authentication/**", - "serialization/**", - "http/**", - "**.md", - ".vscode/**", - "**.svg", - ] + # branches: [main] + # paths-ignore: + # [ + # "abstractions/**", + # "authentication/**", + # "serialization/**", + # "http/**", + # "**.md", + # ".vscode/**", + # "**.svg", + # ] + # pull_request: + # paths-ignore: + # [ + # "abstractions/**", + # "authentication/**", + # "serialization/**", + # "http/**", + # "**.md", + # ".vscode/**", + # "**.svg", + # ] concurrency: # Only run once for latest commit per ref and cancel other (previous) runs. From 479e1cf49907a991bedacfdce6b8fb5b771e885e Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Wed, 11 Oct 2023 18:13:30 +0100 Subject: [PATCH 03/13] fix the last python test --- .../Kiota.Builder.Tests/Writers/Python/CodeMethodWriterTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Kiota.Builder.Tests/Writers/Python/CodeMethodWriterTests.cs b/tests/Kiota.Builder.Tests/Writers/Python/CodeMethodWriterTests.cs index f1259f0cf5..a17efa9aab 100644 --- a/tests/Kiota.Builder.Tests/Writers/Python/CodeMethodWriterTests.cs +++ b/tests/Kiota.Builder.Tests/Writers/Python/CodeMethodWriterTests.cs @@ -698,7 +698,7 @@ public void WritesRequestGeneratorBodyForParsable() Assert.Contains("request_info.http_method = Method", result); Assert.Contains("request_info.url_template = ", result); Assert.Contains("request_info.path_parameters = ", result); - Assert.Contains("request_info.try_add_request_headers(\"Accept\", \"application/json, text/plain\")", result); + Assert.Contains("request_info.try_add_request_header(\"Accept\", \"application/json, text/plain\")", result); Assert.Contains("if c:", result); Assert.Contains("request_info.add_request_headers", result); Assert.Contains("request_info.add_request_options", result); From f012729f5189caf8c8b4e35193740e9d96d0cd80 Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Thu, 12 Oct 2023 09:37:25 +0100 Subject: [PATCH 04/13] update it tests libs --- it/go/go.mod | 10 +--------- it/go/go.sum | 17 ----------------- it/java/pom.xml | 2 +- 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/it/go/go.mod b/it/go/go.mod index cce5813307..aa7d369d7c 100644 --- a/it/go/go.mod +++ b/it/go/go.mod @@ -4,13 +4,8 @@ go 1.20 require ( github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 - github.com/microsoft/kiota-abstractions-go v1.2.0 github.com/microsoft/kiota-authentication-azure-go v1.0.0 github.com/microsoft/kiota-http-go v1.0.0 - github.com/microsoft/kiota-serialization-form-go v1.0.0 - github.com/microsoft/kiota-serialization-json-go v1.0.4 - github.com/microsoft/kiota-serialization-multipart-go v1.0.0 - github.com/microsoft/kiota-serialization-text-go v1.0.0 ) require ( @@ -18,15 +13,13 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect github.com/cjlapao/common-go v0.0.39 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect + github.com/microsoft/kiota-abstractions-go v1.2.0 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/testify v1.8.4 // indirect github.com/yosida95/uritemplate/v3 v3.0.2 // indirect go.opentelemetry.io/otel v1.16.0 // indirect go.opentelemetry.io/otel/metric v1.16.0 // indirect @@ -35,5 +28,4 @@ require ( golang.org/x/net v0.11.0 // indirect golang.org/x/sys v0.9.0 // indirect golang.org/x/text v0.10.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/it/go/go.sum b/it/go/go.sum index 2ae860c463..1573ba9ce2 100644 --- a/it/go/go.sum +++ b/it/go/go.sum @@ -9,7 +9,6 @@ github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0/go.mod h1:kgDm github.com/cjlapao/common-go v0.0.39 h1:bAAUrj2B9v0kMzbAOhzjSmiyDy+rd56r2sy7oEiQLlA= github.com/cjlapao/common-go v0.0.39/go.mod h1:M3dzazLjTjEtZJbbxoA5ZDiGCiHmpwqW9l4UWaddwOA= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -21,8 +20,6 @@ github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/microsoft/kiota-abstractions-go v1.2.0 h1:lUriJgqdCY/QajwWQOgTCQE9Atywfe2NHhgoTCSXTRE= @@ -31,21 +28,10 @@ github.com/microsoft/kiota-authentication-azure-go v1.0.0 h1:29FNZZ/4nnCOwFcGWlB github.com/microsoft/kiota-authentication-azure-go v1.0.0/go.mod h1:rnx3PRlkGdXDcA/0lZQTbBwyYGmc+3POt7HpE/e4jGw= github.com/microsoft/kiota-http-go v1.0.0 h1:F1hd6gMlLeEgH2CkRB7z13ow7LxMKMWEmms/t0VfS+k= github.com/microsoft/kiota-http-go v1.0.0/go.mod h1:eujxJliqodotsYepIc6ihhK+vXMMt5Q8YiSNL7+7M7U= -github.com/microsoft/kiota-serialization-form-go v1.0.0 h1:UNdrkMnLFqUCccQZerKjblsyVgifS11b3WCx+eFEsAI= -github.com/microsoft/kiota-serialization-form-go v1.0.0/go.mod h1:h4mQOO6KVTNciMF6azi1J9QB19ujSw3ULKcSNyXXOMA= -github.com/microsoft/kiota-serialization-json-go v1.0.4 h1:5TaISWwd2Me8clrK7SqNATo0tv9seOq59y4I5953egQ= -github.com/microsoft/kiota-serialization-json-go v1.0.4/go.mod h1:rM4+FsAY+9AEpBsBzkFFis+b/LZLlNKKewuLwK9Q6Mg= -github.com/microsoft/kiota-serialization-multipart-go v1.0.0 h1:3O5sb5Zj+moLBiJympbXNaeV07K0d46IfuEd5v9+pBs= -github.com/microsoft/kiota-serialization-multipart-go v1.0.0/go.mod h1:yauLeBTpANk4L03XD985akNysG24SnRJGaveZf+p4so= -github.com/microsoft/kiota-serialization-text-go v1.0.0 h1:XOaRhAXy+g8ZVpcq7x7a0jlETWnWrEum0RhmbYrTFnA= -github.com/microsoft/kiota-serialization-text-go v1.0.0/go.mod h1:sM1/C6ecnQ7IquQOGUrUldaO5wj+9+v7G2W3sQ3fy6M= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4= go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= @@ -63,8 +49,5 @@ golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/it/java/pom.xml b/it/java/pom.xml index ffd3420d01..cef42ed424 100644 --- a/it/java/pom.xml +++ b/it/java/pom.xml @@ -15,7 +15,7 @@ UTF-8 UTF-8 - 0.6.0 + 0.7.7 From eeff181e6dd3c82c75c7a75310a14dcf34e59ca3 Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Thu, 12 Oct 2023 09:45:30 +0100 Subject: [PATCH 05/13] 0.7.6 --- it/java/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/it/java/pom.xml b/it/java/pom.xml index cef42ed424..2c5ee8d700 100644 --- a/it/java/pom.xml +++ b/it/java/pom.xml @@ -15,7 +15,7 @@ UTF-8 UTF-8 - 0.7.7 + 0.7.6 From 922bc6dc5a9461ec4a3e5efa120ddaafff4b274c Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Thu, 12 Oct 2023 09:49:59 +0100 Subject: [PATCH 06/13] more checks --- it/go/go.mod | 12 ++++++------ it/go/go.sum | 24 ++++++++++++------------ it/java/basic/pom.xml | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/it/go/go.mod b/it/go/go.mod index aa7d369d7c..90b030f95e 100644 --- a/it/go/go.mod +++ b/it/go/go.mod @@ -16,14 +16,14 @@ require ( github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.3.1 // indirect github.com/kylelemons/godebug v1.1.0 // indirect - github.com/microsoft/kiota-abstractions-go v1.2.0 // indirect + github.com/microsoft/kiota-abstractions-go v1.3.0 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - github.com/yosida95/uritemplate/v3 v3.0.2 // indirect - go.opentelemetry.io/otel v1.16.0 // indirect - go.opentelemetry.io/otel/metric v1.16.0 // indirect - go.opentelemetry.io/otel/trace v1.16.0 // indirect + github.com/std-uritemplate/std-uritemplate/go v0.0.42 // indirect + go.opentelemetry.io/otel v1.19.0 // indirect + go.opentelemetry.io/otel/metric v1.19.0 // indirect + go.opentelemetry.io/otel/trace v1.19.0 // indirect golang.org/x/crypto v0.10.0 // indirect golang.org/x/net v0.11.0 // indirect golang.org/x/sys v0.9.0 // indirect diff --git a/it/go/go.sum b/it/go/go.sum index 1573ba9ce2..587a4a78f5 100644 --- a/it/go/go.sum +++ b/it/go/go.sum @@ -18,12 +18,12 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/microsoft/kiota-abstractions-go v1.2.0 h1:lUriJgqdCY/QajwWQOgTCQE9Atywfe2NHhgoTCSXTRE= -github.com/microsoft/kiota-abstractions-go v1.2.0/go.mod h1:RkxyZ5x87Njik7iVeQY9M2wtrrL1MJZcXiI/BxD/82g= +github.com/microsoft/kiota-abstractions-go v1.3.0 h1:mZTAg+Lf43+hoqTYWT53F/Dg+f0bqtHULnTI/GyiXn8= +github.com/microsoft/kiota-abstractions-go v1.3.0/go.mod h1:yPSuzNSOIVQSFFe1iT+3Lu5zmis22E8Wg+bkyjhd+pY= github.com/microsoft/kiota-authentication-azure-go v1.0.0 h1:29FNZZ/4nnCOwFcGWlB/sxPvWz487HA2bXH8jR5k2Rk= github.com/microsoft/kiota-authentication-azure-go v1.0.0/go.mod h1:rnx3PRlkGdXDcA/0lZQTbBwyYGmc+3POt7HpE/e4jGw= github.com/microsoft/kiota-http-go v1.0.0 h1:F1hd6gMlLeEgH2CkRB7z13ow7LxMKMWEmms/t0VfS+k= @@ -31,15 +31,15 @@ github.com/microsoft/kiota-http-go v1.0.0/go.mod h1:eujxJliqodotsYepIc6ihhK+vXMM github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/std-uritemplate/std-uritemplate/go v0.0.42 h1:rG+XlE4drkVWs2NLfGS15N+vg+CUcjXElQKvJ0fctlI= +github.com/std-uritemplate/std-uritemplate/go v0.0.42/go.mod h1:Qov4Ay4U83j37XjgxMYevGJFLbnZ2o9cEOhGufBKgKY= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= -github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4= -go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= -go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= -go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= -go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= -go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= -go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= +go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= +go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= +go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= +go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= diff --git a/it/java/basic/pom.xml b/it/java/basic/pom.xml index b065cd20b8..8d5d5ad3b9 100644 --- a/it/java/basic/pom.xml +++ b/it/java/basic/pom.xml @@ -15,7 +15,7 @@ UTF-8 UTF-8 - 0.6.0 + 0.7.6 From 278c2384d309717dde6ef937b1a5b99fede0c706 Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Thu, 12 Oct 2023 15:59:16 +0100 Subject: [PATCH 07/13] more --- it/go/go.mod | 20 ++++++++++++++------ it/go/go.sum | 41 +++++++++++++++++++++++++++++------------ it/java/basic/pom.xml | 2 +- it/java/pom.xml | 2 +- 4 files changed, 45 insertions(+), 20 deletions(-) diff --git a/it/go/go.mod b/it/go/go.mod index 90b030f95e..cce5813307 100644 --- a/it/go/go.mod +++ b/it/go/go.mod @@ -4,8 +4,13 @@ go 1.20 require ( github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 + github.com/microsoft/kiota-abstractions-go v1.2.0 github.com/microsoft/kiota-authentication-azure-go v1.0.0 github.com/microsoft/kiota-http-go v1.0.0 + github.com/microsoft/kiota-serialization-form-go v1.0.0 + github.com/microsoft/kiota-serialization-json-go v1.0.4 + github.com/microsoft/kiota-serialization-multipart-go v1.0.0 + github.com/microsoft/kiota-serialization-text-go v1.0.0 ) require ( @@ -13,19 +18,22 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect github.com/cjlapao/common-go v0.0.39 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect - github.com/google/uuid v1.3.1 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect - github.com/microsoft/kiota-abstractions-go v1.3.0 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - github.com/std-uritemplate/std-uritemplate/go v0.0.42 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/stretchr/testify v1.8.4 // indirect + github.com/yosida95/uritemplate/v3 v3.0.2 // indirect + go.opentelemetry.io/otel v1.16.0 // indirect + go.opentelemetry.io/otel/metric v1.16.0 // indirect + go.opentelemetry.io/otel/trace v1.16.0 // indirect golang.org/x/crypto v0.10.0 // indirect golang.org/x/net v0.11.0 // indirect golang.org/x/sys v0.9.0 // indirect golang.org/x/text v0.10.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/it/go/go.sum b/it/go/go.sum index 587a4a78f5..2ae860c463 100644 --- a/it/go/go.sum +++ b/it/go/go.sum @@ -9,6 +9,7 @@ github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0/go.mod h1:kgDm github.com/cjlapao/common-go v0.0.39 h1:bAAUrj2B9v0kMzbAOhzjSmiyDy+rd56r2sy7oEiQLlA= github.com/cjlapao/common-go v0.0.39/go.mod h1:M3dzazLjTjEtZJbbxoA5ZDiGCiHmpwqW9l4UWaddwOA= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -18,28 +19,41 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/microsoft/kiota-abstractions-go v1.3.0 h1:mZTAg+Lf43+hoqTYWT53F/Dg+f0bqtHULnTI/GyiXn8= -github.com/microsoft/kiota-abstractions-go v1.3.0/go.mod h1:yPSuzNSOIVQSFFe1iT+3Lu5zmis22E8Wg+bkyjhd+pY= +github.com/microsoft/kiota-abstractions-go v1.2.0 h1:lUriJgqdCY/QajwWQOgTCQE9Atywfe2NHhgoTCSXTRE= +github.com/microsoft/kiota-abstractions-go v1.2.0/go.mod h1:RkxyZ5x87Njik7iVeQY9M2wtrrL1MJZcXiI/BxD/82g= github.com/microsoft/kiota-authentication-azure-go v1.0.0 h1:29FNZZ/4nnCOwFcGWlB/sxPvWz487HA2bXH8jR5k2Rk= github.com/microsoft/kiota-authentication-azure-go v1.0.0/go.mod h1:rnx3PRlkGdXDcA/0lZQTbBwyYGmc+3POt7HpE/e4jGw= github.com/microsoft/kiota-http-go v1.0.0 h1:F1hd6gMlLeEgH2CkRB7z13ow7LxMKMWEmms/t0VfS+k= github.com/microsoft/kiota-http-go v1.0.0/go.mod h1:eujxJliqodotsYepIc6ihhK+vXMMt5Q8YiSNL7+7M7U= +github.com/microsoft/kiota-serialization-form-go v1.0.0 h1:UNdrkMnLFqUCccQZerKjblsyVgifS11b3WCx+eFEsAI= +github.com/microsoft/kiota-serialization-form-go v1.0.0/go.mod h1:h4mQOO6KVTNciMF6azi1J9QB19ujSw3ULKcSNyXXOMA= +github.com/microsoft/kiota-serialization-json-go v1.0.4 h1:5TaISWwd2Me8clrK7SqNATo0tv9seOq59y4I5953egQ= +github.com/microsoft/kiota-serialization-json-go v1.0.4/go.mod h1:rM4+FsAY+9AEpBsBzkFFis+b/LZLlNKKewuLwK9Q6Mg= +github.com/microsoft/kiota-serialization-multipart-go v1.0.0 h1:3O5sb5Zj+moLBiJympbXNaeV07K0d46IfuEd5v9+pBs= +github.com/microsoft/kiota-serialization-multipart-go v1.0.0/go.mod h1:yauLeBTpANk4L03XD985akNysG24SnRJGaveZf+p4so= +github.com/microsoft/kiota-serialization-text-go v1.0.0 h1:XOaRhAXy+g8ZVpcq7x7a0jlETWnWrEum0RhmbYrTFnA= +github.com/microsoft/kiota-serialization-text-go v1.0.0/go.mod h1:sM1/C6ecnQ7IquQOGUrUldaO5wj+9+v7G2W3sQ3fy6M= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/std-uritemplate/std-uritemplate/go v0.0.42 h1:rG+XlE4drkVWs2NLfGS15N+vg+CUcjXElQKvJ0fctlI= -github.com/std-uritemplate/std-uritemplate/go v0.0.42/go.mod h1:Qov4Ay4U83j37XjgxMYevGJFLbnZ2o9cEOhGufBKgKY= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= +github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4= +go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= +go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= +go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= +go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= +go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= +go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= @@ -49,5 +63,8 @@ golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/it/java/basic/pom.xml b/it/java/basic/pom.xml index 8d5d5ad3b9..6dc4589741 100644 --- a/it/java/basic/pom.xml +++ b/it/java/basic/pom.xml @@ -15,7 +15,7 @@ UTF-8 UTF-8 - 0.7.6 + 0.7.7 diff --git a/it/java/pom.xml b/it/java/pom.xml index 2c5ee8d700..cef42ed424 100644 --- a/it/java/pom.xml +++ b/it/java/pom.xml @@ -15,7 +15,7 @@ UTF-8 UTF-8 - 0.7.6 + 0.7.7 From 835537caeb1dbf69601663f8f5eb553d92d5b1f3 Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Thu, 12 Oct 2023 16:05:58 +0100 Subject: [PATCH 08/13] final fix for php --- src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs b/src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs index d09af82b0a..01fa5de23b 100644 --- a/src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs +++ b/src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs @@ -599,7 +599,7 @@ private void WriteRequestConfiguration(RequestParams requestParams, LanguageWrit private void WriteAcceptHeaderDef(CodeMethod codeMethod, LanguageWriter writer) { if (codeMethod.AcceptedResponseTypes.Any()) - writer.WriteLine($"{RequestInfoVarName}->headers->tryAdd('Accept', \"{string.Join(", ", codeMethod.AcceptedResponseTypes)}\");"); + writer.WriteLine($"{RequestInfoVarName}->tryAddHeader('Accept', \"{string.Join(", ", codeMethod.AcceptedResponseTypes)}\");"); } private void WriteDeserializerBody(CodeClass parentClass, LanguageWriter writer, CodeMethod method, bool extendsModelClass = false) { From 47d5d84f7dbee34e6c2cb8cd5b6f86afdc10570c Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Thu, 12 Oct 2023 16:08:28 +0100 Subject: [PATCH 09/13] update go --- it/go/go.mod | 30 ++++++++++++------------- it/go/go.sum | 63 ++++++++++++++++++++++++++-------------------------- 2 files changed, 46 insertions(+), 47 deletions(-) diff --git a/it/go/go.mod b/it/go/go.mod index cce5813307..2b64da67d0 100644 --- a/it/go/go.mod +++ b/it/go/go.mod @@ -3,10 +3,10 @@ module integrationtest go 1.20 require ( - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 - github.com/microsoft/kiota-abstractions-go v1.2.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 + github.com/microsoft/kiota-abstractions-go v1.3.0 github.com/microsoft/kiota-authentication-azure-go v1.0.0 - github.com/microsoft/kiota-http-go v1.0.0 + github.com/microsoft/kiota-http-go v1.1.0 github.com/microsoft/kiota-serialization-form-go v1.0.0 github.com/microsoft/kiota-serialization-json-go v1.0.4 github.com/microsoft/kiota-serialization-multipart-go v1.0.0 @@ -14,26 +14,26 @@ require ( ) require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.2.0 // indirect github.com/cjlapao/common-go v0.0.39 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/golang-jwt/jwt/v4 v4.5.0 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/golang-jwt/jwt/v5 v5.0.0 // indirect + github.com/google/uuid v1.3.1 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/std-uritemplate/std-uritemplate/go v0.0.43 // indirect github.com/stretchr/testify v1.8.4 // indirect - github.com/yosida95/uritemplate/v3 v3.0.2 // indirect - go.opentelemetry.io/otel v1.16.0 // indirect - go.opentelemetry.io/otel/metric v1.16.0 // indirect - go.opentelemetry.io/otel/trace v1.16.0 // indirect - golang.org/x/crypto v0.10.0 // indirect - golang.org/x/net v0.11.0 // indirect - golang.org/x/sys v0.9.0 // indirect - golang.org/x/text v0.10.0 // indirect + go.opentelemetry.io/otel v1.19.0 // indirect + go.opentelemetry.io/otel/metric v1.19.0 // indirect + go.opentelemetry.io/otel/trace v1.19.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/it/go/go.sum b/it/go/go.sum index 2ae860c463..72d599f858 100644 --- a/it/go/go.sum +++ b/it/go/go.sum @@ -1,36 +1,36 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 h1:SEy2xmstIphdPwNBUi7uhvjyjhVKISfwjfOJmuy7kg4= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 h1:9kDVnTz3vbfweTqAUmk/a/pH5pWFCHtvRpHYC0G/dcA= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0/go.mod h1:3Ug6Qzto9anB6mGlEdgYMDF5zHQ+wwhEaYR4s17PHMw= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0/go.mod h1:1fXstnBMas5kzG+S3q8UoJcmyU6nUeunJcMDHcRYHhs= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 h1:UE9n9rkJF62ArLb1F3DEjRt8O3jLwMWdSoypKV4f3MU= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.0 h1:hVeq+yCyUi+MsoO/CU95yqCIcdzra5ovzk8Q2BBpV2M= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.0/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/cjlapao/common-go v0.0.39 h1:bAAUrj2B9v0kMzbAOhzjSmiyDy+rd56r2sy7oEiQLlA= github.com/cjlapao/common-go v0.0.39/go.mod h1:M3dzazLjTjEtZJbbxoA5ZDiGCiHmpwqW9l4UWaddwOA= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= +github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= +github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/microsoft/kiota-abstractions-go v1.2.0 h1:lUriJgqdCY/QajwWQOgTCQE9Atywfe2NHhgoTCSXTRE= -github.com/microsoft/kiota-abstractions-go v1.2.0/go.mod h1:RkxyZ5x87Njik7iVeQY9M2wtrrL1MJZcXiI/BxD/82g= +github.com/microsoft/kiota-abstractions-go v1.3.0 h1:mZTAg+Lf43+hoqTYWT53F/Dg+f0bqtHULnTI/GyiXn8= +github.com/microsoft/kiota-abstractions-go v1.3.0/go.mod h1:yPSuzNSOIVQSFFe1iT+3Lu5zmis22E8Wg+bkyjhd+pY= github.com/microsoft/kiota-authentication-azure-go v1.0.0 h1:29FNZZ/4nnCOwFcGWlB/sxPvWz487HA2bXH8jR5k2Rk= github.com/microsoft/kiota-authentication-azure-go v1.0.0/go.mod h1:rnx3PRlkGdXDcA/0lZQTbBwyYGmc+3POt7HpE/e4jGw= -github.com/microsoft/kiota-http-go v1.0.0 h1:F1hd6gMlLeEgH2CkRB7z13ow7LxMKMWEmms/t0VfS+k= -github.com/microsoft/kiota-http-go v1.0.0/go.mod h1:eujxJliqodotsYepIc6ihhK+vXMMt5Q8YiSNL7+7M7U= +github.com/microsoft/kiota-http-go v1.1.0 h1:L5I93EiNtlP/X6YzeTlhjWt7Q1DxzC9CmWSVtX3b0tE= +github.com/microsoft/kiota-http-go v1.1.0/go.mod h1:zESUM6ovki9LEupqziCbxJ+FAYoF0dFDYZVpOkAfSLc= github.com/microsoft/kiota-serialization-form-go v1.0.0 h1:UNdrkMnLFqUCccQZerKjblsyVgifS11b3WCx+eFEsAI= github.com/microsoft/kiota-serialization-form-go v1.0.0/go.mod h1:h4mQOO6KVTNciMF6azi1J9QB19ujSw3ULKcSNyXXOMA= github.com/microsoft/kiota-serialization-json-go v1.0.4 h1:5TaISWwd2Me8clrK7SqNATo0tv9seOq59y4I5953egQ= @@ -43,26 +43,25 @@ github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9 github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/std-uritemplate/std-uritemplate/go v0.0.43 h1:uCK+SVkfF0ij1HbOViU6m5xDKuQvrq381MvsMQVOsPw= +github.com/std-uritemplate/std-uritemplate/go v0.0.43/go.mod h1:Qov4Ay4U83j37XjgxMYevGJFLbnZ2o9cEOhGufBKgKY= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= -github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4= -go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= -go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= -go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= -go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= -go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= -go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= -golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= -golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= -golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= +go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= +go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= +go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= +go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= From 687a36cd1e41eaf47f0fb914f7825697ac1ccf1b Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Thu, 12 Oct 2023 16:20:53 +0100 Subject: [PATCH 10/13] workaround a regression --- it/java/basic/src/test/java/BasicAPITest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/it/java/basic/src/test/java/BasicAPITest.java b/it/java/basic/src/test/java/BasicAPITest.java index 803443e16e..2e6ca85791 100644 --- a/it/java/basic/src/test/java/BasicAPITest.java +++ b/it/java/basic/src/test/java/BasicAPITest.java @@ -22,11 +22,10 @@ void basicTest() throws Exception { ); Assertions.assertNotNull(exception.getCause()); - Assertions.assertTrue(exception.getCause() instanceof apisdk.models.Error); - var error = (apisdk.models.Error) exception.getCause(); + Assertions.assertTrue(exception.getCause() instanceof com.microsoft.kiota.ApiException); + var error = (com.microsoft.kiota.ApiException) exception.getCause(); - Assertions.assertEquals("my-sample-id", error.getId()); - Assertions.assertEquals(123, error.getCode()); + Assertions.assertEquals(423, error.getResponseStatusCode()); } } From ff00f5a69fdb5ecace30daeefcd6342e472c90fb Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Thu, 12 Oct 2023 16:29:52 +0100 Subject: [PATCH 11/13] cleanup --- .github/workflows/dotnet.yml | 46 ++++++++++++------------- .github/workflows/integration-tests.yml | 46 ++++++++++++------------- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index cba1332fb3..716f769c29 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -1,30 +1,30 @@ name: .NET on: - # workflow_dispatch: + workflow_dispatch: push: - # branches: [main] - # paths-ignore: - # [ - # "abstractions/**", - # "authentication/**", - # "serialization/**", - # "http/**", - # "**.md", - # ".vscode/**", - # "**.svg", - # ] - # pull_request: - # paths-ignore: - # [ - # "abstractions/**", - # "authentication/**", - # "serialization/**", - # "http/**", - # "**.md", - # ".vscode/**", - # "**.svg", - # ] + branches: [main] + paths-ignore: + [ + "abstractions/**", + "authentication/**", + "serialization/**", + "http/**", + "**.md", + ".vscode/**", + "**.svg", + ] + pull_request: + paths-ignore: + [ + "abstractions/**", + "authentication/**", + "serialization/**", + "http/**", + "**.md", + ".vscode/**", + "**.svg", + ] jobs: build: diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 81629d418d..c53e44ff15 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,30 +1,30 @@ name: integration-tests on: - # workflow_dispatch: + workflow_dispatch: push: - # branches: [main] - # paths-ignore: - # [ - # "abstractions/**", - # "authentication/**", - # "serialization/**", - # "http/**", - # "**.md", - # ".vscode/**", - # "**.svg", - # ] - # pull_request: - # paths-ignore: - # [ - # "abstractions/**", - # "authentication/**", - # "serialization/**", - # "http/**", - # "**.md", - # ".vscode/**", - # "**.svg", - # ] + branches: [main] + paths-ignore: + [ + "abstractions/**", + "authentication/**", + "serialization/**", + "http/**", + "**.md", + ".vscode/**", + "**.svg", + ] + pull_request: + paths-ignore: + [ + "abstractions/**", + "authentication/**", + "serialization/**", + "http/**", + "**.md", + ".vscode/**", + "**.svg", + ] concurrency: # Only run once for latest commit per ref and cancel other (previous) runs. From ff32969a7cf16c99ba0f8da4cb567948a9b601c7 Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Fri, 13 Oct 2023 14:53:46 +0100 Subject: [PATCH 12/13] prepare for the fix to be released --- it/java/basic/pom.xml | 2 +- it/java/basic/src/test/java/BasicAPITest.java | 7 ++++--- it/java/pom.xml | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/it/java/basic/pom.xml b/it/java/basic/pom.xml index 6dc4589741..ada2ca43c7 100644 --- a/it/java/basic/pom.xml +++ b/it/java/basic/pom.xml @@ -15,7 +15,7 @@ UTF-8 UTF-8 - 0.7.7 + 0.7.8 diff --git a/it/java/basic/src/test/java/BasicAPITest.java b/it/java/basic/src/test/java/BasicAPITest.java index 2e6ca85791..803443e16e 100644 --- a/it/java/basic/src/test/java/BasicAPITest.java +++ b/it/java/basic/src/test/java/BasicAPITest.java @@ -22,10 +22,11 @@ void basicTest() throws Exception { ); Assertions.assertNotNull(exception.getCause()); - Assertions.assertTrue(exception.getCause() instanceof com.microsoft.kiota.ApiException); - var error = (com.microsoft.kiota.ApiException) exception.getCause(); + Assertions.assertTrue(exception.getCause() instanceof apisdk.models.Error); + var error = (apisdk.models.Error) exception.getCause(); - Assertions.assertEquals(423, error.getResponseStatusCode()); + Assertions.assertEquals("my-sample-id", error.getId()); + Assertions.assertEquals(123, error.getCode()); } } diff --git a/it/java/pom.xml b/it/java/pom.xml index cef42ed424..642498c25e 100644 --- a/it/java/pom.xml +++ b/it/java/pom.xml @@ -15,7 +15,7 @@ UTF-8 UTF-8 - 0.7.7 + 0.7.8 From b3d484b695d8dc244e52d83d449ca4ab4bdc3d8c Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Mon, 16 Oct 2023 14:11:58 +0100 Subject: [PATCH 13/13] CHANGELOG.md --- CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5ed678ef7..70c86bc602 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed bug where base64url types would not be generated properly in Java. - Fixed bug where symbol name cleanup would not work on forward single quotes characters [#3426](https://github.com/microsoft/kiota/issues/3426). - Fixed a bug where a "models" API path segment in the description would derail generation. [#3400](https://github.com/microsoft/kiota/issues/3400) +- Changes to the configuration of RequestInformation are preserved instead of being overwritten. [#3401](https://github.com/microsoft/kiota/pull/3401). ## [1.7.0] - 2023-10-05 @@ -74,7 +75,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Flattens the models namespaces in Ruby to avoid circular dependencies. - Adds ObjectId as a reserved keyword in Ruby to have memory management issues. - Replace Javax annotations in favor of Jakarta annotations for Java code generation. [#2810](https://github.com/microsoft/kiota/issues/2810) -- RequestExecuters call overload methods reducing code generation size for Java. [#3150](https://github.com/microsoft/kiota/issues/3150) +- RequestExecuters call overload methods reducing code generation size for Java. [#3150](https://github.com/microsoft/kiota/issues/3150) - Remove URISyntaxException from Java generated RequestExecutors and RequestGenerators. [#3149](https://github.com/microsoft/kiota/issues/3149) - Adds 'Generated' annotation to generated Enums and Classes for Java. [#3106](https://github.com/microsoft/kiota/issues/3106) - Fixes uuid conversion to string value in PathParameters in Go. [#3106](https://github.com/microsoft/kiota/issues/3176) @@ -234,15 +235,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [1.1.0] - 2023-04-05 ### Added - + - Added Visual Studio Code preview extension. [#2333](https://github.com/microsoft/kiota/issues/2333) - Added support for searching in forks for API descriptions in GitHub. [#2429](https://github.com/microsoft/kiota/issues/2429) - Added the ability to filter on operations. [#2431](https://github.com/microsoft/kiota/issues/2431) ### Changed -- Fixed a bug where UUID type is not correctly passed to deserialization method due to snake casing of primitive type names. -- Fixed a bug where unescaped query parameters are not correctly matched to the original name due to python convention of snake casing parameter names. +- Fixed a bug where UUID type is not correctly passed to deserialization method due to snake casing of primitive type names. +- Fixed a bug where unescaped query parameters are not correctly matched to the original name due to python convention of snake casing parameter names. - Fixed a bug where date types annotations and guid's were not correctly translated in Python - Fixed the extension of downloaded files when using the default path. [#2316](https://github.com/microsoft/kiota/issues/2316) - Fixed a bug where lookup of reference ids failed for AllOf more than one level up. @@ -1100,4 +1101,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Initial GitHub release -