-
Notifications
You must be signed in to change notification settings - Fork 286
Open
Labels
WIPhelp wantedIssue caused by core project dependency modules or libraryIssue caused by core project dependency modules or librarytype:bugA broken experienceA broken experience
Description
Hi there
Problem
We're working with an API which endpoints contain trailing slashes, for example {+baseUrl}/api/v1/app/{app_id}/msg/.
During the client generation, the trailing slash is dropped, and the generated client doesn't work as expected as all requests return a 404.
Repro
For reference, here's a link to the OpenAPI document used here: https://github.com/svix/svix-webhooks/blob/8d32e47e0484f5d0839bce364d8700d2c7457937/openapi.json#L7779
- Generate the .NET client
kiota generate ` --openapi https://raw.githubusercontent.com/svix/svix-webhooks/main/openapi.json ` --output .\TrailingSlashDroppedIssue4291 ` --language CSharp ` --class-name SvixClient ` --namespace-name SvixApiClient ` --exclude-backward-compatible true ` --serializer Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory ` --deserializer Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory ` --structured-mime-types application/json ` --include-path '/api/v1/app/{app_id}/msg/#POST' - See the missing trailing slashes in the constructor definitions in the
TrailingSlashDroppedIssue4291\Api\V1\App\Item\Msg\MsgRequestBuilder.csfilepublic class MsgRequestBuilder : BaseRequestBuilder { public MsgRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/v1/app/{app_id}/msg{?with_content*}", pathParameters) { } public MsgRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/v1/app/{app_id}/msg{?with_content*}", rawUrl) { } }
Expected result
Kiota shouldn't manipulate paths defined in the OpenAPI document, or should provide an option to opt out of this behavior.
jlarmstrongiv
Metadata
Metadata
Assignees
Labels
WIPhelp wantedIssue caused by core project dependency modules or libraryIssue caused by core project dependency modules or librarytype:bugA broken experienceA broken experience
Type
Projects
Status
In Progress 🚧