fibers
fibers copied to clipboard
Inject custom validator
Would it be possible to inject my own validator ? I have defined a few custom validators but with the current version, I am stuck doing a second validation.
https://github.com/long2ice/fibers/blob/572576f8a06f8d66fae4f8728e47aa25aa13d4af/router/router.go#L34
Thanks !
Just need some enhancement
After exploring a bit more, I see that validate:"oneof=val1 val2" validates enums. Is there a way to display them as enum in the generated api doc ?
the generated json should be something like this:
{
"type": "string",
"enum": ["val1", "val2"]
}