annotate¶
- photonforge.typing.annotate(field, **kwargs)[source]¶
Annotate a type with metadata.
- Parameters:
field (object) – Type to be annotated.
kwargs (object) – Type metadata. See below.
- Returns:
Annotated type.
- Return type:
object
Type metadata closely resembles specifications for JSON Schema DRAFT7 with a few additions. A few commonly used keywords are:
label,description,units,maximum,minimum,exclusiveMaximum,exclusiveMinimum,maxItems,minItems,maxLength, andminLength.