ecyrbe/zodios

Validation is turned of if the `validate` option is undefined.

atrick-speedline opened this issue · 3 comments

The validate option is supposed to default to true, and if you do Zodios(baseUrl, definitions, {}) then validation will be enabled. However, if you do Zodios(baseUrl, definitions, {validate: undefined}) then the validation is disabled.

The root cause of this is that undefined isn't considered as one of the possible values for undefined in the constructor code and the plugin code; however, there's no way that I know of to get TypeScript to prevent passing undefined to an optional value.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Would you be interested in a pull request?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.