-
Notifications
You must be signed in to change notification settings - Fork 531
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
parsing a 3.1.0 spec schema puts single non-array value type into types array #1801
Comments
Current behavior is by design, it is deterministic and depends on the OAS version of the document, check this comment for details also about discouraged option since latest version to allow having Closing ticket, please reopen if you're still experiencing issues P.S. marking with High priorityand statements in bold might not help accelerating issue processing.. |
Thank you for the fix! Sure thing. In the future I can not use that language and bold. How would you prefer that I and others convey that info? |
Thanks for editing the comment adding an appreciation line! It looks kind of nicer to me.. about the "conveyance" I would have some ideas and can share an example if needed, however the main point to me is that expressing whether the issue is important to yourself is perfectly fine, saying that an issue is a high priority to the maintainers of a repo is disrespectful as it implies that they must focus on and address it with haste. The keyword here is We appreciate that this library is important to you and are happy to look into issues as they arise. But we ask that you consider the tone of the issue both for us core maintainers and other folks who work on these projects. |
High priority
swagger-parser version: 2.1.1
parsing a 3.1.0 spec schema puts single type into types array
When parsing the below spec, the first allof schema in AllofWithTheLastEmptySchema is defined as:
But the parser sets schema.type to null and loads that type into an array of length one in the types property.
A lot of existing code assumes that type will have a value for this use case.
This bug stops that code from working.
types going into the type or types property should be deterministic (should always behave the same way)
sometimes a single type is going into type
sometimes a single type is going into types (when not defined as an array of types)
See the schema's value here:
spec:
The text was updated successfully, but these errors were encountered: