OpenAPITools / OpenAPITools/openapi-generator
[BUG][Swift5] support of type Array in oneOf
Open
Nobody has claimed this yet.
Issue: Bug
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Tried on master (currently 5.2.0), confirmed that array in "one of" not supported..
Add code-generation support for array type in OneOf..
e.g.
Expected in generated code:
....
case typeArray([MyArray])`
....
for *.YAML - file:
....
oneOf:
-
type: array
items:
$ref: 'MyArray'
....
Currently code not generated with this spec
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Swift 5 code-generation path and reproduce the issue using the supplied YAML schema with an array-valued oneOf entry. Compare the generated output with the requested typeArray([MyArray]) case; done means this schema generates valid Swift code for the array variant without breaking other oneOf variants.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, swift
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100