cycleplatform / api-spec

OpenAPI spec files for Cycle APIs
Other
3 stars 0 forks source link

Replace type (array | null) with oneOf #471

Closed mattoni closed 2 weeks ago

mattoni commented 2 weeks ago

Unclear if it's "legal" to do multiple types with an array like this. Caused some downstream issues with codegen in new RTK code generator based on oazapfts.

This change allowed it to properly generate null for array types, but the issue persists for objects, which I'm 99% sure is completely valid.

I have an open issue here: https://github.com/oazapfts/oazapfts/issues/612, and once that is resolved, it should be just fine at generating complex types like this and avoiding issues.