From e0d65d49493227925f0409fdf598dab6d1678581 Mon Sep 17 00:00:00 2001 From: Sameen Fatima Date: Thu, 11 Jan 2024 03:39:54 +0500 Subject: [PATCH] fix: add missing response codes --- api-compact.yaml | 7 +++++++ api.yaml | 15 +++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/api-compact.yaml b/api-compact.yaml index ba6c70c2..ea7adcdf 100644 --- a/api-compact.yaml +++ b/api-compact.yaml @@ -16,6 +16,8 @@ apigateway_responses: &apigateway_responses statusCode: "400" 200: statusCode: "200" + 201: + statusCode: "201" 401: statusCode: "401" 403: @@ -82,6 +84,8 @@ apigateway_responses_with_mapping_template_for_uuid: &apigateway_responses_with_ responses: &responses 200: description: "OK" + 201: + description: "Created" 400: description: "Bad Request" 401: @@ -278,18 +282,21 @@ endpoints: emails: description: "list of learner emails" type: "array" + required: true items: type: "string" description: "user email" course_run_keys: description: "list of courses to enroll learners into" type: "array" + required: true items: type: "string" description: "course run key" notify: description: "Whether to notify learner of their enrollment" type: "boolean" + required: true responses: *responses x-amazon-apigateway-integration: responses: *apigateway_responses diff --git a/api.yaml b/api.yaml index f75a1c66..deae2e64 100644 --- a/api.yaml +++ b/api.yaml @@ -5,6 +5,8 @@ apigateway_responses: "200": statusCode: "200" + "201": + statusCode: "201" "401": statusCode: "401" "403": @@ -63,6 +65,8 @@ apigateway_responses_with_mapping_template_for_uuid: responses: "200": description: OK + "201": + description: Created "400": description: Bad Request "401": @@ -171,6 +175,8 @@ endpoints: responses: "200": description: OK + "201": + description: Created "400": description: Bad Request "401": @@ -187,6 +193,8 @@ endpoints: responses: "200": statusCode: "200" + "201": + statusCode: "201" "401": statusCode: "401" "403": @@ -328,21 +336,26 @@ endpoints: emails: description: list of learner emails type: array + required: true items: type: string description: user email course_run_keys: description: list of courses to enroll learners into type: array + required: true items: type: string description: course run key notify: description: Whether to notify learner of their enrollment type: boolean + required: true responses: "200": description: OK + "201": + description: Created "400": description: Bad Request "401": @@ -359,6 +372,8 @@ endpoints: responses: "200": statusCode: "200" + "201": + statusCode: "201" "401": statusCode: "401" "403":