- add : doc of stories/children

- fix : limiting the number of children with search stories (story_max_records=N in url) respects coll/mask rights
This commit is contained in:
jygaulier
2020-09-17 18:56:19 +02:00
parent 4d4b163def
commit f9fa3e0802
4 changed files with 151 additions and 78 deletions

View File

@@ -118,3 +118,46 @@ paths:
description: Record not found
default:
$ref: 'responses.yaml#/error_response'
'/stories/{sbas_id}/{record_id}/children':
get:
tags:
- story
summary: Returns uri of each record (child) contained in the story ; Optional pagination
description: Returns children of a story
operationId: getRecordById
parameters:
- name: sbas_id
in: path
description: ID of the databox
required: true
schema:
$ref: schemas.yaml#/ID
- name: record_id
in: path
description: ID of the story record
required: true
schema:
$ref: schemas.yaml#/ID
- name: page
in: query
description: page number (default 1)
required: false
schema:
type: integer
- name: per_page
in: query
description: number of children (records uri) per page (default 10)
required: false
schema:
type: integer
responses:
200:
description: ok
content:
application/json:
schema:
$ref: schemas.yaml#/ApiResponse_RecordsUriArray
404:
description: Story (record) not found
default:
$ref: 'responses.yaml#/error_response'

View File

@@ -1,2 +1,15 @@
record_response:
type: object
properties:
200:
description: successful operation
content:
application/json:
schema:
$ref: schemas.yaml#/ApiResponse_record
400:
description: Any other error
404:
description: Record not found
error_response:
description: Any (other) error

View File

@@ -169,4 +169,19 @@ Record:
- video
uuid:
type: string
RecordUri:
type: string
example:
'/api/v3/records/1/48'
RecordsUriArray:
type: array
items:
$ref: '#/RecordUri'
ApiResponse_RecordsUriArray:
type: object
properties:
meta:
$ref: '#/ApiResponse_meta'
response:
$ref: '#/RecordsUriArray'