Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explode property for query parameter in C# code generator #5133

Open
marcdebus opened this issue Apr 2, 2025 · 0 comments
Open

Explode property for query parameter in C# code generator #5133

marcdebus opened this issue Apr 2, 2025 · 0 comments

Comments

@marcdebus
Copy link

marcdebus commented Apr 2, 2025

I'm using NSwag version 14.3.

In my OpenAPI 3.0 specification, the following query parameter is defined:

{ "name": "state", "in": "query", "description": "Appointment state", "required": false, "style": "form", "explode": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AppointmentState" } } }

However, the generated code always serializes the array like this:

/appointments/?state=FREE&state=ACCEPTED

But I want it to be serialized like this:

/appointments/?state=FREE,ACCEPTED

I found a ticket (#5016) that was apparently merged in version 14.3, which specifically addresses this serialization issue. What am I doing wrong here, or is this still a bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant