Problem/Motivation
It would be nice to also support an endpoint for 2.1. The only changes from 2.0 to 2.1 seem to be the addition of a software.repository
and software.homepage
properties.
diff between 2.0 and 2.1 schema
--- 2.0.json 2024-11-09 16:25:10.250036391 -0500
+++ 2.1.json 2024-11-09 16:24:24.852036823 -0500
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
- "id": "http://nodeinfo.diaspora.software/ns/schema/2.0#",
- "description": "NodeInfo schema version 2.0.",
+ "id": "http://nodeinfo.diaspora.software/ns/schema/2.1#",
+ "description": "NodeInfo schema version 2.1.",
"type": "object",
"additionalProperties": false,
"required": [
@@ -15,9 +15,9 @@
],
"properties": {
"version": {
- "description": "The schema version, must be 2.0.",
+ "description": "The schema version, must be 2.1.",
"enum": [
- "2.0"
+ "2.1"
]
},
"software": {
@@ -37,6 +37,14 @@
"version": {
"description": "The version of this server software.",
"type": "string"
+ },
+ "repository": {
+ "description": "The url of the source code repository of this server software.",
+ "type": "string"
+ },
+ "homepage": {
+ "description": "The url of the homepage of this server software.",
+ "type": "string"
}
}
},
Proposed resolution
- Refactor nodeinfo.content
route to use a version string parameter.
- Only apply the additional properties when version string is 2.1.
- Add both 2.0 and 2.1 in the nodeinfo.nodeinfo
route response.
Remaining tasks
User interface changes
Route URL has version, but this is seamless.
API changes
NodeInfoController::content(?string $version = 2.0)
should be backwards compatible, if necessary.
Data model changes
Addition of software.repository
and software.homepage
properties when version is 2.1.