You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What are you generating using Kiota, clients or plugins?
API Client/SDK
In what context or format are you using Kiota?
Nuget tool
Client library/SDK language
None
Describe the bug
I'm trying to generate a client project with Kiota version 1.20.0. The client is generated, but I'm having some issues with the generated models for the ProblemDetails and HttpValidationProblemDetails. When using the client ProblemDetails it will contain traceId in the AdditionalData property. HttpValidationProblemDetails has the AdditionalData property, but it's not filled with the traceId
I've generated my openapi.json by using NSwag.MSBuild version 14.1.0.
ProblemDetails are generated with additionalProperties available.
I expect both ProblemDetails and HttpValidationProblemDetails to contain traceId when using the client.
How to reproduce
Start both Kiota.Apiand Kiota.App from the example repository. The console application will run the following two scenarios.
Post WeatherForecast with response status code 500 and type ProblemDetails
Post WeatherForecast with response status code 400 and type HttpValidationProblemDetails
Result of the Console.App should be this output:
ProblemDetails scenario
Response:
{"type":"https://tools.ietf.org/html/rfc9110#section-15.6.1","title":"An error occurred while processing your request.","status":500,"traceId":"00-3317e8563c0d629863406ae8e054f647-c8a5fe0ddabb2513-00"}
TraceId: 00-3317e8563c0d629863406ae8e054f647-c8a5fe0ddabb2513-00
HttpValidationProblemDetails scenario
Response:
{"type":"https://tools.ietf.org/html/rfc9110#section-15.5.1","title":"One or more validation errors occurred.","status":400,"errors":{"Summary":["The Summary field is required."]},"traceId":"00-3c024662c4db06855d607e4e234044c3-4fa6227bfa644646-00"}
TraceId:
What are you generating using Kiota, clients or plugins?
API Client/SDK
In what context or format are you using Kiota?
Nuget tool
Client library/SDK language
None
Describe the bug
I'm trying to generate a client project with Kiota version
1.20.0
. The client is generated, but I'm having some issues with the generated models for theProblemDetails
andHttpValidationProblemDetails
. When using the clientProblemDetails
it will containtraceId
in theAdditionalData
property.HttpValidationProblemDetails
has theAdditionalData
property, but it's not filled with thetraceId
I've generated my openapi.json by using
NSwag.MSBuild
version14.1.0
.ProblemDetails
are generated withadditionalProperties
available.HttpValidationProblemDetails
are generated withallOf
fromProblemDetails
. It's generated withadditionalProperties
as well.I've generated my client using the following
kiota
command with `KIOTA_OFFLINE_ENABLED=true'.Both models have the
AdditionalData
property, butHttpValidationProblemDetails
does not implement theIAdditionalDataHolder
interface.Expected behavior
I expect both
ProblemDetails
andHttpValidationProblemDetails
to containtraceId
when using the client.How to reproduce
Start both
Kiota.Api
andKiota.App
from the example repository. The console application will run the following two scenarios.ProblemDetails
HttpValidationProblemDetails
Result of the Console.App should be this output:
Open API description file
openapi.json
Kiota Version
1.20.0
Latest Kiota version known to work for scenario above?(Not required)
No response
Known Workarounds
No response
Configuration
No response
Debug output
Click to expand log
```The text was updated successfully, but these errors were encountered: