-
Notifications
You must be signed in to change notification settings - Fork 210
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
Add support for values that are collections/arrays in application/x-www-form-urlencoded #2291
Comments
I believe the implementation should be symmetric and we should do it also in parse node. Recap for implementers:
Added a comment to refer to this issue in Created issues in TypeScript, Java and Go since this is already implemented. |
So, for c#, is this not working currently or it is? Because when I try to generate a client using a schema that has
"produces": [
"application/json"
],
"consumes": [
"application/x-www-form-urlencoded"
],
"parameters": [
{
"in": "formData",
"name": "filters[created_at][]",
"description": "Filter deals by created_at (accepts min/max unix timestamps i.e [1698084670, 1698105600]",
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"required": false
}
], |
This should be working properly. |
Done #3569 |
We can add support by adding a key-value pair for each item in the collection. As per the HTML specification, the data model is a list of name-value tuples https://url.spec.whatwg.org/#urlencoded-serializing
There is no requirement for the name to be unique. This allows us to represent arrays by repeating the key name for each array value.
Support for this in the writer is significantly more important than in the reader as forms are used far more for sending than returning data.
I created an issue for .NET here microsoft/kiota-serialization-form-dotnet#15
The text was updated successfully, but these errors were encountered: