Archived
2

added GET /sample/number/{number} route

This commit is contained in:
VLE2FE
2020-07-20 16:31:48 +02:00
parent cd81cbf4bd
commit 1a784ade85
7 changed files with 508 additions and 164 deletions

View File

@ -6,6 +6,14 @@ Id:
type: string
example: 5ea0450ed851c30a90e70894
Number:
name: number
in: path
required: true
schema:
type: string
example: Rng740
Name:
name: name
description: has to be URL encoded

View File

@ -140,10 +140,10 @@
application/json:
schema:
$ref: 'api.yaml#/components/schemas/SampleDetail'
400:
$ref: 'api.yaml#/components/responses/400'
401:
$ref: 'api.yaml#/components/responses/401'
403:
$ref: 'api.yaml#/components/responses/403'
404:
$ref: 'api.yaml#/components/responses/404'
500:
@ -201,6 +201,31 @@
500:
$ref: 'api.yaml#/components/responses/500'
/sample/number/{number}:
parameters:
- $ref: 'api.yaml#/components/parameters/Number'
get:
summary: sample details
description: 'Auth: all, levels: read, write, maintain, dev, admin<br>Returns validated as well as new measurements'
x-doc: deleted samples are available only for maintain/admin
tags:
- /sample
responses:
200:
description: samples details
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/SampleDetail'
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'
/sample/restore/{id}:
parameters:
- $ref: 'api.yaml#/components/parameters/Id'