Manweill / swagger-axios-codegen

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

Bugfix/required and nullable difference #149

Closed domenikjones closed 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.

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

domenikjones commented 3 years ago

Will do more changes..

Manweill commented 3 years ago

In current version, more is to compatibility with JS developers, and their backend service provided OpenAPI does not fully describe the input and output parameters of the entire api. they are tightly used to call the request api. Welcome to communicate with me more ideas