From 6fcb06ad7f665394526d21ebee6fa15d9c37231a Mon Sep 17 00:00:00 2001 From: Kavika Date: Tue, 3 Dec 2024 01:55:02 +1100 Subject: [PATCH] added `Answer`-related schemas to api.yaml --- backend/api.yaml | 64 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/backend/api.yaml b/backend/api.yaml index 729d4030..6e6433c5 100644 --- a/backend/api.yaml +++ b/backend/api.yaml @@ -1508,7 +1508,7 @@ paths: schema: properties: application: - type: + type: $ref: '#components/schemas/ApplicationDetails' '401': description: Not logged in. @@ -1638,6 +1638,68 @@ paths: components: schemas: + Answer: + type: object + properties: + id: + type: integer + format: int64 + example: 6996987893965227483 + question_id: + type: integer + format: int64 + example: 6996987893965227483 + answer_type: + type: string + enum: + - ShortAnswer + - MultiChoice + - MultiSelect + - DropDown + - Ranking + data: + oneOf: + - type: string + example: I am passionate about events + - type: integer + example: 6996987893965227483 + - type: array + format: int64 + example: [6996987893965227483, 69969829832652228374, 6996987893965228374] + created_at: + type: string + example: 2024-03-15T18:25:43.511Z + updated_at: + type: string + example: 2024-03-15T18:25:43.511Z + + NewAnswer: + type: object + properties: + question_id: + type: integer + format: int64 + example: 6996987893965262849 + answer_type: + type: string + enum: + - ShortAnswer + - MultiChoice + - MultiSelect + - DropDown + - Ranking + data: + oneOf: + - type: string + example: I am passionate about events + - type: integer + example: 6996987893965227483 + - type: array + format: int64 + example: [6996987893965227483, 69969829832652228374, 6996987893965228374] + + + ApplicationStatus: type: string enum: