aboutsummaryrefslogtreecommitdiff
path: root/templates/swagger/v1_json.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/swagger/v1_json.tmpl')
-rw-r--r--templates/swagger/v1_json.tmpl122
1 files changed, 74 insertions, 48 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 23d700ded..6ad45012e 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -23,7 +23,7 @@
},
"basePath": "{{AppSubUrl | JSEscape | Safe}}/api/v1",
"paths": {
- "/activitypub/user/{username}": {
+ "/activitypub/repo/{username}/outbox": {
"get": {
"produces": [
"application/activity+json"
@@ -31,8 +31,8 @@
"tags": [
"activitypub"
],
- "summary": "Returns the Person actor for a user",
- "operationId": "activitypubPerson",
+ "summary": "Returns the outbox",
+ "operationId": "activitypubPersonOutbox",
"parameters": [
{
"type": "string",
@@ -40,6 +40,13 @@
"name": "username",
"in": "path",
"required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "reponame",
+ "in": "path",
+ "required": true
}
],
"responses": {
@@ -49,7 +56,7 @@
}
}
},
- "/activitypub/user/{username}/followers": {
+ "/activitypub/repo/{username}/{reponame}": {
"get": {
"produces": [
"application/activity+json"
@@ -57,8 +64,8 @@
"tags": [
"activitypub"
],
- "summary": "Returns the Liked Collection",
- "operationId": "activitypubPersonLiked",
+ "summary": "Returns the repository",
+ "operationId": "activitypubRepo",
"parameters": [
{
"type": "string",
@@ -66,6 +73,13 @@
"name": "username",
"in": "path",
"required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "reponame",
+ "in": "path",
+ "required": true
}
],
"responses": {
@@ -75,7 +89,7 @@
}
}
},
- "/activitypub/user/{username}/following": {
+ "/activitypub/repo/{username}/{reponame}/followers": {
"get": {
"produces": [
"application/activity+json"
@@ -83,8 +97,8 @@
"tags": [
"activitypub"
],
- "summary": "Returns the Following Collection",
- "operationId": "activitypubPersonFollowing",
+ "summary": "Returns the followers collection",
+ "operationId": "activitypubRepoFollowers",
"parameters": [
{
"type": "string",
@@ -92,6 +106,13 @@
"name": "username",
"in": "path",
"required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "reponame",
+ "in": "path",
+ "required": true
}
],
"responses": {
@@ -101,7 +122,7 @@
}
}
},
- "/activitypub/user/{username}/inbox": {
+ "/activitypub/repo/{username}/{reponame}/inbox": {
"post": {
"produces": [
"application/activity+json"
@@ -110,7 +131,7 @@
"activitypub"
],
"summary": "Send to the inbox",
- "operationId": "activitypubPersonInbox",
+ "operationId": "activitypubRepoInbox",
"parameters": [
{
"type": "string",
@@ -118,6 +139,13 @@
"name": "username",
"in": "path",
"required": true
+ },
+ {
+ "type": "string",
+ "description": "name of the repository",
+ "name": "reponame",
+ "in": "path",
+ "required": true
}
],
"responses": {
@@ -127,7 +155,7 @@
}
}
},
- "/activitypub/user/{username}/outbox": {
+ "/activitypub/user/{username}": {
"get": {
"produces": [
"application/activity+json"
@@ -135,8 +163,8 @@
"tags": [
"activitypub"
],
- "summary": "Returns the outbox",
- "operationId": "activitypubPersonOutbox",
+ "summary": "Returns the Person actor for a user",
+ "operationId": "activitypubPerson",
"parameters": [
{
"type": "string",
@@ -144,13 +172,6 @@
"name": "username",
"in": "path",
"required": true
- },
- {
- "type": "string",
- "description": "name of the repository",
- "name": "reponame",
- "in": "path",
- "required": true
}
],
"responses": {
@@ -160,7 +181,7 @@
}
}
},
- "/activitypub/user/{username}/{reponame}": {
+ "/activitypub/user/{username}/followers": {
"get": {
"produces": [
"application/activity+json"
@@ -168,8 +189,8 @@
"tags": [
"activitypub"
],
- "summary": "Returns the repository",
- "operationId": "activitypubRepo",
+ "summary": "Returns the Liked Collection",
+ "operationId": "activitypubPersonLiked",
"parameters": [
{
"type": "string",
@@ -177,13 +198,6 @@
"name": "username",
"in": "path",
"required": true
- },
- {
- "type": "string",
- "description": "name of the repository",
- "name": "reponame",
- "in": "path",
- "required": true
}
],
"responses": {
@@ -193,7 +207,7 @@
}
}
},
- "/activitypub/user/{username}/{reponame}/followers": {
+ "/activitypub/user/{username}/following": {
"get": {
"produces": [
"application/activity+json"
@@ -201,8 +215,8 @@
"tags": [
"activitypub"
],
- "summary": "Returns the followers collection",
- "operationId": "activitypubRepoFollowers",
+ "summary": "Returns the Following Collection",
+ "operationId": "activitypubPersonFollowing",
"parameters": [
{
"type": "string",
@@ -210,13 +224,6 @@
"name": "username",
"in": "path",
"required": true
- },
- {
- "type": "string",
- "description": "name of the repository",
- "name": "reponame",
- "in": "path",
- "required": true
}
],
"responses": {
@@ -226,7 +233,7 @@
}
}
},
- "/activitypub/user/{username}/{reponame}/inbox": {
+ "/activitypub/user/{username}/inbox": {
"post": {
"produces": [
"application/activity+json"
@@ -235,7 +242,7 @@
"activitypub"
],
"summary": "Send to the inbox",
- "operationId": "activitypubRepoInbox",
+ "operationId": "activitypubPersonInbox",
"parameters": [
{
"type": "string",
@@ -243,18 +250,37 @@
"name": "username",
"in": "path",
"required": true
- },
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ }
+ }
+ }
+ },
+ "/activitypub/user/{username}/outbox": {
+ "get": {
+ "produces": [
+ "application/activity+json"
+ ],
+ "tags": [
+ "activitypub"
+ ],
+ "summary": "Returns the Outbox OrderedCollection",
+ "operationId": "activitypubPersonOutbox",
+ "parameters": [
{
"type": "string",
- "description": "name of the repository",
- "name": "reponame",
+ "description": "username of the user",
+ "name": "username",
"in": "path",
"required": true
}
],
"responses": {
- "204": {
- "$ref": "#/responses/empty"
+ "200": {
+ "$ref": "#/responses/ActivityPub"
}
}
}