Skip to content

Commit

Permalink
fix: add missing response codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sameen Fatima authored and Sameen Fatima committed Jan 11, 2024
1 parent f9c95bd commit 5f2e7f0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions api-compact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ apigateway_responses: &apigateway_responses
statusCode: "400"
200:
statusCode: "200"
201:
statusCode: "201"
401:
statusCode: "401"
403:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
apigateway_responses:
"200":
statusCode: "200"
"201":
statusCode: "201"
"401":
statusCode: "401"
"403":
Expand Down Expand Up @@ -63,6 +65,8 @@ apigateway_responses_with_mapping_template_for_uuid:
responses:
"200":
description: OK
"201":
description: Created
"400":
description: Bad Request
"401":
Expand Down Expand Up @@ -171,6 +175,8 @@ endpoints:
responses:
"200":
description: OK
"201":
description: Created
"400":
description: Bad Request
"401":
Expand All @@ -187,6 +193,8 @@ endpoints:
responses:
"200":
statusCode: "200"
"201":
statusCode: "201"
"401":
statusCode: "401"
"403":
Expand Down Expand Up @@ -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":
Expand All @@ -359,6 +372,8 @@ endpoints:
responses:
"200":
statusCode: "200"
"201":
statusCode: "201"
"401":
statusCode: "401"
"403":
Expand Down

0 comments on commit 5f2e7f0

Please sign in to comment.