Fold the constraint-facet UDAs from a compile-time sequence (e.g.
__traits(getAttributes, someSymbol)) onto an existing schema node:
@minimum, @maximum, @pattern, @minLength, @maxLength, @minItems,
@maxItems, @format, @title, and @schemaDefault map to the matching
keyword; any other UDA is ignored.
jsonSchemaOf uses this for struct fields, but it is public so external
code can apply the same facets to symbols that are not struct fields — e.g.
function parameters — without duplicating the mapping:
Fold the constraint-facet UDAs from a compile-time sequence (e.g. __traits(getAttributes, someSymbol)) onto an existing schema node: @minimum, @maximum, @pattern, @minLength, @maxLength, @minItems, @maxItems, @format, @title, and @schemaDefault map to the matching keyword; any other UDA is ignored.
jsonSchemaOf uses this for struct fields, but it is public so external code can apply the same facets to symbols that are not struct fields — e.g. function parameters — without duplicating the mapping: