Manweill / swagger-axios-codegen

swagger client to use axios and typescript
MIT License
306 stars 83 forks source link

Bugfix/required and nullable difference #150

Open domenikjones opened 3 years ago

domenikjones commented 3 years ago

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.

We have implemented some changes:

A field is required when:

A field is nullable when:

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:

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

Manweill commented 3 years ago

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