@wx-sab/renkei 1.3.1 → 1.3.3
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/lib/core/generate.js +6 -0
- package/package.json +1 -1
- package/templates/api.ejs +1 -1
package/lib/core/generate.js
CHANGED
|
@@ -101,6 +101,12 @@ const generate = (conf) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
101
101
|
SKIP_ROUTE_MARKER: config_utils_1.SKIP_ROUTE_MARKER });
|
|
102
102
|
},
|
|
103
103
|
onParseSchema(originalSchema, parsedSchema) {
|
|
104
|
+
if (originalSchema.format === 'int64' ||
|
|
105
|
+
originalSchema.format === 'long') {
|
|
106
|
+
if (typeof parsedSchema.content === 'string') {
|
|
107
|
+
return Object.assign(Object.assign({}, parsedSchema), { content: parsedSchema.content.replace(/\bnumber\b/g, 'number | string') });
|
|
108
|
+
}
|
|
109
|
+
}
|
|
104
110
|
if (parsedSchema.name === "any" &&
|
|
105
111
|
typeof parsedSchema.content === "string" &&
|
|
106
112
|
parsedSchema.$ref) {
|
package/package.json
CHANGED
package/templates/api.ejs
CHANGED