forked from ramosbugs/openapi-lambda-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi_lambda_test__tests__openapi-apigw.yaml.snap
More file actions
169 lines (168 loc) · 3.83 KB
/
openapi_lambda_test__tests__openapi-apigw.yaml.snap
File metadata and controls
169 lines (168 loc) · 3.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
---
source: openapi-lambda-test/src/lib.rs
expression: openapi_apigw_contents
---
openapi: 3.0.2
info:
title: Integration test
version: 0.1.0
paths:
/foo:
post:
tags:
- foo
operationId: createFoo
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateFooJsonRequestBody"
required: true
responses:
"200":
$ref: "#/components/responses/FooOk"
x-amazon-apigateway-integration:
httpMethod: POST
type: aws_proxy
uri:
"Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${FooApiFunction.Alias}/invocations"
"/foo/{foo_id}":
get:
tags:
- foo
operationId: getFoo
parameters:
- in: path
name: foo_id
required: true
schema:
type: string
style: simple
responses:
"200":
$ref: "#/components/responses/FooOk"
security:
- {}
x-amazon-apigateway-integration:
httpMethod: POST
type: aws_proxy
uri:
"Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${FooApiFunction.Alias}/invocations"
/bar:
post:
tags:
- bar
operationId: createBar
parameters:
- in: query
name: barId
required: true
schema:
type: integer
format: "crate::types::BarId"
style: form
- $ref: "#/components/parameters/SortBy"
- in: query
name: type
description: Bar type
schema:
$ref: "#/components/schemas/CreateBarTypeParam"
style: form
- in: query
name: type-array
description: Bar array type
schema:
type: array
items:
$ref: "#/components/schemas/CreateBarTypeArrayParamItem"
style: form
- in: header
name: x-bar
schema:
type: string
style: simple
requestBody:
content:
application/octet-stream: {}
required: true
responses:
default:
description: Default response
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/Foo"
"400":
description: Bad request
content:
text/plain:
schema:
type: string
"404":
description: Not found
x-amazon-apigateway-integration:
httpMethod: POST
type: aws_proxy
uri:
"Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${BarApiFunction.Alias}/invocations"
components:
schemas:
Foo:
type: object
properties:
foo_id:
type: string
type:
type: string
description:
type: string
required:
- foo_id
- type
sort-by:
type: string
enum:
- name
- role
- status
- self
CreateFooJsonRequestBody:
type: object
properties:
name:
type: string
required:
- name
CreateBarTypeParam:
type: string
enum:
- a
- B
- "1"
- ""
CreateBarTypeArrayParamItem:
type: string
enum:
- a
- B
- "1"
- ""
responses:
FooOk:
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/Foo"
parameters:
SortBy:
in: query
name: sortBy
schema:
$ref: "#/components/schemas/sort-by"
style: form
tags:
- name: foo
- name: bar