Bug Report Checklist
Description
I'm trying to generate the SDK with this endpoint definition:
'/entities/{id}/secondentities':
get:
operationId: getSecondEntitiesByEntities
tags:
- channels
parameters:
- in: path
name: id
schema:
type: integer
required: true
- $ref: '#/components/parameters/problematicParameter'
responses:
'200':
$ref: '#/components/responses/data200'
'404':
description: Not found
'500':
description: Internal server error
and the parameter is described as a content/application-json complex object that should be serialized in the query string:
problematicParameter:
in: query
required: false
name: filter
content:
application/json:
schema:
$ref: '#/components/schemas/problematicParameterSchema'
The schema is something like this:
problematicParameterSchema:
type: object
properties:
tags:
type: array
items:
type: string
attributes:
type: array
items:
type: string
The generated typescript code has a signature like this:
public getSecondEntitiesByEntities(id: number, filter?: ProblematicParameterSchema, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<Array<PlacemarkData>>;
The model of ProblematicParameter is correctly generated, but when I call this function with a valid object of type ProblematicParameterSchema the URL is not generated correctly.
For example with:
getSecondEntitiesByEntities(1, {attributes: ['c', 'd'], tags: ['a', 'b']})
the generated URL is:
API_BASE/entities/{id}/secondentities?attributes="c"&attributes="d"&tags="a"&tags="b"
completely ignoring the name filter of the parameter.
The expected result should be something like this:
API_BASE/entities/{id}/secondentities?filter='{"attributes": ["c", "d"], "tags": ["a", "b"]}'
openapi-generator version
4.3.0
OpenAPI declaration file content or url
Command line used for generation
openapi-generator generate -i oas3.json -o sdk -g typescript-angular
Steps to reproduce
- Create the schema described above
- Create the parameter described above
- Run
Related issues/PRs
Suggest a fix
Bug Report Checklist
Description
I'm trying to generate the SDK with this endpoint definition:
and the parameter is described as a content/application-json complex object that should be serialized in the query string:
The schema is something like this:
The generated typescript code has a signature like this:
The model of
ProblematicParameteris correctly generated, but when I call this function with a valid object of typeProblematicParameterSchemathe URL is not generated correctly.For example with:
the generated URL is:
completely ignoring the name
filterof the parameter.The expected result should be something like this:
openapi-generator version
4.3.0
OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix