diff --git a/changes/changelog.d/nodeinfo2-update.doc b/changes/changelog.d/nodeinfo2-update.doc new file mode 100644 index 000000000..78b7de84b --- /dev/null +++ b/changes/changelog.d/nodeinfo2-update.doc @@ -0,0 +1 @@ +Updated the Nodeinfo 2 spec to address feedback from implementation. diff --git a/docs/specs/nodeinfo21/index.md b/docs/specs/nodeinfo21/index.md index 32ed498aa..69797822a 100644 --- a/docs/specs/nodeinfo21/index.md +++ b/docs/specs/nodeinfo21/index.md @@ -55,12 +55,6 @@ The NodeInfo endpoint must contain all mandatory elements listed in the specific `defaultUploadQuota` (Number) : The default upload quota (in megabytes) allowed for new users -`library.federationEnabled` (Boolean) -: Whether federation is enabled - -`library.anonymousCanListen` (Boolean) -: Whether public endpoints require authentication - `supportedUploadExtensions` (Array\) : A list of file extensions enabled for upload @@ -76,28 +70,37 @@ The NodeInfo endpoint must contain all mandatory elements listed in the specific `instanceSupportMessage` (String) : The support message associated with the instance -`content.top_music_categories` (Array\) +`content.local` (Object) +: An object containing a summary of local content + +`content.local.artists` (number) +: The number of artists associated with local uploads on the pod + +`content.local.releases` (number) +: The number of albums or series associated with local uploads on the pod + +`content.local.recordings` (number) +: The number of tracks or episodes associated with local uploads on the pod + +`content.local.hoursOfContent` (number) +: The total number of hours of content associated with local uploads on the pod + +`content.topMusicCategories` (Array\) : The top three music genres and the number of uploads tagged with them -`content.top_podcast_categories` (Array\) +`content.topPodcastCategories` (Array\) : The top three podcast categories and the number of uploads tagged with them -`instance_policy.moderation_policy` (String) -: The moderation policy of the pod - -`instance_policy.terms_of_service` (String) -: The terms of service of the pod - -`instance_policy.languages` (Array\) +`languages` (Array\) : The languages spoken by the pod administrators -`instance_policy.location` (String) +`location` (String) : The country the pod is located in -`federation.follows_instances` (Number) +`federation.followsInstances` (Number) : The number of Funkwhale pods that the target pod follows -`federation.following_instances` (Number) +`federation.followingInstances` (Number) : The number of Funkwhale pods that publicly follow the target pod `features` (Array\) @@ -141,7 +144,7 @@ Example response: }, "metadata": { "actorId": "string", - "private": false, + "private": true, "shortDescription": "string", "longDescription": "string", "rules": "string", @@ -150,10 +153,6 @@ Example response: "nodeName": "string", "banner": "string", "defaultUploadQuota": 0, - "library": { - "federationEnabled": true, - "anonymousCanListen": true - }, "supportedUploadExtensions": ["string"], "allowList": { "enabled": true, @@ -161,14 +160,16 @@ Example response: }, "funkwhaleSupportMessageEnabled": true, "instanceSupportMessage": "string", - "instance_policy": { - "moderation_policy": "string", - "terms_of_service": "string", - "languages": ["string"], - "location": "string" - }, + "languages": ["string"], + "location": "string", "content": { - "top_music_categories": [ + "local": { + "artists": 1000, + "releases": 10000, + "recordings": 150000, + "hoursOfContent": 7500 + }, + "topMusicCategories": [ { "rock": 1256 }, @@ -179,7 +180,7 @@ Example response: "classical": 308 } ], - "top_podcast_categories": [ + "topPodcastCategories": [ { "comedy": 12 }, @@ -191,11 +192,18 @@ Example response: } ], "federation": { - "followed_instances": 0, - "following_instances": 0 + "followedInstances": 0, + "followingInstances": 0 } }, - "features": ["channels", "podcasts", "collections", "audiobooks"] + "features": [ + "channels", + "podcasts", + "collections", + "audiobooks", + "federation", + "anonymousCanListen" + ] } } ``` diff --git a/docs/specs/nodeinfo21/schema.yml b/docs/specs/nodeinfo21/schema.yml index 6f85665c7..f59d1d337 100644 --- a/docs/specs/nodeinfo21/schema.yml +++ b/docs/specs/nodeinfo21/schema.yml @@ -470,13 +470,6 @@ components: format: url defaultUploadQuota: type: integer - library: - type: object - properties: - federationEnabled: - type: boolean - anonymousCanListen: - type: boolean supportedUploadExtensions: type: array items: @@ -494,25 +487,32 @@ components: type: boolean instanceSupportMessage: type: string - instance_policy: - type: object - properties: - moderation_policy: - type: string - format: url - terms_of_service: - type: string - format: url - languages: - type: array - items: - type: string - location: - type: string + languages: + type: array + items: + type: string + location: + type: string content: type: object properties: - top_music_categories: + local: + type: object + properties: + artists: + type: number + releases: + type: number + recordings: + type: number + hoursOfContent: + type: number + example: + artists: 1000 + releases: 10000 + recordings: 150000 + hoursOfContent: 7500 + topMusicCategories: type: array items: type: object @@ -522,7 +522,7 @@ components: - "rock": 1256 - "jazz": 604 - "classical": 308 - top_podcast_categories: + topPodcastCategories: type: array items: type: object @@ -535,9 +535,9 @@ components: federation: type: object properties: - followed_instances: + followedInstances: type: integer - following_instances: + followingInstances: type: integer features: type: array @@ -548,6 +548,8 @@ components: - "podcasts" - "collections" - "audiobooks" + - "federation" + - "anonymousCanListen" Error: type: object properties: