diff --git a/backend/schema/common.json b/backend/schema/common.json index 00b06e005f..70bd9f84c2 100644 --- a/backend/schema/common.json +++ b/backend/schema/common.json @@ -36,6 +36,32 @@ } ] }, + "access_directive": { + "description": "Access Directive", + "type": "string", + "enum": [ + "allow", + "deny" + ], + "example": "allow" + }, + "authorization_username": { + "description": "Username", + "type": "string", + "minLength": 1, + "example": "admin" + }, + "authorization_password": { + "description": "Password", + "type": "string", + "example": "pass" + }, + "authorization_hint": { + "description": "Password Hint", + "type": "string", + "minLength": 1, + "example": "p***" + }, "created_on": { "description": "Date and time of creation", "readOnly": true, @@ -86,7 +112,10 @@ "type": "string", "pattern": "^[^&| @!#%^();:/\\\\}{=+?<>,~`'\"]+$" }, - "example": ["example.com", "www.example.com"] + "example": [ + "example.com", + "www.example.com" + ] }, "enabled": { "description": "Is Enabled", @@ -136,7 +165,10 @@ }, "directive": { "type": "string", - "enum": ["allow", "deny"], + "enum": [ + "allow", + "deny" + ], "example": "allow" }, "address": { @@ -163,11 +195,10 @@ "additionalProperties": false, "properties": { "username": { - "type": "string", - "minLength": 1 + "$ref": "#/properties/authorization_username" }, "password": { - "type": "string" + "$ref": "#/properties/authorization_password" } }, "example": { @@ -214,18 +245,24 @@ "schema": { "type": "object", "additionalProperties": false, - "required": ["certificate", "certificate_key"], + "required": [ + "certificate", + "certificate_key" + ], "properties": { "certificate": { "type": "string", + "format": "binary", "example": "-----BEGIN CERTIFICATE-----\nMIID...-----END CERTIFICATE-----" }, "certificate_key": { "type": "string", + "format": "binary", "example": "-----BEGIN CERTIFICATE-----\nMIID...-----END CERTIFICATE-----" }, "intermediate_certificate": { "type": "string", + "format": "binary", "example": "-----BEGIN CERTIFICATE-----\nMIID...-----END CERTIFICATE-----" } } @@ -236,6 +273,11 @@ } } } + }, + "meta": { + "description": "Meta Information", + "type": "object", + "example": {} } } } diff --git a/backend/schema/components/access-list-list.json b/backend/schema/components/access-list-list.json new file mode 100644 index 0000000000..69104320bb --- /dev/null +++ b/backend/schema/components/access-list-list.json @@ -0,0 +1,7 @@ +{ + "type": "array", + "description": "Access list list", + "items": { + "$ref": "./access-list-object.json" + } +} diff --git a/backend/schema/components/access-list-object.json b/backend/schema/components/access-list-object.json index d80eb06d8f..b418197ad9 100644 --- a/backend/schema/components/access-list-object.json +++ b/backend/schema/components/access-list-object.json @@ -1,7 +1,17 @@ { "type": "object", "description": "Access List object", - "required": ["id", "created_on", "modified_on", "owner_user_id", "name", "meta", "satisfy_any", "pass_auth", "proxy_host_count"], + "required": [ + "id", + "created_on", + "modified_on", + "owner_user_id", + "name", + "meta", + "satisfy_any", + "pass_auth", + "proxy_host_count" + ], "properties": { "id": { "$ref": "../common.json#/properties/id" @@ -21,8 +31,7 @@ "example": "My Access List" }, "meta": { - "type": "object", - "example": {} + "$ref": "../common.json#/properties/meta" }, "satisfy_any": { "type": "boolean", @@ -36,6 +45,116 @@ "type": "integer", "minimum": 0, "example": 3 + }, + "owner": { + "$ref": "./user-object.json" + }, + "items": { + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "created_on", + "modified_on", + "access_list_id", + "username", + "password", + "hint", + "meta" + ], + "additionalProperties": false, + "properties": { + "id": { + "$ref": "../common.json#/properties/id" + }, + "created_on": { + "$ref": "../common.json#/properties/created_on" + }, + "modified_on": { + "$ref": "../common.json#/properties/modified_on" + }, + "access_list_id": { + "$ref": "../common.json#/properties/access_list_id" + }, + "username": { + "$ref": "../common.json#/properties/authorization_username" + }, + "password": { + "$ref": "../common.json#/properties/authorization_password" + }, + "hint": { + "$ref": "../common.json#/properties/authorization_hint" + }, + "meta": { + "$ref": "../common.json#/properties/meta" + } + } + }, + "example": [ + { + "id": 1, + "created_on": "2024-10-08T22:15:40.000Z", + "modified_on": "2024-10-08T22:15:40.000Z", + "access_list_id": 1, + "username": "admin", + "password": "", + "hint": "a****", + "meta": {} + } + ] + }, + "clients": { + "type": "array", + "minItems": 0, + "items": { + "type": "object", + "required": [ + "id", + "created_on", + "modified_on", + "access_list_id", + "address", + "directive", + "meta" + ], + "additionalProperties": false, + "properties": { + "id": { + "$ref": "../common.json#/properties/id" + }, + "created_on": { + "$ref": "../common.json#/properties/created_on" + }, + "modified_on": { + "$ref": "../common.json#/properties/modified_on" + }, + "access_list_id": { + "$ref": "../common.json#/properties/access_list_id" + }, + "address": { + "$ref": "../common.json#/properties/address" + }, + "directive": { + "$ref": "../common.json#/properties/access_directive" + }, + "meta": { + "$ref": "../common.json#/properties/meta" + } + } + }, + "example": [ + { + "id": 1, + "created_on": "2024-10-08T22:15:40.000Z", + "modified_on": "2024-10-08T22:15:40.000Z", + "access_list_id": 1, + "address": "127.0.0.1", + "directive": "allow", + "meta": {} + } + ] } } } diff --git a/backend/schema/components/audit-log-object.json b/backend/schema/components/audit-log-object.json index 307cac8227..c8747e7b50 100644 --- a/backend/schema/components/audit-log-object.json +++ b/backend/schema/components/audit-log-object.json @@ -37,8 +37,7 @@ "example": "created" }, "meta": { - "type": "object", - "example": {} + "$ref": "../common.json#/properties/meta" }, "user": { "$ref": "./user-object.json" diff --git a/backend/schema/components/dead-host-object.json b/backend/schema/components/dead-host-object.json index b876ebf0a8..036fecdd32 100644 --- a/backend/schema/components/dead-host-object.json +++ b/backend/schema/components/dead-host-object.json @@ -1,7 +1,21 @@ { "type": "object", "description": "404 Host object", - "required": ["id", "created_on", "modified_on", "owner_user_id", "domain_names", "certificate_id", "ssl_forced", "hsts_enabled", "hsts_subdomains", "http2_support", "advanced_config", "enabled", "meta"], + "required": [ + "id", + "created_on", + "modified_on", + "owner_user_id", + "domain_names", + "certificate_id", + "ssl_forced", + "hsts_enabled", + "hsts_subdomains", + "http2_support", + "advanced_config", + "enabled", + "meta" + ], "additionalProperties": false, "properties": { "id": { @@ -42,8 +56,7 @@ "$ref": "../common.json#/properties/enabled" }, "meta": { - "type": "object", - "example": {} + "$ref": "../common.json#/properties/meta" }, "certificate": { "oneOf": [ diff --git a/backend/schema/components/permission-object.json b/backend/schema/components/permission-object.json index cae9d26c02..c627500989 100644 --- a/backend/schema/components/permission-object.json +++ b/backend/schema/components/permission-object.json @@ -1,47 +1,83 @@ { "type": "object", - "minProperties": 1, + "required": [ + "visibility", + "access_lists", + "dead_hosts", + "proxy_hosts", + "redirection_hosts", + "streams", + "certificates" + ], + "additionalProperties": false, "properties": { "visibility": { "type": "string", "description": "Visibility Type", - "enum": ["all", "user"], + "enum": [ + "all", + "user" + ], "example": "all" }, "access_lists": { "type": "string", "description": "Access Lists Permissions", - "enum": ["hidden", "view", "manage"], + "enum": [ + "hidden", + "view", + "manage" + ], "example": "view" }, "dead_hosts": { "type": "string", "description": "404 Hosts Permissions", - "enum": ["hidden", "view", "manage"], + "enum": [ + "hidden", + "view", + "manage" + ], "example": "manage" }, "proxy_hosts": { "type": "string", "description": "Proxy Hosts Permissions", - "enum": ["hidden", "view", "manage"], + "enum": [ + "hidden", + "view", + "manage" + ], "example": "hidden" }, "redirection_hosts": { "type": "string", "description": "Redirection Permissions", - "enum": ["hidden", "view", "manage"], + "enum": [ + "hidden", + "view", + "manage" + ], "example": "view" }, "streams": { "type": "string", "description": "Streams Permissions", - "enum": ["hidden", "view", "manage"], + "enum": [ + "hidden", + "view", + "manage" + ], "example": "manage" }, "certificates": { "type": "string", "description": "Certificates Permissions", - "enum": ["hidden", "view", "manage"], + "enum": [ + "hidden", + "view", + "manage" + ], "example": "hidden" } } diff --git a/backend/schema/components/stream-object.json b/backend/schema/components/stream-object.json index 602073ceca..514859c8ca 100644 --- a/backend/schema/components/stream-object.json +++ b/backend/schema/components/stream-object.json @@ -74,8 +74,7 @@ "$ref": "../common.json#/properties/certificate_id" }, "meta": { - "type": "object", - "example": {} + "$ref": "../common.json#/properties/meta" }, "certificate": { "oneOf": [ diff --git a/backend/schema/components/user-object.json b/backend/schema/components/user-object.json index 7acd0a4290..c2725c32ef 100644 --- a/backend/schema/components/user-object.json +++ b/backend/schema/components/user-object.json @@ -1,24 +1,27 @@ { "type": "object", "description": "User object", - "required": ["id", "created_on", "modified_on", "is_disabled", "email", "name", "nickname", "avatar", "roles"], + "required": [ + "id", + "created_on", + "modified_on", + "is_disabled", + "email", + "name", + "nickname", + "avatar", + "roles" + ], "additionalProperties": false, "properties": { "id": { - "type": "integer", - "description": "User ID", - "minimum": 1, - "example": 1 + "$ref": "../common.json#/properties/user_id" }, "created_on": { - "type": "string", - "description": "Created Date", - "example": "2020-01-30T09:36:08.000Z" + "$ref": "../common.json#/properties/created_on" }, "modified_on": { - "type": "string", - "description": "Modified Date", - "example": "2020-01-30T09:41:04.000Z" + "$ref": "../common.json#/properties/modified_on" }, "is_disabled": { "type": "boolean", @@ -26,10 +29,7 @@ "example": true }, "email": { - "type": "string", - "description": "Email", - "minLength": 3, - "example": "jc@jc21.com" + "$ref": "../common.json#/properties/email" }, "name": { "type": "string", @@ -49,68 +49,16 @@ }, "roles": { "description": "Roles applied", - "example": ["admin"], + "example": [ + "admin" + ], "type": "array", "items": { "type": "string" } }, "permissions": { - "type": "object", - "description": "Permissions if expanded in request", - "required": [ - "visibility", - "proxy_hosts", - "redirection_hosts", - "dead_hosts", - "streams", - "access_lists", - "certificates" - ], - "properties": { - "visibility": { - "type": "string", - "description": "Visibility level", - "example": "all", - "pattern": "^(all|user)$" - }, - "proxy_hosts": { - "type": "string", - "description": "Proxy Hosts access level", - "example": "manage", - "pattern": "^(manage|view|hidden)$" - }, - "redirection_hosts": { - "type": "string", - "description": "Redirection Hosts access level", - "example": "manage", - "pattern": "^(manage|view|hidden)$" - }, - "dead_hosts": { - "type": "string", - "description": "Dead Hosts access level", - "example": "manage", - "pattern": "^(manage|view|hidden)$" - }, - "streams": { - "type": "string", - "description": "Streams access level", - "example": "manage", - "pattern": "^(manage|view|hidden)$" - }, - "access_lists": { - "type": "string", - "description": "Access Lists access level", - "example": "hidden", - "pattern": "^(manage|view|hidden)$" - }, - "certificates": { - "type": "string", - "description": "Certificates access level", - "example": "view", - "pattern": "^(manage|view|hidden)$" - } - } + "$ref": "./permission-object.json" } } } diff --git a/backend/schema/paths/nginx/access-lists/get.json b/backend/schema/paths/nginx/access-lists/get.json index ada40f5bf7..05ec361d42 100644 --- a/backend/schema/paths/nginx/access-lists/get.json +++ b/backend/schema/paths/nginx/access-lists/get.json @@ -1,7 +1,9 @@ { "operationId": "getAccessLists", "summary": "Get all access lists", - "tags": ["access-lists"], + "tags": [ + "access-lists" + ], "security": [ { "bearerAuth": [ @@ -30,19 +32,68 @@ "description": "200 response", "content": { "application/json": { - "example": { - "id": 1, - "created_on": "2024-10-08T22:15:40.000Z", - "modified_on": "2024-10-08T22:15:40.000Z", - "owner_user_id": 1, - "name": "test1234", - "meta": {}, - "satisfy_any": true, - "pass_auth": false, - "proxy_host_count": 0 - }, + "example": [ + { + "id": 1, + "created_on": "2024-10-08T22:15:40.000Z", + "modified_on": "2024-10-08T22:15:40.000Z", + "owner_user_id": 1, + "name": "test1234", + "meta": {}, + "satisfy_any": true, + "pass_auth": false, + "proxy_host_count": 0, + "owner": { + "id": 1, + "created_on": "2024-10-07T22:43:55.000Z", + "modified_on": "2024-10-08T12:52:54.000Z", + "is_disabled": false, + "email": "admin@example.com", + "name": "Administrator", + "nickname": "some guy", + "avatar": "//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?default=mm", + "roles": [ + "admin" + ] + }, + "items": [ + { + "id": 1, + "created_on": "2024-10-08T22:15:40.000Z", + "modified_on": "2024-10-08T22:15:40.000Z", + "access_list_id": 1, + "username": "admin", + "password": "", + "meta": {}, + "hint": "a****" + }, + { + "id": 2, + "created_on": "2024-10-08T22:15:40.000Z", + "modified_on": "2024-10-08T22:15:40.000Z", + "access_list_id": 1, + "username": "asdad", + "password": "", + "meta": {}, + "hint": "a*****" + } + ], + "clients": [ + { + "id": 1, + "created_on": "2024-10-08T22:15:40.000Z", + "modified_on": "2024-10-08T22:15:40.000Z", + "access_list_id": 1, + "address": "127.0.0.1", + "directive": "allow", + "meta": {} + } + ], + "proxy_hosts": [] + } + ], "schema": { - "$ref": "../../../components/access-list-object.json" + "$ref": "../../../components/access-list-list.json" } } } diff --git a/backend/schema/paths/nginx/access-lists/listID/get.json b/backend/schema/paths/nginx/access-lists/listID/get.json index 9705826f20..78786e4a12 100644 --- a/backend/schema/paths/nginx/access-lists/listID/get.json +++ b/backend/schema/paths/nginx/access-lists/listID/get.json @@ -22,6 +22,20 @@ }, "required": true, "example": 1 + }, + { + "in": "query", + "name": "expand", + "description": "Expansions", + "schema": { + "type": "string", + "enum": [ + "owner", + "items", + "clients", + "proxy_hosts" + ] + } } ], "responses": { @@ -40,7 +54,54 @@ "meta": {}, "satisfy_any": false, "pass_auth": false, - "proxy_host_count": 1 + "proxy_host_count": 1, + "owner": { + "id": 1, + "created_on": "2024-10-07T22:43:55.000Z", + "modified_on": "2024-10-08T12:52:54.000Z", + "is_disabled": false, + "email": "admin@example.com", + "name": "Administrator", + "nickname": "some guy", + "avatar": "//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?default=mm", + "roles": [ + "admin" + ] + }, + "items": [ + { + "id": 1, + "created_on": "2024-10-08T22:15:40.000Z", + "modified_on": "2024-10-08T22:15:40.000Z", + "access_list_id": 1, + "username": "admin", + "password": "", + "meta": {}, + "hint": "a****" + }, + { + "id": 2, + "created_on": "2024-10-08T22:15:40.000Z", + "modified_on": "2024-10-08T22:15:40.000Z", + "access_list_id": 1, + "username": "asdad", + "password": "", + "meta": {}, + "hint": "a*****" + } + ], + "clients": [ + { + "id": 1, + "created_on": "2024-10-08T22:15:40.000Z", + "modified_on": "2024-10-08T22:15:40.000Z", + "access_list_id": 1, + "address": "127.0.0.1", + "directive": "allow", + "meta": {} + } + ], + "proxy_hosts": [] } } }, diff --git a/backend/schema/paths/nginx/access-lists/listID/put.json b/backend/schema/paths/nginx/access-lists/listID/put.json index 61e8044013..0d7830cd6d 100644 --- a/backend/schema/paths/nginx/access-lists/listID/put.json +++ b/backend/schema/paths/nginx/access-lists/listID/put.json @@ -1,10 +1,14 @@ { "operationId": "updateAccessList", "summary": "Update a Access List", - "tags": ["access-lists"], + "tags": [ + "access-lists" + ], "security": [ { - "bearerAuth": ["access_lists.manage"] + "bearerAuth": [ + "access_lists.manage" + ] } ], "parameters": [ @@ -93,7 +97,9 @@ "name": "Administrator", "nickname": "some guy", "avatar": "//www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?default=mm", - "roles": ["admin"] + "roles": [ + "admin" + ] }, "items": [ { diff --git a/backend/schema/paths/nginx/certificates/certID/get.json b/backend/schema/paths/nginx/certificates/certID/get.json index 46afbf8753..f47bf5ee57 100644 --- a/backend/schema/paths/nginx/certificates/certID/get.json +++ b/backend/schema/paths/nginx/certificates/certID/get.json @@ -1,10 +1,14 @@ { "operationId": "getCertificate", "summary": "Get a Certificate", - "tags": ["certificates"], + "tags": [ + "certificates" + ], "security": [ { - "bearerAuth": ["certificates.view"] + "bearerAuth": [ + "certificates.view" + ] } ], "parameters": [ @@ -18,6 +22,17 @@ }, "required": true, "example": 1 + }, + { + "in": "query", + "name": "expand", + "description": "Expansions", + "schema": { + "type": "string", + "enum": [ + "owner" + ] + } } ], "responses": { @@ -34,7 +49,9 @@ "owner_user_id": 1, "provider": "letsencrypt", "nice_name": "test.example.com", - "domain_names": ["test.example.com"], + "domain_names": [ + "test.example.com" + ], "expires_on": "2025-01-07T04:34:18.000Z", "meta": { "dns_challenge": false diff --git a/backend/schema/paths/nginx/dead-hosts/hostID/get.json b/backend/schema/paths/nginx/dead-hosts/hostID/get.json index a3c24edc34..4b39a9e8ee 100644 --- a/backend/schema/paths/nginx/dead-hosts/hostID/get.json +++ b/backend/schema/paths/nginx/dead-hosts/hostID/get.json @@ -1,10 +1,14 @@ { "operationId": "getDeadHost", "summary": "Get a 404 Host", - "tags": ["404-hosts"], + "tags": [ + "404-hosts" + ], "security": [ { - "bearerAuth": ["dead_hosts.view"] + "bearerAuth": [ + "dead_hosts.view" + ] } ], "parameters": [ @@ -18,6 +22,18 @@ }, "required": true, "example": 1 + }, + { + "in": "query", + "name": "expand", + "description": "Expansions", + "schema": { + "type": "string", + "enum": [ + "owner", + "certificate" + ] + } } ], "responses": { @@ -32,7 +48,9 @@ "created_on": "2024-10-09T01:38:52.000Z", "modified_on": "2024-10-09T01:38:52.000Z", "owner_user_id": 1, - "domain_names": ["test.example.com"], + "domain_names": [ + "test.example.com" + ], "certificate_id": 0, "ssl_forced": false, "advanced_config": "", diff --git a/backend/schema/paths/nginx/proxy-hosts/hostID/get.json b/backend/schema/paths/nginx/proxy-hosts/hostID/get.json index 351451c4f6..9e74c33b4a 100644 --- a/backend/schema/paths/nginx/proxy-hosts/hostID/get.json +++ b/backend/schema/paths/nginx/proxy-hosts/hostID/get.json @@ -1,7 +1,9 @@ { "operationId": "getProxyHost", "summary": "Get a Proxy Host", - "tags": ["proxy-hosts"], + "tags": [ + "proxy-hosts" + ], "security": [ { "bearerAuth": [ @@ -20,6 +22,19 @@ }, "required": true, "example": 1 + }, + { + "in": "query", + "name": "expand", + "description": "Expansions", + "schema": { + "type": "string", + "enum": [ + "access_list", + "owner", + "certificate" + ] + } } ], "responses": { diff --git a/backend/schema/paths/nginx/redirection-hosts/hostID/get.json b/backend/schema/paths/nginx/redirection-hosts/hostID/get.json index 577b5144a9..85609b7ffb 100644 --- a/backend/schema/paths/nginx/redirection-hosts/hostID/get.json +++ b/backend/schema/paths/nginx/redirection-hosts/hostID/get.json @@ -1,10 +1,14 @@ { "operationId": "getRedirectionHost", "summary": "Get a Redirection Host", - "tags": ["redirection-hosts"], + "tags": [ + "redirection-hosts" + ], "security": [ { - "bearerAuth": ["redirection_hosts.view"] + "bearerAuth": [ + "redirection_hosts.view" + ] } ], "parameters": [ @@ -18,6 +22,18 @@ }, "required": true, "example": 1 + }, + { + "in": "query", + "name": "expand", + "description": "Expansions", + "schema": { + "type": "string", + "enum": [ + "owner", + "certificate" + ] + } } ], "responses": { @@ -32,7 +48,9 @@ "created_on": "2024-10-09T01:13:12.000Z", "modified_on": "2024-10-09T01:13:13.000Z", "owner_user_id": 1, - "domain_names": ["test.example.com"], + "domain_names": [ + "test.example.com" + ], "forward_domain_name": "something-else.com", "preserve_path": false, "certificate_id": 0, diff --git a/backend/schema/paths/nginx/streams/streamID/get.json b/backend/schema/paths/nginx/streams/streamID/get.json index 22fae8872b..3f9d3bac8f 100644 --- a/backend/schema/paths/nginx/streams/streamID/get.json +++ b/backend/schema/paths/nginx/streams/streamID/get.json @@ -1,10 +1,14 @@ { "operationId": "getStream", "summary": "Get a Stream", - "tags": ["streams"], + "tags": [ + "streams" + ], "security": [ { - "bearerAuth": ["streams.view"] + "bearerAuth": [ + "streams.view" + ] } ], "parameters": [ @@ -18,6 +22,18 @@ }, "required": true, "example": 2 + }, + { + "in": "query", + "name": "expand", + "description": "Expansions", + "schema": { + "type": "string", + "enum": [ + "owner", + "certificate" + ] + } } ], "responses": { diff --git a/backend/schema/paths/users/post.json b/backend/schema/paths/users/post.json index 49025e3250..3feb9bf0af 100644 --- a/backend/schema/paths/users/post.json +++ b/backend/schema/paths/users/post.json @@ -1,10 +1,14 @@ { "operationId": "createUser", "summary": "Create a User", - "tags": ["users"], + "tags": [ + "users" + ], "security": [ { - "bearerAuth": ["admin"] + "bearerAuth": [ + "admin" + ] } ], "requestBody": { @@ -15,7 +19,11 @@ "schema": { "type": "object", "additionalProperties": false, - "required": ["name", "nickname", "email"], + "required": [ + "name", + "nickname", + "email" + ], "properties": { "name": { "$ref": "../../components/user-object.json#/properties/name" @@ -61,12 +69,10 @@ "name": "Jamie Curnow", "nickname": "James", "avatar": "//www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?default=mm", - "roles": ["admin"], + "roles": [ + "admin" + ], "permissions": { - "id": 3, - "created_on": "2020-01-30T09:41:04.000Z", - "modified_on": "2020-01-30T09:41:04.000Z", - "user_id": 2, "visibility": "user", "proxy_hosts": "manage", "redirection_hosts": "manage", diff --git a/backend/schema/paths/users/userID/get.json b/backend/schema/paths/users/userID/get.json index 2cf5587d9f..e002c9084e 100644 --- a/backend/schema/paths/users/userID/get.json +++ b/backend/schema/paths/users/userID/get.json @@ -1,10 +1,14 @@ { "operationId": "getUser", "summary": "Get a user", - "tags": ["users"], + "tags": [ + "users" + ], "security": [ { - "bearerAuth": ["admin"] + "bearerAuth": [ + "admin" + ] } ], "parameters": [ @@ -26,6 +30,17 @@ "required": true, "description": "User ID or 'me' for yourself", "example": 1 + }, + { + "in": "query", + "name": "expand", + "description": "Expansions", + "schema": { + "type": "string", + "enum": [ + "permissions" + ] + } } ], "responses": { @@ -44,7 +59,9 @@ "name": "Jamie Curnow", "nickname": "James", "avatar": "//www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?default=mm", - "roles": ["admin"] + "roles": [ + "admin" + ] } } },