fix: 📝 Fix some objects with missing properties, reword sentence

This commit is contained in:
Jesse Wierzbinski 2024-07-31 21:05:42 +02:00
parent 902cf8fe92
commit f994340945
No known key found for this signature in database
2 changed files with 8 additions and 5 deletions

View file

@ -50,7 +50,9 @@ Any field in an entity not marked as `required` may be omitted or set to `null`.
"id": "9a8928b6-2526-4979-aab1-ef2f88cd5700", "id": "9a8928b6-2526-4979-aab1-ef2f88cd5700",
"type": "Undo", "type": "Undo",
"created_at": "2022-01-01T12:00:00Z", "created_at": "2022-01-01T12:00:00Z",
"uri": "https://bongo.social/notes/9a8928b6-2526-4979-aab1-ef2f88cd5700", "uri": "https://bongo.social/objects/9a8928b6-2526-4979-aab1-ef2f88cd5700",
"author": "https://bongo.social/users/63a00ab3-39b1-49eb-b88e-ed65d2361f3e",
"object": "https://bongo.social/notes/54059ce2-9332-46fa-bf6a-598b5493b81b",
} }
``` ```
@ -58,7 +60,7 @@ Any field in an entity not marked as `required` may be omitted or set to `null`.
{ {
"id": "f0aacf0b-df7a-4ee5-a2ba-6c4acafd8642", "id": "f0aacf0b-df7a-4ee5-a2ba-6c4acafd8642",
"type": "Extension", "type": "Extension",
"extension_type": "org.space:ZlorbEntity", "extension_type": "org.space:Zlorbs/Zlorb",
"created_at": "2023-04-13T08:00:00Z", "created_at": "2023-04-13T08:00:00Z",
"uri": "https://space.org/zlorbs/f0aacf0b-df7a-4ee5-a2ba-6c4acafd8642", "uri": "https://space.org/zlorbs/f0aacf0b-df7a-4ee5-a2ba-6c4acafd8642",
"extensions": { // [!code focus:100] "extensions": { // [!code focus:100]

View file

@ -26,8 +26,9 @@ Things that should be validated include, but are not limited to:
- The **type**, **precision** and **scale** of all numeric fields. - The **type**, **precision** and **scale** of all numeric fields.
- For example, a `size` field on a `ContentFormat` structure should be a positive integer, not a negative number or a floating-point number. - For example, a `size` field on a `ContentFormat` structure should be a positive integer, not a negative number or a floating-point number.
<Note> <Note>
Best practice is to store a `size` internally as a unsigned int. All numeric fields in these docs have the appropriate precision (`u64`, `i64`, `f32`, etc.) specified. As a rule of thumb, do not use a different type in memory than the one specified in the docs.
All numeric fields in these docs have the appropriate precision (`u64`, `i64`, `f32`, etc.) specified. Thumb rule: Do not use a different type in memory than the one specified in the docs. Exception to that rule: using the same type with a higher bit count, for example using a u128 instead of a u64. Beware of performance impacts this may cause.
Using the same type with a higher bit count, for example using a u128 instead of a u64, is acceptable. Beware of performance impacts this may cause.
</Note> </Note>
- The **validity** of all URLs and URIs (run them through your favorite URL parser, optionally fetch the linked URL). - The **validity** of all URLs and URIs (run them through your favorite URL parser, optionally fetch the linked URL).
- The **time** of all dates and times (people should not be born in the future, or in the year 0). - The **time** of all dates and times (people should not be born in the future, or in the year 0).