@travetto/openapi 3.1.0-rc.4 → 3.1.0-rc.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/package.json +6 -6
- package/src/spec-generate.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/openapi",
|
|
3
|
-
"version": "3.1.0-rc.
|
|
3
|
+
"version": "3.1.0-rc.6",
|
|
4
4
|
"description": "OpenAPI integration support for the Travetto framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rest",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"directory": "module/openapi"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@travetto/config": "^3.1.0-rc.
|
|
30
|
-
"@travetto/rest": "^3.1.0-rc.
|
|
31
|
-
"@travetto/schema": "^3.1.0-rc.
|
|
32
|
-
"@travetto/yaml": "^3.1.0-rc.
|
|
29
|
+
"@travetto/config": "^3.1.0-rc.6",
|
|
30
|
+
"@travetto/rest": "^3.1.0-rc.6",
|
|
31
|
+
"@travetto/schema": "^3.1.0-rc.5",
|
|
32
|
+
"@travetto/yaml": "^3.1.0-rc.3",
|
|
33
33
|
"openapi3-ts": "^3.1.2"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@travetto/cli": "^3.1.0-rc.
|
|
36
|
+
"@travetto/cli": "^3.1.0-rc.6"
|
|
37
37
|
},
|
|
38
38
|
"peerDependenciesMeta": {
|
|
39
39
|
"@travetto/cli": {
|
package/src/spec-generate.ts
CHANGED
|
@@ -273,7 +273,7 @@ export class SpecGenerator {
|
|
|
273
273
|
if (param.location) {
|
|
274
274
|
if (param.location === 'body') {
|
|
275
275
|
return {
|
|
276
|
-
requestBody: field.
|
|
276
|
+
requestBody: field.specifiers?.includes('file') ? this.#buildUploadBody() : this.#getEndpointBody(field, this.#getHeaderValue(ep, 'accepts'))
|
|
277
277
|
};
|
|
278
278
|
} else if (field.type && SchemaRegistry.has(field.type) && (param.location === 'query' || param.location === 'header')) {
|
|
279
279
|
return { parameters: this.#schemaToDotParams(param.location, field) };
|
|
@@ -286,7 +286,7 @@ export class SpecGenerator {
|
|
|
286
286
|
schema: field.array ? { type: 'array', items: this.#getType(field) } : this.#getType(field)
|
|
287
287
|
};
|
|
288
288
|
return { parameters: [epParam] };
|
|
289
|
-
} else if (field.
|
|
289
|
+
} else if (field.specifiers?.includes('file')) {
|
|
290
290
|
return { requestBody: this.#buildUploadBody() };
|
|
291
291
|
}
|
|
292
292
|
}
|