Skip to content

Node.js based forum software built for the modern web

fix: two more routes

Julian Lam9c2de86a6e6a
diff --git a/public/openapi/read.yaml b/public/openapi/read.yaml
index f6e6312f37..c6e3afcb99 100644
--- a/public/openapi/read.yaml
+++ b/public/openapi/read.yaml
@@ -201,6 +201,8 @@ paths:
$ref: 'read/register.yaml'
/api/register/complete:
$ref: 'read/register/complete.yaml'
+ "/api/confirm/{code}":
+ $ref: 'read/confirm/code.yaml'
/api/search:
$ref: 'read/search.yaml'
"/api/reset":
diff --git a/public/openapi/read/admin/advanced/cache/dump.yaml b/public/openapi/read/admin/advanced/cache/dump.yaml
new file mode 100644
index 0000000000..2be4e38f9b
--- /dev/null
+++ b/public/openapi/read/admin/advanced/cache/dump.yaml
@@ -0,0 +1,23 @@
+get:
+ tags:
+ - admin
+ summary: Get system cache info
+ parameters:
+ - in: query
+ name: name
+ schema:
+ type: string
+ enum: ['post', 'object', 'group', 'local']
+ required: false
+ description: Specify cache to dump if calling `/dump`
+ example: 'post'
+ responses:
+ "200":
+ description: ""
+ content:
+ application/json:
+ schema:
+ type: object
+ properties: {}
+ additionalProperties:
+ description: The type of response is dependent on the database used. Please examine the output.
\ No newline at end of file
diff --git a/public/openapi/read/confirm/code.yaml b/public/openapi/read/confirm/code.yaml
new file mode 100644
index 0000000000..d066ede5f9
--- /dev/null
+++ b/public/openapi/read/confirm/code.yaml
@@ -0,0 +1,22 @@
+get:
+ tags:
+ - authentication
+ summary: Verify an email address
+ responses:
+ "200":
+ description: Email address verified, or confirmation code was incorrect
+ content:
+ application/json:
+ schema:
+ allOf:
+ - type: object
+ properties:
+ title:
+ type: string
+ error:
+ type: string
+ description: Translation key for client-side localisation
+ required:
+ - title
+ - $ref: ../../components/schemas/Breadcrumbs.yaml#/Breadcrumbs
+ - $ref: ../../components/schemas/CommonProps.yaml#/CommonProps
\ No newline at end of file
diff --git a/public/openapi/read/login.yaml b/public/openapi/read/login.yaml
index a480ef74b9..4e5b3944a9 100644
--- a/public/openapi/read/login.yaml
+++ b/public/openapi/read/login.yaml
@@ -1,7 +1,7 @@
get:
tags:
- authentication
- summary: /api/login
+ summary: Log in a user
responses:
"200":
description: ""
diff --git a/public/openapi/read/register.yaml b/public/openapi/read/register.yaml
index 74001416cc..b4ec6d4fbc 100644
--- a/public/openapi/read/register.yaml
+++ b/public/openapi/read/register.yaml
@@ -1,7 +1,7 @@
get:
tags:
- authentication
- summary: /api/register
+ summary: Register a new user
responses:
"200":
description: ""
diff --git a/public/openapi/read/register/complete.yaml b/public/openapi/read/register/complete.yaml
index b0308c7094..d6f8e48a35 100644
--- a/public/openapi/read/register/complete.yaml
+++ b/public/openapi/read/register/complete.yaml
@@ -1,7 +1,7 @@
get:
tags:
- authentication
- summary: /api/register/complete
+ summary: Complete a user's registration
responses:
"302":
description: If there are no additional registration steps to complete, then the user is redirected back to the registration page (`/register`)
diff --git a/test/api.js b/test/api.js
index 3a9c82f4ee..3154cd0c14 100644
--- a/test/api.js
+++ b/test/api.js
@@ -197,7 +197,7 @@ describe('API', async () => {
pathObj.path = pathObj.path.replace(/\/:([^\\/]+)/g, '/{$1}');
return pathObj;
});
- const exclusionPrefixes = ['/api/admin/plugins'];
+ const exclusionPrefixes = ['/api/admin/plugins', '/api/compose'];
paths = paths.filter(function filterExclusions(path) {
return path.method !== '_all' && !exclusionPrefixes.some(prefix => path.path.startsWith(prefix));
});