From b59926d71690fc8be8cd2a8026f9ca6fce763cfd Mon Sep 17 00:00:00 2001 From: domi41 Date: Sun, 6 Sep 2020 10:51:19 +0200 Subject: [PATCH] docs: describe polls, using a markdown file --- openapi/components/schemas/poll.md | 2 ++ openapi/components/schemas/poll.yaml | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 openapi/components/schemas/poll.md diff --git a/openapi/components/schemas/poll.md b/openapi/components/schemas/poll.md new file mode 100644 index 0000000..bba9cf7 --- /dev/null +++ b/openapi/components/schemas/poll.md @@ -0,0 +1,2 @@ +A `Poll` is the core model of the application. +A `Poll` exposes a list of `Proposal`s, and `Participant`s may individually give each `Proposal` a `Grade`. (in a `Ballot`) diff --git a/openapi/components/schemas/poll.yaml b/openapi/components/schemas/poll.yaml index 5583138..18566fe 100644 --- a/openapi/components/schemas/poll.yaml +++ b/openapi/components/schemas/poll.yaml @@ -1,5 +1,6 @@ type: object - +description: + $ref: 'poll.md' properties: id: type: string @@ -30,7 +31,9 @@ properties: so you should consider the proposals carefully and with gumption. proposals: type: array - description: The proposals being voted in a poll. + description: > + The proposals being judged by the participants in a poll. + It makes no sense to have less than two proposals in a poll. minItems: 2 maxItems: 20 items: