todo-backend: add additional basic constraints to API schema

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-05-10 11:09:57 +02:00
parent f41881c623
commit 1bf5f1e376
2 changed files with 6 additions and 0 deletions
@@ -149,6 +149,7 @@ export default {
required: true,
schema: {
type: 'string',
minLength: 1,
description: 'A reference to the entity to list TODO items for',
},
},
@@ -183,6 +184,7 @@ export default {
required: false,
schema: {
type: 'integer',
minimum: 0,
description: 'The offset at which to start listing TODO items',
},
},
@@ -192,6 +194,7 @@ export default {
required: false,
schema: {
type: 'integer',
minimum: 1,
description: 'The number of TODO items to list',
},
},
@@ -96,6 +96,7 @@ paths:
required: true
schema:
type: string
minLength: 1
description: A reference to the entity to list TODO items for
- name: orderBy
in: query
@@ -118,10 +119,12 @@ paths:
required: false
schema:
type: integer
minimum: 0
description: The offset at which to start listing TODO items
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
description: The number of TODO items to list