@travetto/openapi 3.1.7 → 3.1.8
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 +5 -5
- package/src/spec-generate.ts +2 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/openapi",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.8",
|
|
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.
|
|
30
|
-
"@travetto/rest": "^3.1.
|
|
31
|
-
"@travetto/schema": "^3.1.
|
|
29
|
+
"@travetto/config": "^3.1.3",
|
|
30
|
+
"@travetto/rest": "^3.1.5",
|
|
31
|
+
"@travetto/schema": "^3.1.3",
|
|
32
32
|
"@travetto/yaml": "^3.1.1",
|
|
33
33
|
"openapi3-ts": "^3.1.2"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@travetto/cli": "^3.1.
|
|
36
|
+
"@travetto/cli": "^3.1.3",
|
|
37
37
|
"@travetto/command": "^3.1.2"
|
|
38
38
|
},
|
|
39
39
|
"peerDependenciesMeta": {
|
package/src/spec-generate.ts
CHANGED
|
@@ -228,7 +228,7 @@ export class SpecGenerator {
|
|
|
228
228
|
if (RootIndex.getFunctionMetadata(type)?.abstract) {
|
|
229
229
|
const map = SchemaRegistry.getSubTypesForClass(type);
|
|
230
230
|
if (map) {
|
|
231
|
-
extra.oneOf =
|
|
231
|
+
extra.oneOf = map.map(c => {
|
|
232
232
|
this.#processSchema(c);
|
|
233
233
|
return this.#getType(c);
|
|
234
234
|
});
|
|
@@ -336,9 +336,7 @@ export class SpecGenerator {
|
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
-
const epPath = (
|
|
340
|
-
!ep.path ? '/' : typeof ep.path === 'string' ? ep.path : ep.path.source
|
|
341
|
-
).replace(/:([A-Za-z0-9_]+)\b/g, (__, param) => `{${param}}`);
|
|
339
|
+
const epPath = (!ep.path ? '/' : ep.path).replace(/:([A-Za-z0-9_]+)\b/g, (__, param) => `{${param}}`);
|
|
342
340
|
|
|
343
341
|
const key = `${ctrl.basePath}${epPath}`.replace(/[\/]+/g, '/');
|
|
344
342
|
|