style(openapi): break write API routes into individual files

This commit is contained in:
psychobunny
2020-10-09 11:07:25 -04:00
committed by Andrew Rodrigues
parent ffac3c7902
commit dbb4cfe9d6
144 changed files with 1177 additions and 1160 deletions

View File

@@ -0,0 +1,91 @@
get:
tags:
- admin
summary: Get system cache info
responses:
"200":
description: ""
content:
application/json:
schema:
allOf:
- type: object
properties:
postCache:
type: object
properties:
length:
type: number
max:
type: number
nullable: true
itemCount:
type: number
percentFull:
type: number
avgPostSize:
type: number
hits:
type: string
misses:
type: string
hitRatio:
type: string
groupCache:
type: object
properties:
length:
type: number
max:
type: number
itemCount:
type: number
percentFull:
type: number
hits:
type: string
misses:
type: string
hitRatio:
type: string
localCache:
type: object
properties:
length:
type: number
max:
type: number
itemCount:
type: number
percentFull:
type: number
dump:
type: boolean
hits:
type: string
misses:
type: string
hitRatio:
type: string
objectCache:
type: object
properties:
length:
type: number
max:
type: number
itemCount:
type: number
percentFull:
type: number
hits:
type: string
misses:
type: string
hitRatio:
type: string
required:
- postCache
- groupCache
- localCache
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,14 @@
get:
tags:
- admin
summary: Get database information
responses:
"200":
description: "A JSON object with database status information"
content:
application/json:
schema:
properties: {}
additionalProperties:
type: object
description: Each database configured will have an entry here with information about its runtime status

View File

@@ -0,0 +1,38 @@
get:
tags:
- admin
summary: Get server-side errors
responses:
"200":
description: "A JSON object containing server-side errors"
content:
application/json:
schema:
allOf:
- type: object
properties:
not-found:
type: array
items:
type: object
properties:
value:
type: string
description: Path to the requested URL that returned a 404
score:
type: number
description: The number of times that URL was requested
analytics:
type: object
properties:
not-found:
type: array
description: 404 responses groups by day, from 6 days ago, to present day
items:
type: number
toobusy:
type: array
description: 503 responses groups by day, from 6 days ago, to present day
items:
type: number
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,12 @@
get:
tags:
- admin
summary: Export errors (.csv)
responses:
"200":
description: "A CSV file containing server-side errors"
content:
text/csv:
schema:
type: string
format: binary

View File

@@ -0,0 +1,65 @@
get:
tags:
- admin
summary: Get event log
parameters:
- in: query
name: type
schema:
type: string
description: Event name to filter by
example: config-change
- in: query
name: start
schema:
type: string
description: Start date to filter by
example: ''
- in: query
name: end
schema:
type: string
description: End date to filter by
example: ''
- in: query
name: perPage
schema:
type: string
description: Limit the number of events returned per page
example: 20
responses:
"200":
description: "A JSON object containing "
content:
application/json:
schema:
allOf:
- type: object
properties:
events:
type: array
items:
type: object
properties:
type:
type: string
additionalProperties:
description: Each individual event as added by core/plugins can append their own metadata related to the event
- $ref: ../../../components/schemas/Pagination.yaml#/Pagination
- type: object
properties:
types:
type: array
items:
type: object
properties:
value:
type: string
name:
type: string
selected:
type: boolean
query:
additionalProperties:
description: An object containing the query string parameters, if any
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,45 @@
get:
tags:
- admin
summary: Get active plugin hooks
responses:
"200":
description: "A JSON object containing all hooks with active listeners"
content:
application/json:
schema:
allOf:
- type: object
properties:
hooks:
type: array
items:
type: object
properties:
hookName:
type: string
description: The name of the hook (also the name used in code)
methods:
type: array
items:
type: object
properties:
id:
type: string
description: Plugin listening to this hook
priority:
type: number
description: Priority level, lower priorities are executed earlier
method:
type: string
description: Stringified method for examination
index:
type: string
description: Internal counter used for DOM element ids
index:
type: string
description: Internal counter used for DOM element ids
count:
type: number
description: The number of listeners subscribed to this hook
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -0,0 +1,17 @@
get:
tags:
- admin
summary: Get server-side log output
responses:
"200":
description: "A JSON object containing the server-side log"
content:
application/json:
schema:
allOf:
- type: object
properties:
data:
type: string
description: Output of the server-side log file
- $ref: ../../../components/schemas/CommonProps.yaml#/CommonProps