implemented changelog
This commit is contained in:
@ -62,7 +62,7 @@ tags:
|
||||
|
||||
paths:
|
||||
allOf:
|
||||
- $ref: 'others.yaml'
|
||||
- $ref: 'root.yaml'
|
||||
- $ref: 'sample.yaml'
|
||||
- $ref: 'material.yaml'
|
||||
- $ref: 'measurement.yaml'
|
||||
|
@ -1,43 +0,0 @@
|
||||
/:
|
||||
get:
|
||||
summary: Root method
|
||||
description: 'Auth: none'
|
||||
tags:
|
||||
- /
|
||||
security: []
|
||||
responses:
|
||||
200:
|
||||
description: Server is working
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
example: 'API server up and running!'
|
||||
500:
|
||||
$ref: 'api.yaml#/components/responses/500'
|
||||
|
||||
/authorized:
|
||||
get:
|
||||
summary: Checks authorization
|
||||
description: 'Auth: all, levels: read, write, maintain, dev, admin'
|
||||
tags:
|
||||
- /
|
||||
responses:
|
||||
200:
|
||||
description: Authorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
example: 'Authorization successful'
|
||||
method:
|
||||
type: string
|
||||
example: 'basic'
|
||||
401:
|
||||
$ref: 'api.yaml#/components/responses/401'
|
||||
500:
|
||||
$ref: 'api.yaml#/components/responses/500'
|
102
api/root.yaml
Normal file
102
api/root.yaml
Normal file
@ -0,0 +1,102 @@
|
||||
/:
|
||||
get:
|
||||
summary: Root method
|
||||
description: 'Auth: none'
|
||||
tags:
|
||||
- /
|
||||
security: []
|
||||
responses:
|
||||
200:
|
||||
description: Server is working
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
example: 'API server up and running!'
|
||||
500:
|
||||
$ref: 'api.yaml#/components/responses/500'
|
||||
|
||||
/authorized:
|
||||
get:
|
||||
summary: Checks authorization
|
||||
description: 'Auth: all, levels: read, write, maintain, dev, admin'
|
||||
tags:
|
||||
- /
|
||||
responses:
|
||||
200:
|
||||
description: Authorized
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
example: 'Authorization successful'
|
||||
method:
|
||||
type: string
|
||||
example: 'basic'
|
||||
401:
|
||||
$ref: 'api.yaml#/components/responses/401'
|
||||
500:
|
||||
$ref: 'api.yaml#/components/responses/500'
|
||||
|
||||
/changelog/{timestamp}/{page}/{pagesize}:
|
||||
parameters:
|
||||
- name: timestamp
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 1970-01-01T00:00:00.000Z
|
||||
- name: page
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: number
|
||||
example: 3
|
||||
- name: pagesize
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: number
|
||||
example: 30
|
||||
get:
|
||||
summary: get changelog
|
||||
description: 'Auth: basic, levels: maintain, admin<br>Displays all logs older than timestamp, sorted by date descending, page defaults to 0, pagesize defaults to 25<br>Avoid using high page numbers for older logs, better use an older timestamp'
|
||||
tags:
|
||||
- /
|
||||
responses:
|
||||
200:
|
||||
description: Changelog
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
date:
|
||||
type: string
|
||||
example: 1970-01-01T00:00:00.000Z
|
||||
action:
|
||||
type: string
|
||||
example: PUT /sample/400000000000000000000001
|
||||
collection:
|
||||
type: string
|
||||
example: samples
|
||||
conditions:
|
||||
type: object
|
||||
example:
|
||||
_id: '400000000000000000000001'
|
||||
data:
|
||||
type: object
|
||||
example:
|
||||
type: part
|
||||
status: 0
|
||||
401:
|
||||
$ref: 'api.yaml#/components/responses/401'
|
||||
403:
|
||||
$ref: 'api.yaml#/components/responses/403'
|
||||
404:
|
||||
$ref: 'api.yaml#/components/responses/404'
|
||||
500:
|
||||
$ref: 'api.yaml#/components/responses/500'
|
Reference in New Issue
Block a user