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
Hello open api experts, i meet some issue and want some help from you.
It is about polymorphism. i find some example here : #2116. want to reuse the pet scenario as example.
I define Pet, Cat, Dog. 3 yaml files.
Also, I have a entity Person , the yaml file like below.
description: Structure of person.type: objectproperties:
name:
type: stringpet:
$ref: 'pet.yaml'required:
- name
- pet
what i find is, if i use above yaml, Pet.java can be generated, but there is no cat.java and dog.java generated.
Then i update the Person.yaml file like blew :
description: Structure of person.type: objectproperties:
name:
type: stringpet:
oneOf:
- $ref: '#/components/schemas/Dog'
- $ref: '#/components/schemas/Cat'required:
- name
- pet
The generated Person.java file has some error, the filed "pet" 's. type is "OneOfDogCat", and then it complain the "OneOfDogCat" class with complier error.
I think 1st approach seems better, but not sure why client not generate the Dog.java and Cat.java file. Do you have any ideas on this problem, any suggestion is appreciate.
The text was updated successfully, but these errors were encountered:
As to the codegen/compiler errors, please raise tooling-related issues on the relevant repository. This repository is for the OpenAPI specification itself. You may also receive more answers on a general support forum such as StackOverflow. Thanks.
Uh oh!
There was an error while loading. Please reload this page.
Hello open api experts, i meet some issue and want some help from you.
It is about polymorphism. i find some example here : #2116. want to reuse the pet scenario as example.
I define Pet, Cat, Dog. 3 yaml files.
Also, I have a entity
Person
, the yaml file like below.what i find is, if i use above yaml, Pet.java can be generated, but there is no cat.java and dog.java generated.
Then i update the Person.yaml file like blew :
The generated Person.java file has some error, the filed "pet" 's. type is "OneOfDogCat", and then it complain the "OneOfDogCat" class with complier error.
I think 1st approach seems better, but not sure why client not generate the Dog.java and Cat.java file. Do you have any ideas on this problem, any suggestion is appreciate.
The text was updated successfully, but these errors were encountered: