diff options
author | 2020-12-12 14:38:19 +0000 | |
---|---|---|
committer | 2020-12-12 14:38:19 +0000 | |
commit | 42fbba0319fa3cf31baabc7474a030f42ca8b30e (patch) | |
tree | cfa3b6e6a57de4278027e254385ddc759496b2b9 | |
parent | Merge pull request #17 from python-discord/ks123/response-model-endpoint (diff) | |
parent | Merge branch 'main' into ks123/form-name-description (diff) |
Merge pull request #18 from python-discord/ks123/form-name-description
-rw-r--r-- | SCHEMA.md | 9 | ||||
-rw-r--r-- | backend/models/form.py | 2 |
2 files changed, 7 insertions, 4 deletions
@@ -14,10 +14,11 @@ In this document: | Field | Type | Description | Example | | ----------- | ---------------------------------------- | ----------------------------------------------------------------------------------------- | --------------------------- | -| `id` | Unique identifier | A user selected, unique, descriptive identifier (used in URL routes, so no spaces) | `"ban-appeals"` | -| `features` | List of [form features](#form-features) | A list of features to change the behaviour of the form, described in the features section | `["OPEN", "COLLECT_EMAIL"]` | -| `questions` | List of [form questions](#form-question) | The list of questions to render on a specific form | Too long! See below | -| | | | | +| `id` | Unique identifier | A user selected, unique, descriptive identifier (used in URL routes, so no spaces) | `"ban-appeals"` | +| `features` | List of [form features](#form-features) | A list of features to change the behaviour of the form, described in the features section | `["OPEN", "COLLECT_EMAIL"]` | +| `questions` | List of [form questions](#form-question) | The list of questions to render on a specific form | Too long! See below | +| `name` | String | Name of the form | `"Summer Code Jam 2100"` | +| `description` | String | Form description | `"This is my amazing form description."` | ### Form features diff --git a/backend/models/form.py b/backend/models/form.py index a8c5f92..8d7fe9b 100644 --- a/backend/models/form.py +++ b/backend/models/form.py @@ -12,6 +12,8 @@ class Form(BaseModel): id: str = Field(alias="_id") features: t.List[str] questions: t.List[Question] + name: str + description: str class Config: allow_population_by_field_name = True |