1 | openapi: 3.0.0
|
2 | info:
|
3 | description: User Registration
|
4 | version: 1.0.0
|
5 | title: UserRegistrationDemo
|
6 | paths:
|
7 | /api/v1/user:
|
8 | post:
|
9 | summary: adds a user
|
10 | requestBody:
|
11 | content:
|
12 | application/json:
|
13 | schema:
|
14 | $ref: '#/components/schemas/Customer'
|
15 | responses:
|
16 | '201':
|
17 | description: user created
|
18 | headers:
|
19 | Access-Control-Allow-Origin:
|
20 | style: simple
|
21 | explode: false
|
22 | schema:
|
23 | type: string
|
24 | Access-Control-Allow-Methods:
|
25 | style: simple
|
26 | explode: false
|
27 | schema:
|
28 | type: string
|
29 | Access-Control-Allow-Headers:
|
30 | style: simple
|
31 | explode: false
|
32 | schema:
|
33 | type: string
|
34 | x-amazon-apigateway-integration:
|
35 | httpMethod: POST
|
36 | type: mock
|
37 | passthroughBehavior: when_no_match
|
38 | requestTemplates:
|
39 | application/json: |
|
40 | {
|
41 | "statusCode" : 204
|
42 | }
|
43 | responses:
|
44 | 2\d{2}:
|
45 | statusCode: '201'
|
46 | responseParameters:
|
47 | method.response.header.Access-Control-Allow-Headers: '''Content-Type,X-Amz-Date,Authorization,X-Api-Key'''
|
48 | method.response.header.Access-Control-Allow-Methods: '''*'''
|
49 | method.response.header.Access-Control-Allow-Origin: '''*'''
|
50 | options:
|
51 | summary: Provide CORS
|
52 | description: Basic CORS functionality with an aws mocking integration
|
53 | responses:
|
54 | '204':
|
55 | description: No data
|
56 | headers:
|
57 | Access-Control-Allow-Origin:
|
58 | style: simple
|
59 | explode: false
|
60 | schema:
|
61 | type: string
|
62 | Access-Control-Allow-Methods:
|
63 | style: simple
|
64 | explode: false
|
65 | schema:
|
66 | type: string
|
67 | Access-Control-Allow-Headers:
|
68 | style: simple
|
69 | explode: false
|
70 | schema:
|
71 | type: string
|
72 | x-amazon-apigateway-integration:
|
73 | type: mock
|
74 | requestTemplates:
|
75 | application/json: |
|
76 | {
|
77 | "statusCode" : 204
|
78 | }
|
79 | responses:
|
80 | default:
|
81 | statusCode: '204'
|
82 | responseParameters:
|
83 | method.response.header.Access-Control-Allow-Headers: '''Content-Type,X-Amz-Date,Authorization,X-Api-Key'''
|
84 | method.response.header.Access-Control-Allow-Methods: '''*'''
|
85 | method.response.header.Access-Control-Allow-Origin: '''*'''
|
86 | components:
|
87 | schemas:
|
88 | Customer:
|
89 | type: object
|
90 | required:
|
91 | - email_address
|
92 | - password
|
93 | properties:
|
94 | email_address:
|
95 | type: string
|
96 | example: test@example.com
|
97 | password:
|
98 | type: string
|
99 | format: password
|
100 | example: someStrongPassword#
|