flowup / api-client-generator

Angular REST API client generator from Swagger YAML or JSON file with camel case settigs
MIT License
115 stars 21 forks source link

About 'ngx-model-guards-export.mustache' template #110

Closed sebnic closed 1 year ago

sebnic commented 3 years ago

Hello,

Why the boolean expression of generated type guards is always terminated by true?

see line 32 of 'ngx-model-guards-export.mustache' template.

Thank for your help.

vmasek commented 3 years ago

@sebnic hello, the intended logic here is to combine all checks for the type with and operation (&&) so for the convenience of generated code we end the checks with true. This can be interpreted as, if there are no falsy checks along the way, it is true.