In my C# WebAPI I have a key[(key/value)] query param ([FromQuery] IDictionary<string, IDictionary<string, string>> properties) producing the following OpenAPI schema:
{ "name": "properties", "in": "query", "schema": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "string" } } } },
Generator 7.11 recursively added the properties so that e.g. an object {a:{x:1}} was passed as a.x=1 to the query params:
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
httpParams, value[k], key != null ? `${key}.${k}` : k));
The current version doesn't include the key:
if (explode) {
Object.keys(value).forEach(k => {
httpParams = this.addToHttpParams(httpParams, k, value[k], paramStyle, explode);
});
return httpParams;
}
always resulting in x=1. The full path to the property is lost. I guess the old logic needed to be used here, too but this will sure change the current behavior (what just is wrong, isn't it?). I'm going to create a PR immediatelly.
In my C# WebAPI I have a key[(key/value)] query param (
[FromQuery] IDictionary<string, IDictionary<string, string>> properties) producing the following OpenAPI schema:{ "name": "properties", "in": "query", "schema": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "string" } } } },Generator 7.11 recursively added the properties so that e.g. an object
{a:{x:1}}was passed asa.x=1to the query params:The current version doesn't include the key:
always resulting in
x=1. The full path to the property is lost. I guess the old logic needed to be used here, too but this will sure change the current behavior (what just is wrong, isn't it?). I'm going to create a PR immediatelly.