minimum

Field-level UDA declaring a numeric lower bound (the JSON Schema minimum keyword) for a struct field. When jsonSchemaOf!T reflects over a struct, a field annotated with @minimum(v) emits "minimum": v on its property schema. Intended for numeric / integer fields (e.g. tool input or elicitation form schemas); applying it to a non-numeric field has no defined meaning but the bound is still emitted verbatim.

@safe
struct minimum {}

Members

Variables

value
double value;

the inclusive lower bound emitted as JSON Schema minimum

Examples

struct Form
{
    @minimum(1) @maximum(100) int count;
}