@superhero/http-server-using-oas 4.7.5 → 4.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/index.test.js +24 -10
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
package/index.test.js
CHANGED
|
@@ -111,7 +111,8 @@ suite('@superhero/http-server-using-oas', () =>
|
|
|
111
111
|
{ headers:
|
|
112
112
|
{ ContentType:
|
|
113
113
|
{ required: true,
|
|
114
|
-
schema: { type: 'string' }
|
|
114
|
+
schema: { type: 'string' }
|
|
115
|
+
}
|
|
115
116
|
},
|
|
116
117
|
parameters:
|
|
117
118
|
{ DefaultFoo: { name: 'foo', in: 'query', required: true, schema: { '$ref': '#/components/schemas/String' }, nullable: true, default: null },
|
|
@@ -124,7 +125,8 @@ suite('@superhero/http-server-using-oas', () =>
|
|
|
124
125
|
{ ExampleRequestBody: { '$ref': '#/components/requestBodies/GenericRequestBody' },
|
|
125
126
|
GenericRequestBody:
|
|
126
127
|
{ required: true,
|
|
127
|
-
content: { 'application/json': { schema: { '$ref': '#/components/schemas/Foo' }}}
|
|
128
|
+
content: { 'application/json': { schema: { '$ref': '#/components/schemas/Foo' }}}
|
|
129
|
+
}
|
|
128
130
|
},
|
|
129
131
|
responses:
|
|
130
132
|
{ SuccessResult:
|
|
@@ -134,16 +136,19 @@ suite('@superhero/http-server-using-oas', () =>
|
|
|
134
136
|
},
|
|
135
137
|
BadRequest:
|
|
136
138
|
{ description: 'Bad Request',
|
|
137
|
-
schema: { '$ref': '#/components/schemas/Result' }}
|
|
139
|
+
content: { 'application/json': { schema: { '$ref': '#/components/schemas/Result' }}}
|
|
140
|
+
}
|
|
138
141
|
},
|
|
139
142
|
schemas:
|
|
140
143
|
{ String: { type: 'string' },
|
|
141
144
|
Foo:
|
|
142
145
|
{ type: 'object',
|
|
143
|
-
properties: { foo: { '$ref': '#/components/schemas/String' }}
|
|
146
|
+
properties: { foo: { '$ref': '#/components/schemas/String' }}
|
|
147
|
+
},
|
|
144
148
|
Result:
|
|
145
149
|
{ type: 'object',
|
|
146
|
-
properties: { result: { '$ref': '#/components/schemas/String' } }
|
|
150
|
+
properties: { result: { '$ref': '#/components/schemas/String' } }
|
|
151
|
+
}
|
|
147
152
|
}
|
|
148
153
|
},
|
|
149
154
|
paths:
|
|
@@ -152,21 +157,27 @@ suite('@superhero/http-server-using-oas', () =>
|
|
|
152
157
|
{ parameters: [{ '$ref': '#/components/parameters/DefaultFoo' }],
|
|
153
158
|
responses:
|
|
154
159
|
{ 200: { '$ref': '#/components/responses/SuccessResult' },
|
|
155
|
-
400: { '$ref': '#/components/responses/BadRequest' }
|
|
160
|
+
400: { '$ref': '#/components/responses/BadRequest' }
|
|
161
|
+
}
|
|
162
|
+
}
|
|
156
163
|
},
|
|
157
164
|
'/example/required':
|
|
158
165
|
{ get:
|
|
159
166
|
{ parameters: [{ '$ref': '#/components/parameters/RequiredFoo' }],
|
|
160
167
|
responses:
|
|
161
168
|
{ 200: { '$ref': '#/components/responses/SuccessResult' },
|
|
162
|
-
400: { '$ref': '#/components/responses/BadRequest' }
|
|
169
|
+
400: { '$ref': '#/components/responses/BadRequest' }
|
|
170
|
+
}
|
|
171
|
+
}
|
|
163
172
|
},
|
|
164
173
|
'/example/foo/{foo}':
|
|
165
174
|
{ get:
|
|
166
175
|
{ parameters: [{ '$ref': '#/components/parameters/PathFoo' }],
|
|
167
176
|
responses:
|
|
168
177
|
{ 200: { '$ref': '#/components/responses/SuccessResult' },
|
|
169
|
-
400: { '$ref': '#/components/responses/BadRequest' }
|
|
178
|
+
400: { '$ref': '#/components/responses/BadRequest' }
|
|
179
|
+
}
|
|
180
|
+
}
|
|
170
181
|
},
|
|
171
182
|
'/example':
|
|
172
183
|
{ get:
|
|
@@ -176,13 +187,16 @@ suite('@superhero/http-server-using-oas', () =>
|
|
|
176
187
|
],
|
|
177
188
|
responses:
|
|
178
189
|
{ 200: { '$ref': '#/components/responses/SuccessResult' },
|
|
179
|
-
400: { '$ref': '#/components/responses/BadRequest' }
|
|
190
|
+
400: { '$ref': '#/components/responses/BadRequest' }
|
|
191
|
+
}
|
|
180
192
|
},
|
|
181
193
|
post:
|
|
182
194
|
{ requestBody: { '$ref': '#/components/requestBodies/ExampleRequestBody' },
|
|
183
195
|
responses:
|
|
184
196
|
{ 200: { '$ref': '#/components/responses/SuccessResult' },
|
|
185
|
-
400: { '$ref': '#/components/responses/BadRequest' }}}}
|
|
197
|
+
400: { '$ref': '#/components/responses/BadRequest' }}}}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
186
200
|
|
|
187
201
|
core.locate.config.assign({ oas:specification })
|
|
188
202
|
await core.bootstrap()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superhero/http-server-using-oas",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.6",
|
|
4
4
|
"description": "Integrates the HTTP server and OAS (OpenAPI Specification) @superhero components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"HTTP 2.0",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"test": "syntax-check; node --test --test-reporter=@superhero/audit/reporter --experimental-test-coverage"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@superhero/oas": "4.7.
|
|
27
|
-
"@superhero/http-server": "4.7.
|
|
26
|
+
"@superhero/oas": "4.7.6",
|
|
27
|
+
"@superhero/http-server": "4.7.6"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@superhero/audit": "4.7.
|
|
30
|
+
"@superhero/audit": "4.7.6",
|
|
31
31
|
"@superhero/syntax-check": "0.0.2",
|
|
32
|
-
"@superhero/http-request": "4.7.
|
|
33
|
-
"@superhero/core": "4.7.
|
|
32
|
+
"@superhero/http-request": "4.7.6",
|
|
33
|
+
"@superhero/core": "4.7.6"
|
|
34
34
|
},
|
|
35
35
|
"author": {
|
|
36
36
|
"name": "Erik Landvall",
|