[Java] Codegen Bad object serialization when query parameter is Object
Created by: SebastienRvl
Description
When y try to send an object in a query with method get, the object is not serialized, the api call toString method
openapi-generator version
3.2.1, 3.2.2 ...
OpenAPI declaration file content or url
'/declarations/etablissements':
get:
summary: 'Ce service permet de rechercher les établissements rattachés à une entreprise dans la base stockant les Déclarations Sociales Nominatives à partir d’un Siren et d’une période de déclaration mensuelle.'
description: |
...
tags:
- declarations
- v1.4.0
operationId: rechercherDeclarationsEtablissementsDSN
parameters:
- name: page
in: query
required: false
style: form
schema:
$ref: '#/components/schemas/PageIn'
- name: filtre
in: query
required: false
style: form
schema:
$ref: '#/components/schemas/FiltreRechercherEtablissementDSN'
example:
siret: "94555054900162"
- name: tri
in: query
required: false
style: form
explode: false
schema:
$ref: '#/components/schemas/TriRechercherEtablissementsDSN'
example:
denomination: asc
responses:
'200':
description: "Liste d'établissements"
content:
application/json:
schema:
$ref: '#/components/schemas/ReponseRechercherEtablissement'
500:
$ref: '#/components/responses/Erreur_Response'
Command line used for generation
<execution>
<id>generate-client-1.2.0</id>
<goals>
<goal>generate</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/dsnci_ws_consultation_be_v1.2.0.yaml</inputSpec>
<language>java</language>
<apiPackage>fr.recouv.dsn.ws.rest.api.v1_0</apiPackage>
<modelPackage>fr.recouv.dsn.ws.rest.dto.v1_0</modelPackage>
<output>${generated-swagger-path}</output>
<withXml>true</withXml>
<generateApis>true</generateApis>
<generateApiTests>true</generateApiTests>
</configuration>
</execution>