Skip to content
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

Nullable unions without enum #670

Merged
merged 2 commits into from Apr 23, 2020

Conversation

fantapop
Copy link
Contributor

@fantapop fantapop commented Apr 23, 2020

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you written unit tests?
  • Have you written unit tests that cover the negative cases (i.e.: if bad data is submitted, does the library respond properly)?
  • This PR is associated with an existing issue?

Closing issues

closes #668

Related Issues

relates to #479

If this is a new feature submission:

  • Has the issue had a maintainer respond to the issue and clarify that the feature is something that aligns with the goals and philosophy of the project?

Potential Problems With The Approach

One issue with this approach is that typescript when compiled with strictNullChecks, appears to not allow enums with null value. This feels like a typescript bug to me but I haven't been able to track it down.

Test plan
I updated existing unit tests to cover the new behavior. I additionally experiment with code generated with the new changes when possible. Code generation for oneOfs is not currently working with typescript-fetch generator.

@WoH WoH changed the base branch from 3.x to master April 23, 2020 14:25
@WoH
Copy link
Collaborator

WoH commented Apr 23, 2020

LGTM, thanks for contributing!

@WoH WoH merged commit 6339d10 into lukeautry:master Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nullable enums should contain the value null
2 participants