Open azadebrahimian opened 3 months ago
I'm having similar issues with an anyOf in the National Weather Service's public API.
JsonLdContext:
anyOf:
-
type: array
items: { }
-
type: object
The code generated can't handle when an Array is returned, even though the spec says it should be fine.
please try java (jesery2) client generator with the latest master as we've merged a PR to support array in oneOf
you can find snapshot version in project's readme.
just merged https://github.com/OpenAPITools/openapi-generator/pull/18324 to provide array type support in anyOf, oneOf,
please give it a try with the snapshot version (which will be published soon as part of the CI workflow)
snapshot version can be found in the project's readme.
Bug Report Checklist
Description
I am trying to generate the necessary models for my API spec in springboot, however I am noticing issues with the generated files that utilize the oneOf keyword. I’d be more than happy to give more information on the specifics I am dealing with, but I’d first like to know if this is fully supported yet in my use case (java/springboot).
openapi-generator version
Most recent version
OpenAPI declaration file content or url
This is the generated model, but I need to be able to access all three Objective#JobConfigs from this.
Generation Details
n/a
Steps to reproduce
Use oneOf somewhere in your openAPI spec, and run the generate mvn command.
Related issues/PRs
Suggest a fix