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

Bugfix/required and nullable difference #150

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

domenikjones
Copy link
Contributor

@domenikjones domenikjones commented Sep 13, 2021

Hi there,

We have found a problem concerning nullable fields which lead into more problems, if we are using required, readOnly and nullabel in combination.

To keep the possibility as before, strictRequiredChecks has been added.

  • strictRequiredChecks will allow undefined values
  • strictNullChecks will allow null values

We have implemented some changes:

  • Extend the field props with the values for nullable and readOnly
  • Changed the behavior of a field description based on these values (for undefined and null seperately)

A field is required when:

  • The field property readOnly is false and property is required is true or strictRequiredChecks is false

A field is nullable when:

  • The field property nullable is true or strictNullChecks is false

These changes might break implementations of other developers, since strictNullCheck has been moved to the nullable evaluation instead required aka undefined.

Minor changes and fixes:

  • Removed duplicated service header comments

Please let me know this poses a problem. Happy coding!

@domenikjones domenikjones marked this pull request as ready for review September 14, 2021 11:40

text = disableLint() + text
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you remove disableLint

@Manweill
Copy link
Owner

You should refer to the code itself to coding style, in prettier semi=false

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.

2 participants