Skip to content

Commit e54c48e

Browse files
authored
Merge pull request #33 from zcdunn/add_repo_element
Add element for source code repository
2 parents 51c122e + 5a121c4 commit e54c48e

File tree

2 files changed

+210
-0
lines changed

2 files changed

+210
-0
lines changed

schemas/2.1/example.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"version": "2.1",
3+
"software": {
4+
"name": "diaspora",
5+
"version": "0.5.0",
6+
"repository": "https://github.com/diaspora/diaspora"
7+
},
8+
"protocols": ["diaspora"],
9+
"services": {
10+
"inbound": ["gnusocial"],
11+
"outbound": ["facebook", "twitter"]
12+
},
13+
"openRegistrations": true,
14+
"usage": {
15+
"users": {
16+
"total": 123,
17+
"activeHalfyear": 42,
18+
"activeMonth": 23
19+
},
20+
"localPosts": 500,
21+
"localComments": 1000
22+
},
23+
"metadata": {
24+
"chat_enabled": true
25+
}
26+
}

schemas/2.1/schema.json

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"id": "http://nodeinfo.diaspora.software/ns/schema/2.1#",
4+
"description": "NodeInfo schema version 2.1.",
5+
"type": "object",
6+
"additionalProperties": false,
7+
"required": [
8+
"version",
9+
"software",
10+
"protocols",
11+
"services",
12+
"openRegistrations",
13+
"usage",
14+
"metadata"
15+
],
16+
"properties": {
17+
"version": {
18+
"description": "The schema version, must be 2.1.",
19+
"enum": [
20+
"2.1"
21+
]
22+
},
23+
"software": {
24+
"description": "Metadata about server software in use.",
25+
"type": "object",
26+
"additionalProperties": false,
27+
"required": [
28+
"name",
29+
"version"
30+
],
31+
"properties": {
32+
"name": {
33+
"description": "The canonical name of this server software.",
34+
"type": "string",
35+
"pattern": "^[a-z0-9-]+$"
36+
},
37+
"version": {
38+
"description": "The version of this server software.",
39+
"type": "string"
40+
},
41+
"repository": {
42+
"description": "The url of the source code repository of this server software.",
43+
"type": "string"
44+
}
45+
}
46+
},
47+
"protocols": {
48+
"description": "The protocols supported on this server.",
49+
"type": "array",
50+
"minItems": 1,
51+
"items": {
52+
"enum": [
53+
"activitypub",
54+
"buddycloud",
55+
"dfrn",
56+
"diaspora",
57+
"libertree",
58+
"ostatus",
59+
"pumpio",
60+
"tent",
61+
"xmpp",
62+
"zot"
63+
]
64+
}
65+
},
66+
"services": {
67+
"description": "The third party sites this server can connect to via their application API.",
68+
"type": "object",
69+
"additionalProperties": false,
70+
"required": [
71+
"inbound",
72+
"outbound"
73+
],
74+
"properties": {
75+
"inbound": {
76+
"description": "The third party sites this server can retrieve messages from for combined display with regular traffic.",
77+
"type": "array",
78+
"minItems": 0,
79+
"items": {
80+
"enum": [
81+
"atom1.0",
82+
"gnusocial",
83+
"imap",
84+
"pnut",
85+
"pop3",
86+
"pumpio",
87+
"rss2.0",
88+
"twitter"
89+
]
90+
}
91+
},
92+
"outbound": {
93+
"description": "The third party sites this server can publish messages to on the behalf of a user.",
94+
"type": "array",
95+
"minItems": 0,
96+
"items": {
97+
"enum": [
98+
"atom1.0",
99+
"blogger",
100+
"buddycloud",
101+
"diaspora",
102+
"dreamwidth",
103+
"drupal",
104+
"facebook",
105+
"friendica",
106+
"gnusocial",
107+
"google",
108+
"insanejournal",
109+
"libertree",
110+
"linkedin",
111+
"livejournal",
112+
"mediagoblin",
113+
"myspace",
114+
"pinterest",
115+
"pnut",
116+
"posterous",
117+
"pumpio",
118+
"redmatrix",
119+
"rss2.0",
120+
"smtp",
121+
"tent",
122+
"tumblr",
123+
"twitter",
124+
"wordpress",
125+
"xmpp"
126+
]
127+
}
128+
}
129+
}
130+
},
131+
"openRegistrations": {
132+
"description": "Whether this server allows open self-registration.",
133+
"type": "boolean"
134+
},
135+
"usage": {
136+
"description": "Usage statistics for this server.",
137+
"type": "object",
138+
"additionalProperties": false,
139+
"required": [
140+
"users"
141+
],
142+
"properties": {
143+
"users": {
144+
"description": "statistics about the users of this server.",
145+
"type": "object",
146+
"additionalProperties": false,
147+
"properties": {
148+
"total": {
149+
"description": "The total amount of on this server registered users.",
150+
"type": "integer",
151+
"minimum": 0
152+
},
153+
"activeHalfyear": {
154+
"description": "The amount of users that signed in at least once in the last 180 days.",
155+
"type": "integer",
156+
"minimum": 0
157+
},
158+
"activeMonth": {
159+
"description": "The amount of users that signed in at least once in the last 30 days.",
160+
"type": "integer",
161+
"minimum": 0
162+
}
163+
}
164+
},
165+
"localPosts": {
166+
"description": "The amount of posts that were made by users that are registered on this server.",
167+
"type": "integer",
168+
"minimum": 0
169+
},
170+
"localComments": {
171+
"description": "The amount of comments that were made by users that are registered on this server.",
172+
"type": "integer",
173+
"minimum": 0
174+
}
175+
}
176+
},
177+
"metadata": {
178+
"description": "Free form key value pairs for software specific values. Clients should not rely on any specific key present.",
179+
"type": "object",
180+
"minProperties": 0,
181+
"additionalProperties": true
182+
}
183+
}
184+
}

0 commit comments

Comments
 (0)