Skip to content

feat: change the behaviour of the parse hook #36

Closed
@francescovallone

Description

The usage of the parse hook can be improved by simplifying its syntax.

Instead of overriding the method inside the class (forcing the developer to extend the Route class to apply validation rules), adding a ParseSchema to the on method inside the controller should be possible. This will allow the user to define validation rules for the short-end versions of the routes and, to an extent, should also improve performances because we are removing a useless call if no validation rule is applied to the route.

The ParseSchema object can be applied to:

  • Headers
  • Query Parameters
  • Body
  • Path Parameters
  • Cookie/Session

Metadata

Labels

enhancementNew feature or request

Projects

  • Status

    Closed

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions