What a validating middleware checks, branded onto the middleware function
so a documentation generator can describe the route without importing the
plugin that produced it.
This is a description, not a mechanism: the middleware still performs
the validation, and removing the metadata changes no runtime behaviour.
The schema is carried verbatim — the same object the caller passed — so a
reader transforms it with whatever schema support it already has. It is
typed unknown rather than a Zod type because @setu-ts/common depends on
nothing and the validation contract accepts any object exposing safeParse.
What a validating middleware checks, branded onto the middleware function so a documentation generator can describe the route without importing the plugin that produced it.
This is a description, not a mechanism: the middleware still performs the validation, and removing the metadata changes no runtime behaviour.
The
schemais carried verbatim — the same object the caller passed — so a reader transforms it with whatever schema support it already has. It is typedunknownrather than a Zod type because@setu-ts/commondepends on nothing and the validation contract accepts any object exposingsafeParse.Since
0.3.0