-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
fix(typed-enum): respect nullable in case of OAS3 document #1376
Conversation
I'm not sure I understand this implementation. It seems like OAS2 says no this is not ok (because it doesnt support nullable) and OAS3 says "yeah this is fine" because it does support nullable, and that enum is accepting null as a deviation to "type: string" because nullable is there... I dont think this is the right solution. I think the enum should not have |
This is what we do in case of
Why so? AFAIK I'm not sure how |
I've read a whole lot of back and forth on this issue but it seems like what you've done is correct, but keep in mind this isn't anything to do with type arrays. From here: https://github.com/OAI/OpenAPI-Specification/blob/master/proposals/003_Clarify-Nullable.md It seems like If that is what this code is doing, please carry on, but the OAS2 example should maybe use x-nullable as thats a very common vendor extension in OAS2. OAS2 is barely usable without it. |
We can go ahead with this. OAS2 users with |
Ah yeah, I think we actually even have a bug report for it. |
Fixes #1353.
Checklist
Does this PR introduce a breaking change?