You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Writing a simple REST API can be quite repetitive in Foal because we may have to write the same thing three times: the entity, the validation schema (AJV) and the OpenAPI request body.
The version 1 of Foal (June Release) will include a new feature to directly generate the OpenAPI request body from the validation schema thus reducing the code redundancy. #454
But this requires the developer to still define both the entity and validation schema.
Issue
Writing a simple REST API can be quite repetitive in Foal because we may have to write the same thing three times: the entity, the validation schema (AJV) and the OpenAPI request body.
The version 1 of Foal (June Release) will include a new feature to directly generate the OpenAPI request body from the validation schema thus reducing the code redundancy. #454
But this requires the developer to still define both the entity and validation schema.
Some libraries already exist to take care of this (including the serialization) and we could have an easy way to integrate them with Foal: class-validator, class-transformer, class-validator-jsonschema.
Related issue: #276
Constraints
@ValidateBody
, etc).Possible solution
Add these hooks:
Usage
The text was updated successfully, but these errors were encountered: