Type Schemas
Type schemas are YAML files in .typemd/types/ that define the structure of your objects.
Basic Format
Section titled “Basic Format”name: bookproperties: - name: title type: string - name: status type: enum values: [to-read, reading, done] default: to-read - name: rating type: numberProperty Types
Section titled “Property Types”| Type | Description | Example |
|---|---|---|
string | Text | "Go in Action" |
number | Integer or float | 42, 3.14 |
enum | Enumerated value, requires values | "reading" |
relation | Link to another object | "person/alan" |
Relation Properties
Section titled “Relation Properties”See the Relations guide for details on defining relation properties with target, bidirectional, inverse, and multiple fields.
Validation
Section titled “Validation”TypeMD uses lenient validation:
- Only validates properties defined in the schema
- Extra properties (not in schema) are allowed
- Missing properties do not cause errors
enumvalues must be in thevalueslistnumbermust be numericrelationtargets are checked for correct type