Skip to content

Commit

Permalink
feat(openapi): refactor into indiv. files to match API & tpl routing
Browse files Browse the repository at this point in the history
  • Loading branch information
psychobunny committed Sep 29, 2020
1 parent c7d2773 commit ffbf2d6
Show file tree
Hide file tree
Showing 125 changed files with 8,339 additions and 8,224 deletions.
91 changes: 91 additions & 0 deletions public/openapi/api/admin/advanced/cache.yaml
@@ -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
14 changes: 14 additions & 0 deletions public/openapi/api/admin/advanced/database.yaml
@@ -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
38 changes: 38 additions & 0 deletions public/openapi/api/admin/advanced/errors.yaml
@@ -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
12 changes: 12 additions & 0 deletions public/openapi/api/admin/advanced/errors/export.yaml
@@ -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
65 changes: 65 additions & 0 deletions public/openapi/api/admin/advanced/events.yaml
@@ -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
45 changes: 45 additions & 0 deletions public/openapi/api/admin/advanced/hooks.yaml
@@ -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
17 changes: 17 additions & 0 deletions public/openapi/api/admin/advanced/logs.yaml
@@ -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
58 changes: 58 additions & 0 deletions public/openapi/api/admin/analytics.yaml
@@ -0,0 +1,58 @@
get:
tags:
- admin
summary: Get site analytics
parameters:
- in: query
name: units
schema:
type: string
enum: [hours, days]
description: Whether to display dashboard data segmented daily or hourly
example: days
- in: query
name: until
schema:
type: number
description: A UNIX timestamp denoting the end of the analytics reporting period
example: ''
- in: query
name: count
schema:
type: number
description: The number of entries to return (e.g. if `units` is `hourly`, and `count` is `24`, the result set will contain 24 hours' worth of analytics)
example: 20
responses:
"200":
description: "A JSON object containing analytics data"
content:
application/json:
schema:
type: object
properties:
query:
additionalProperties:
description: The query string passed in
result:
type: object
properties:
uniquevisitors:
type: array
items:
type: number
pageviews:
type: array
items:
type: number
pageviews:registered:
type: array
items:
type: number
pageviews:bot:
type: array
items:
type: number
pageviews:guest:
type: array
items:
type: number
18 changes: 18 additions & 0 deletions public/openapi/api/admin/appearance/term.yaml
@@ -0,0 +1,18 @@
get:
tags:
- admin
summary: Get appearance settings
parameters:
- name: term
in: path
required: true
schema:
type: string
example: themes
responses:
"200":
description: ""
content:
application/json:
schema:
$ref: ../../../components/schemas/CommonProps.yaml#/CommonProps

0 comments on commit ffbf2d6

Please sign in to comment.