fix: two more routes

v1.18.x
Julian Lam 4 years ago
parent cb32e32ae3
commit 9c2de86a6e

@ -201,6 +201,8 @@ paths:
$ref: 'read/register.yaml' $ref: 'read/register.yaml'
/api/register/complete: /api/register/complete:
$ref: 'read/register/complete.yaml' $ref: 'read/register/complete.yaml'
"/api/confirm/{code}":
$ref: 'read/confirm/code.yaml'
/api/search: /api/search:
$ref: 'read/search.yaml' $ref: 'read/search.yaml'
"/api/reset": "/api/reset":

@ -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.

@ -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

@ -1,7 +1,7 @@
get: get:
tags: tags:
- authentication - authentication
summary: /api/login summary: Log in a user
responses: responses:
"200": "200":
description: "" description: ""

@ -1,7 +1,7 @@
get: get:
tags: tags:
- authentication - authentication
summary: /api/register summary: Register a new user
responses: responses:
"200": "200":
description: "" description: ""

@ -1,7 +1,7 @@
get: get:
tags: tags:
- authentication - authentication
summary: /api/register/complete summary: Complete a user's registration
responses: responses:
"302": "302":
description: If there are no additional registration steps to complete, then the user is redirected back to the registration page (`/register`) description: If there are no additional registration steps to complete, then the user is redirected back to the registration page (`/register`)

@ -197,7 +197,7 @@ describe('API', async () => {
pathObj.path = pathObj.path.replace(/\/:([^\\/]+)/g, '/{$1}'); pathObj.path = pathObj.path.replace(/\/:([^\\/]+)/g, '/{$1}');
return pathObj; return pathObj;
}); });
const exclusionPrefixes = ['/api/admin/plugins']; const exclusionPrefixes = ['/api/admin/plugins', '/api/compose'];
paths = paths.filter(function filterExclusions(path) { paths = paths.filter(function filterExclusions(path) {
return path.method !== '_all' && !exclusionPrefixes.some(prefix => path.path.startsWith(prefix)); return path.method !== '_all' && !exclusionPrefixes.some(prefix => path.path.startsWith(prefix));
}); });

Loading…
Cancel
Save