required
required is a directive executor who tags a field as required.
Definition
Name: "required"
Args: (no args)
required always works as an accompany with some other directives, it checks if the field were set by the former directives. When the field were not set by the former directives, an error ErrMissingField will occur.
Usage
type TokenInput struct {
Token string `in:"query=access_token;required"`
}
Request | Output |
---|---|
|
|
|
|