@travetto/openapi 6.0.0 → 6.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/openapi",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "description": "OpenAPI integration support for the Travetto framework",
5
5
  "keywords": [
6
6
  "web",
@@ -28,7 +28,7 @@
28
28
  "dependencies": {
29
29
  "@travetto/config": "^6.0.0",
30
30
  "@travetto/schema": "^6.0.0",
31
- "@travetto/web": "^6.0.0",
31
+ "@travetto/web": "^6.0.2",
32
32
  "openapi3-ts": "^4.4.0",
33
33
  "yaml": "^2.7.1"
34
34
  },
@@ -267,7 +267,7 @@ export class OpenapiVisitor implements ControllerVisitor<GeneratedSpec> {
267
267
  const complex = field.type && SchemaRegistry.has(field.type);
268
268
  if (param.location) {
269
269
  if (param.location === 'body') {
270
- const acceptsMime = ep.responseHeaderMap.get('accepts');
270
+ const acceptsMime = ep.finalizedResponseHeaders.get('accepts');
271
271
  return {
272
272
  requestBody: field.specifiers?.includes('file') ? this.#buildUploadBody() : this.#getEndpointBody(field, acceptsMime)
273
273
  };
@@ -305,7 +305,7 @@ export class OpenapiVisitor implements ControllerVisitor<GeneratedSpec> {
305
305
  parameters: []
306
306
  };
307
307
 
308
- const contentTypeMime = ep.responseHeaderMap.get('content-type');
308
+ const contentTypeMime = ep.finalizedResponseHeaders.get('content-type');
309
309
  const pConf = this.#getEndpointBody(ep.responseType, contentTypeMime);
310
310
  const code = Object.keys(pConf.content).length ? 200 : 201;
311
311
  op.responses![code] = pConf;