You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
I want to improve the examples in the documentation of the generated Python client. When I include the example within the schema or not at all, following is generated:
With that, I gained example data, but it is no longer a DataExperiment class.
Am I missing something, or is there something wrong with the generator?
openapi-generator version
7.3.0, 7.5.0, 7.6.0
OpenAPI declaration file content or url
requestBody:
required: truecontent:
application/json:
schema:
title: DataExperimenttype: objectdescription: Data for assetsrequired:
- assetIdproperties:
assetId:
type: integerdescription: ID of the corresponding assetexample: 4711example:
assetId: 4711
Bug Report Checklist
Description
I want to improve the examples in the documentation of the generated Python client. When I include the example within the schema or not at all, following is generated:
While that's alright, I would like to have the instance initialized with example data as well (in reality that class has a lot of properties).
So I moved the example out of the schema a level up (see the openapi.yaml excerpt below), and following was generated:
With that, I gained example data, but it is no longer a DataExperiment class.
Am I missing something, or is there something wrong with the generator?
openapi-generator version
7.3.0, 7.5.0, 7.6.0
OpenAPI declaration file content or url
Generation Details
docker run --rm \ -v "${PWD}:/local" \ openapitools/openapi-generator-cli:v7.6.0 \ generate \ -g python \ -o /local \ ...
Steps to reproduce
Generate the client, see the docs.
Related issues/PRs
None found
Suggest a fix
Don't know.
The text was updated successfully, but these errors were encountered: