OpenAPITools / OpenAPITools/openapi-generator

[BUG][Python] - Output format is not same for all the endpoints

Open
#16,138 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: Python Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

The output format differs for diffenent endpoints and clients unable to read it. some of the response containing “oneof_schema_1_validator” and “actual_instance" objects and other response do not contain those objects.

openapi-generator version

openapi-generator-cli 7.0.0-SNAPSHOT
commit : e8422b3

OpenAPI declaration file content or url

https://cdn.intersight.com/components/an-apidocs/1.0.11-12738/model/intersight-openapi-v3-1.0.11-12738.json

Configuration file

useOneOfDiscriminatorLookup: true
packageName: intersight
projectName: Intersight-OpenAPI
packageVersion: 1.0.0.0

Generation Details

java -jar openapi-generator-cli.jar generate -i intersight-openapi-v3-1.0.11-12738.json -g python -o python_sdk

Steps to reproduce

Generate SDK using useOneOfDiscriminatorLookup flag and try making request to multiple endpoints (GET, POST, PUT, DELETE) and observe.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by generating the Python SDK from the linked Intersight OpenAPI declaration with openapi-generator-cli 7.0.0-SNAPSHOT and useOneOfDiscriminatorLookup: true. Exercise GET, POST, PUT, and DELETE endpoints, compare responses containing oneof_schema_1_validator or actual_instance with those that do not, and use consistent output across endpoints as the completion criterion.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, python
Domain
api, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.