From 3e5ee16dcd7b0303d8b59477d02379bebd85f200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathana=C3=ABl=20Jourdane?= Date: Mon, 25 May 2020 17:52:12 +0200 Subject: [PATCH] Add arrays bounds --- openapi/components/schemas/poll.yaml | 2 ++ openapi/components/schemas/result.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/openapi/components/schemas/poll.yaml b/openapi/components/schemas/poll.yaml index e1519fc..e3f83cf 100644 --- a/openapi/components/schemas/poll.yaml +++ b/openapi/components/schemas/poll.yaml @@ -19,6 +19,8 @@ properties: grades: type: array description: The grades on which one judges a candidate. + minItems: 2 + maxItems: 10 items: $ref: ./grade.yaml judges: diff --git a/openapi/components/schemas/result.yaml b/openapi/components/schemas/result.yaml index 8e684d4..ad73e95 100644 --- a/openapi/components/schemas/result.yaml +++ b/openapi/components/schemas/result.yaml @@ -10,6 +10,8 @@ properties: according to the grades list, following the order of the candidates array defined when the related poll has been created. examples: [0, 6, 3, 2, 2] + minItems: 2 + maxItems: 20 items: type: integer format: int16