diff --git a/docs/src/spec/channel.json b/docs/src/spec/channel.json index 432705d1b..9c65a5fd0 100644 --- a/docs/src/spec/channel.json +++ b/docs/src/spec/channel.json @@ -4,23 +4,9 @@ "Package": "crust", "Interface": "Channel", "Path": "/channel", - "APIs": { - "archive": { - "Method": "POST", - "Title": "Archive channel", - "Path": "/archive", - "Parameters": { - "post": [ - { - "name": "id", - "required": true, - "title": "Channel ID", - "type": "uint64" - } - ] - } - }, - "edit": { + "APIs": [ + { + "Name": "edit", "Method": "POST", "Title": "Update channel details", "Path": "/edit", @@ -47,7 +33,88 @@ ] } }, - "merge": { + { + "Name": "remove", + "Method": "DELETE", + "Title": "Remove channel", + "Path": "/remove", + "Parameters": { + "get": [ + { + "name": "id", + "required": true, + "title": "Channel ID", + "type": "uint64" + } + ] + } + }, + { + "Name": "read", + "Method": "GET", + "Title": "Read channel details", + "Path": "/read", + "Parameters": { + "get": [ + { + "name": "id", + "required": true, + "title": "Channel ID", + "type": "uint64" + } + ] + } + }, + { + "Name": "search", + "Method": "GET", + "Title": "Search channels", + "Path": "/search", + "Parameters": { + "get": [ + { + "name": "query", + "required": false, + "title": "Search query", + "type": "string" + } + ] + } + }, + { + "Name": "archive", + "Method": "POST", + "Title": "Archive channel", + "Path": "/archive", + "Parameters": { + "post": [ + { + "name": "id", + "required": true, + "title": "Channel ID", + "type": "uint64" + } + ] + } + }, + { + "Name": "move", + "Method": "POST", + "Title": "Move channel to different team or organisation", + "Path": "/move", + "Parameters": { + "post": [ + { + "name": "id", + "required": true, + "title": "Channel ID", + "type": "uint64" + } + ] + } + }, + { + "Name": "merge", "Method": "POST", "Title": "Merge one team into another", "Path": "/merge", @@ -67,66 +134,6 @@ } ] } - }, - "move": { - "Method": "POST", - "Title": "Move channel to different team or organisation", - "Path": "/move", - "Parameters": { - "post": [ - { - "name": "id", - "required": true, - "title": "Channel ID", - "type": "uint64" - } - ] - } - }, - "read": { - "Method": "GET", - "Title": "Read channel details", - "Path": "/read", - "Parameters": { - "get": [ - { - "name": "id", - "required": true, - "title": "Channel ID", - "type": "uint64" - } - ] - } - }, - "remove": { - "Method": "DELETE", - "Title": "Remove channel", - "Path": "/remove", - "Parameters": { - "get": [ - { - "name": "id", - "required": true, - "title": "Channel ID", - "type": "uint64" - } - ] - } - }, - "search": { - "Method": "GET", - "Title": "Search channels", - "Path": "/search", - "Parameters": { - "get": [ - { - "name": "query", - "required": false, - "title": "Search query", - "type": "string" - } - ] - } } - } + ] } \ No newline at end of file diff --git a/docs/src/spec/member.json b/docs/src/spec/member.json index 05aad0d72..b31985421 100644 --- a/docs/src/spec/member.json +++ b/docs/src/spec/member.json @@ -3,8 +3,9 @@ "Package": "crust", "Interface": "Member", "Path": "/member", - "APIs": { - "search": { + "APIs": [ + { + "Name": "search", "Method": "GET", "Title": "Search members (Directory)", "Path": "/search", @@ -19,5 +20,5 @@ ] } } - } + ] } \ No newline at end of file diff --git a/docs/src/spec/message.json b/docs/src/spec/message.json index 30285e4aa..952a7c265 100644 --- a/docs/src/spec/message.json +++ b/docs/src/spec/message.json @@ -3,14 +3,9 @@ "Package": "crust", "Interface": "Message", "Path": "/message", - "APIs": { - "attach": { - "Method": "PUT", - "Title": "Attach file to message", - "Path": "/attach", - "Parameters": null - }, - "edit": { + "APIs": [ + { + "Name": "edit", "Method": "POST", "Title": "New message / edit message", "Path": "/edit", @@ -37,52 +32,15 @@ ] } }, - "flag": { - "Method": "POST", - "Title": "Flag message for user (bookmark)", - "Path": "/flag", - "Parameters": { - "post": [ - { - "name": "id", - "required": true, - "title": "Message ID", - "type": "uint64" - } - ] - } + { + "Name": "attach", + "Method": "PUT", + "Title": "Attach file to message", + "Path": "/attach", + "Parameters": null }, - "pin": { - "Method": "POST", - "Title": "Pin message to channel (public bookmark)", - "Path": "/pin", - "Parameters": { - "post": [ - { - "name": "id", - "required": true, - "title": "Message ID", - "type": "uint64" - } - ] - } - }, - "read": { - "Method": "GET", - "Title": "Read message details", - "Path": "/read", - "Parameters": { - "post": [ - { - "name": "channel_id", - "required": true, - "title": "Channel ID to read messages from", - "type": "uint64" - } - ] - } - }, - "remove": { + { + "Name": "remove", "Method": "DELETE", "Title": "Remove message", "Path": "/remove", @@ -97,7 +55,24 @@ ] } }, - "search": { + { + "Name": "read", + "Method": "GET", + "Title": "Read message details", + "Path": "/read", + "Parameters": { + "post": [ + { + "name": "channel_id", + "required": true, + "title": "Channel ID to read messages from", + "type": "uint64" + } + ] + } + }, + { + "Name": "search", "Method": "GET", "Title": "Search messages", "Path": "/search", @@ -123,6 +98,38 @@ } ] } + }, + { + "Name": "pin", + "Method": "POST", + "Title": "Pin message to channel (public bookmark)", + "Path": "/pin", + "Parameters": { + "post": [ + { + "name": "id", + "required": true, + "title": "Message ID", + "type": "uint64" + } + ] + } + }, + { + "Name": "flag", + "Method": "POST", + "Title": "Flag message for user (bookmark)", + "Path": "/flag", + "Parameters": { + "post": [ + { + "name": "id", + "required": true, + "title": "Message ID", + "type": "uint64" + } + ] + } } - } + ] } \ No newline at end of file diff --git a/docs/src/spec/organisation.json b/docs/src/spec/organisation.json index ca549cfdc..852afb09b 100644 --- a/docs/src/spec/organisation.json +++ b/docs/src/spec/organisation.json @@ -4,23 +4,9 @@ "Package": "crust", "Interface": "Organisation", "Path": "/organisation", - "APIs": { - "archive": { - "Method": "POST", - "Title": "Archive organisation", - "Path": "/archive", - "Parameters": { - "post": [ - { - "name": "id", - "required": true, - "title": "Organisation ID", - "type": "uint64" - } - ] - } - }, - "edit": { + "APIs": [ + { + "Name": "edit", "Method": "POST", "Title": "Update organisation details", "Path": "/edit", @@ -41,22 +27,8 @@ ] } }, - "read": { - "Method": "GET", - "Title": "Read organisation details", - "Path": "/read", - "Parameters": { - "get": [ - { - "name": "id", - "required": true, - "title": "Organisation ID", - "type": "uint64" - } - ] - } - }, - "remove": { + { + "Name": "remove", "Method": "DELETE", "Title": "Remove organisation", "Path": "/remove", @@ -71,7 +43,24 @@ ] } }, - "search": { + { + "Name": "read", + "Method": "GET", + "Title": "Read organisation details", + "Path": "/read", + "Parameters": { + "get": [ + { + "name": "id", + "required": true, + "title": "Organisation ID", + "type": "uint64" + } + ] + } + }, + { + "Name": "search", "Method": "GET", "Title": "Search organisations", "Path": "/search", @@ -85,6 +74,22 @@ } ] } + }, + { + "Name": "archive", + "Method": "POST", + "Title": "Archive organisation", + "Path": "/archive", + "Parameters": { + "post": [ + { + "name": "id", + "required": true, + "title": "Organisation ID", + "type": "uint64" + } + ] + } } - } + ] } \ No newline at end of file diff --git a/docs/src/spec/team.json b/docs/src/spec/team.json index 6a71f5d17..69d0a741d 100644 --- a/docs/src/spec/team.json +++ b/docs/src/spec/team.json @@ -4,23 +4,9 @@ "Package": "crust", "Interface": "Team", "Path": "/team", - "APIs": { - "archive": { - "Method": "POST", - "Title": "Archive team", - "Path": "/archive", - "Parameters": { - "post": [ - { - "name": "id", - "required": true, - "title": "Organisation ID", - "type": "uint64" - } - ] - } - }, - "edit": { + "APIs": [ + { + "Name": "edit", "Method": "POST", "Title": "Update team details", "Path": "/edit", @@ -47,7 +33,72 @@ ] } }, - "move": { + { + "Name": "remove", + "Method": "DELETE", + "Title": "Remove team", + "Path": "/remove", + "Parameters": { + "get": [ + { + "name": "id", + "required": true, + "title": "Organisation ID", + "type": "uint64" + } + ] + } + }, + { + "Name": "read", + "Method": "GET", + "Title": "Read team details and memberships", + "Path": "/read", + "Parameters": { + "get": [ + { + "name": "id", + "required": true, + "title": "Organisation ID", + "type": "uint64" + } + ] + } + }, + { + "Name": "search", + "Method": "GET", + "Title": "Search teams", + "Path": "/search", + "Parameters": { + "get": [ + { + "name": "query", + "required": false, + "title": "Search query", + "type": "string" + } + ] + } + }, + { + "Name": "archive", + "Method": "POST", + "Title": "Archive team", + "Path": "/archive", + "Parameters": { + "post": [ + { + "name": "id", + "required": true, + "title": "Organisation ID", + "type": "uint64" + } + ] + } + }, + { + "Name": "move", "Method": "POST", "Title": "Move team to different organisation", "Path": "/move", @@ -67,51 +118,6 @@ } ] } - }, - "read": { - "Method": "GET", - "Title": "Read team details and memberships", - "Path": "/read", - "Parameters": { - "get": [ - { - "name": "id", - "required": true, - "title": "Organisation ID", - "type": "uint64" - } - ] - } - }, - "remove": { - "Method": "DELETE", - "Title": "Remove team", - "Path": "/remove", - "Parameters": { - "get": [ - { - "name": "id", - "required": true, - "title": "Organisation ID", - "type": "uint64" - } - ] - } - }, - "search": { - "Method": "GET", - "Title": "Search teams", - "Path": "/search", - "Parameters": { - "get": [ - { - "name": "query", - "required": false, - "title": "Search query", - "type": "string" - } - ] - } } - } + ] } \ No newline at end of file