Open parthibann opened 1 year ago
I assume your endpoint returns oneOf
schema (let's called it OneOfResult
, which can be Dog, Cat, Bird for example).
The result can be Dog, Cat or Bird and to get the result you will need to access it via actual_instance
property/attribute in the oneOf object (OneOfResult in this example).
actual_instance
property/attribute itself is missing in few outputs, we are getting the result directly. we expect all the outputs to either contain actual_instance
property or the result directly
actual_instance property/attribute itself is missing in few outputs
are those "output" defined as oneOf/anyOf in your openapi spec?
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.