From f994340945c5f191350e8465610a7afc958a0b72 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Wed, 31 Jul 2024 21:05:42 +0200 Subject: [PATCH] fix: :memo: Fix some objects with missing properties, reword sentence --- app/entities/page.mdx | 8 +++++--- app/federation/validation/page.mdx | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/entities/page.mdx b/app/entities/page.mdx index 239c0fe..57139b8 100644 --- a/app/entities/page.mdx +++ b/app/entities/page.mdx @@ -50,15 +50,17 @@ Any field in an entity not marked as `required` may be omitted or set to `null`. "id": "9a8928b6-2526-4979-aab1-ef2f88cd5700", "type": "Undo", "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", } - ``` + ``` ```jsonc {{ 'title': 'With Extensions' }} { "id": "f0aacf0b-df7a-4ee5-a2ba-6c4acafd8642", "type": "Extension", - "extension_type": "org.space:ZlorbEntity", + "extension_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] diff --git a/app/federation/validation/page.mdx b/app/federation/validation/page.mdx index e9c4ac2..69fb209 100644 --- a/app/federation/validation/page.mdx +++ b/app/federation/validation/page.mdx @@ -26,8 +26,9 @@ Things that should be validated include, but are not limited to: - 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. - 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. 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. + 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. + + 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. - 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).