@elysiajs/openapi 1.3.6-exp.0 → 1.3.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/bunfig.toml +2 -0
- package/dist/cjs/gen/index.js +7 -5
- package/dist/gen/index.mjs +7 -5
- package/package.json +1 -1
package/bunfig.toml
ADDED
package/dist/cjs/gen/index.js
CHANGED
|
@@ -95,14 +95,16 @@ var fromTypes = (targetFilePath, {
|
|
|
95
95
|
instance.indexOf("}, {", 3)
|
|
96
96
|
) + "}\n}\n";
|
|
97
97
|
const routes = {};
|
|
98
|
-
for (
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
for (const route of routesString.slice(1).split("} & {")) {
|
|
99
|
+
let schema = (0, import_typemap.TypeBox)(`{${route}}}`);
|
|
100
|
+
if (schema.type !== "object") {
|
|
101
|
+
schema = (0, import_typemap.TypeBox)(`{${route}}`);
|
|
102
|
+
if (schema.type !== "object") continue;
|
|
103
|
+
}
|
|
102
104
|
const paths = [];
|
|
103
105
|
while (true) {
|
|
104
106
|
const keys = Object.keys(schema.properties);
|
|
105
|
-
if (
|
|
107
|
+
if (keys.length !== 1) break;
|
|
106
108
|
paths.push(keys[0]);
|
|
107
109
|
schema = schema.properties[keys[0]];
|
|
108
110
|
if (!schema?.properties) break;
|
package/dist/gen/index.mjs
CHANGED
|
@@ -77,14 +77,16 @@ var fromTypes = (targetFilePath, {
|
|
|
77
77
|
instance.indexOf("}, {", 3)
|
|
78
78
|
) + "}\n}\n";
|
|
79
79
|
const routes = {};
|
|
80
|
-
for (
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
for (const route of routesString.slice(1).split("} & {")) {
|
|
81
|
+
let schema = TypeBox(`{${route}}}`);
|
|
82
|
+
if (schema.type !== "object") {
|
|
83
|
+
schema = TypeBox(`{${route}}`);
|
|
84
|
+
if (schema.type !== "object") continue;
|
|
85
|
+
}
|
|
84
86
|
const paths = [];
|
|
85
87
|
while (true) {
|
|
86
88
|
const keys = Object.keys(schema.properties);
|
|
87
|
-
if (
|
|
89
|
+
if (keys.length !== 1) break;
|
|
88
90
|
paths.push(keys[0]);
|
|
89
91
|
schema = schema.properties[keys[0]];
|
|
90
92
|
if (!schema?.properties) break;
|