feat: Add optional $schema field to entities

This commit is contained in:
Jesse Wierzbinski 2024-10-18 15:10:23 +02:00
parent a2c66d5b3a
commit 9ad9436845
No known key found for this signature in database
2 changed files with 8 additions and 0 deletions

View file

@ -20,6 +20,7 @@ This page lists changes since Working Draft 3. {{ className: 'lead' }}
- Added [Versia Links](/links). - Added [Versia Links](/links).
- Switched from ISO 8601 to [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) for timestamps. - Switched from ISO 8601 to [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) for timestamps.
- In most cases, the two are interchangeable, but RFC 3339 is more strict. Most implementations should not need to change anything. - In most cases, the two are interchangeable, but RFC 3339 is more strict. Most implementations should not need to change anything.
- Add optional `$schema` field to [Entities](/entities).
## Since WD 3 ## Since WD 3

View file

@ -36,6 +36,13 @@ Any field in an entity not marked as `required` may be omitted or set to `null`.
**Some entity types may not need a URI. This will be specified in the entity's documentation.** **Some entity types may not need a URI. This will be specified in the entity's documentation.**
</Property> </Property>
<Property name="$schema" type="string" required={false}>
URL of any JSON Schema that the entity adheres to.
<Note>
This is for human use only, and not to be used by either clients or servers as a way to validate the entity.
</Note>
</Property>
<Property name="extensions" type="Extensions" required={false} typeLink="/types#extensions"> <Property name="extensions" type="Extensions" required={false} typeLink="/types#extensions">
Extensions to the entity. Use this to add custom properties to the entity. Extensions to the entity. Use this to add custom properties to the entity.