Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generator not creating classes for OneOf #3

Open
judgej opened this issue May 28, 2019 · 1 comment
Open

Generator not creating classes for OneOf #3

judgej opened this issue May 28, 2019 · 1 comment

Comments

@judgej
Copy link
Member

judgej commented May 28, 2019

Some details logged here, as I suspect it may be related:

OpenAPITools/openapi-generator#2906

The OneOf class is expected by the deserialiser when handling a response. Possibly there should not be a class, and the deserialiser should check the datatype and handle it appropriately. I'm not sure how that would work anyway, as the missing class OneOfSimpleAuthorisationString, which represents either a SimpleAuthorisation or a String, feels more like an interface. But I don't know what the thinking is behind it.

@judgej
Copy link
Member Author

judgej commented May 29, 2019

@bradydan This is the generation issue we just talked about, where the model builder (aka response deserialiser) is either not generating some models it should be generating, or it is attempting to use some models that should not be generated anyway. The problem could be anywhere in the generation process, from the initial parsing, spec normalisation, language abstract, or language override (the output "flavour"). I simply have no idea where it is at the moment.

We may be able to work around it in our API specs, but when pulling in third party specs (e.g. Xero) then we will have no choice but to support it. That is, assuming it is not simply a syntactical error in my OpenAPI spec. I'm new to this ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant