mirror of
https://github.com/versia-pub/docs.git
synced 2026-03-13 02:49:16 +01:00
refactor: ♻️ Remove extension_type in favour of using the type field on entities
This commit is contained in:
parent
228ef3c98d
commit
596b42474f
9 changed files with 20 additions and 25 deletions
|
|
@ -27,7 +27,7 @@ Having the authorization is defined as:
|
|||
URI of the `User` who is deleting the entity. [Can be set to `null` to represent the instance](/entities/instance-metadata#the-null-author).
|
||||
</Property>
|
||||
<Property name="deleted_type" type="string" required={true}>
|
||||
Type of the entity being deleted. In case of extensions, use the entity's `extension_type`.
|
||||
Type of the entity being deleted.
|
||||
</Property>
|
||||
<Property name="target" type="URI" required={true} typeLink="/types#uri">
|
||||
URI of the entity being deleted.
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Any field in an entity not marked as `required` may be omitted or set to `null`.
|
|||
Unique identifier for the entity. Must be unique within the instance. Can be any string. Max of 512 UTF-8 characters.
|
||||
</Property>
|
||||
<Property name="type" type="string" required={true}>
|
||||
Type of the entity. Only types defined in the Versia protocol are allowed. Use an [Extension](/extensions) if you want to define custom types.
|
||||
Type of the entity. Custom types must follow [Extension Naming](/extensions#naming).
|
||||
</Property>
|
||||
<Property name="created_at" type="ISO8601" required={true} typeLink="/types#iso-8601">
|
||||
Date and time when the entity was created. Must be an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) formatted string.
|
||||
|
|
@ -59,8 +59,7 @@ Any field in an entity not marked as `required` may be omitted or set to `null`.
|
|||
```jsonc {{ 'title': 'With Extensions' }}
|
||||
{
|
||||
"id": "f0aacf0b-df7a-4ee5-a2ba-6c4acafd8642",
|
||||
"type": "Extension",
|
||||
"extension_type": "org.space:Zlorbs/Zlorb",
|
||||
"type": "org.space:Zlorbs/Zlorb",
|
||||
"created_at": "2023-04-13T08:00:00Z",
|
||||
"uri": "https://space.org/zlorbs/f0aacf0b-df7a-4ee5-a2ba-6c4acafd8642",
|
||||
"extensions": { // [!code focus:100]
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ Instance **must** be the host of the instance the user is on (hostname with opti
|
|||
followers: URI;
|
||||
following: URI;
|
||||
featured: URI;
|
||||
// Same format as extension_type on Extensions
|
||||
// Same format as type on Extensions
|
||||
[key: ExtensionsKey]: URI;
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue