Scalar schema
The variant for a null, boolean, integer, float, string or bytes value, optionally narrowed by value constraints.- name
- Scalar schema
- summary
- The variant for a null, boolean, integer, float, string or bytes value, optionally narrowed by value constraints.
Schema definitionThe schema this document defines, for other documents to use.
Extends
| type The scalar kind the value must be: `null`, `boolean`, `integer`, `float`, `string` or `bytes`. | one of null | boolean | integer | float | string | bytes | |
| minLength Minimum length of a string value, counted in code points. | optional | |
| maxLength Maximum length of a string value, counted in code points. | optional | |
| pattern An unanchored ECMAScript regular expression a string value must match; an uncompilable pattern is ignored. | optional | |
| format A semantic hint for editors/renderers — the value is still a plain string. Known: `hm-url` (a Hypermedia document reference), `hm-profile` (an account reference), `ipfs-url` (an ipfs://<cid> reference to a file or DAG-CBOR object), `url` (a URL of any scheme), `date` (an ISO 8601 `YYYY-MM-DD` calendar date), `date-time` (an RFC 3339 instant). | optional | |
| target For a reference-valued string (`format: hm-url` or `format: ipfs-url`): the schema the referenced document or object is expected to conform to — an `hm://` schema-document URL or `ipfs://<cid>`. Advisory: an editor pre-seeds and validates the target against it; a validator does not dereference the reference. | optional | |
| minimum The smallest number an integer or float value may be (inclusive). | optional | |
| maximum The largest number an integer or float value may be (inclusive). | optional | |
| description What the value is for, when it is written inline; a published schema is described by its page. | optional | |
| params Type parameters that make this schema generic, each with its default schema. | ⟨ * : ⟩ | optional |
| name Legacy: a name some published schemas still carry. New schemas are named by their page. | optional |
Powered by Seed HypermediaOpen App