openapi-ts-request 1.3.3 → 1.3.4
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/dist/generator/util.js +4 -0
- package/package.json +1 -1
package/dist/generator/util.js
CHANGED
|
@@ -171,6 +171,10 @@ function getDefaultType(schemaObject, namespace = '', schemas) {
|
|
|
171
171
|
return `(${allofList.join(' & ')})`;
|
|
172
172
|
}
|
|
173
173
|
if (schemaObject.type === 'object' || schemaObject.properties) {
|
|
174
|
+
if ((0, lodash_1.isObject)(schemaObject.additionalProperties)) {
|
|
175
|
+
const type = getDefaultType(schemaObject.additionalProperties, namespace, schemas);
|
|
176
|
+
return `Record<string, ${type}>`;
|
|
177
|
+
}
|
|
174
178
|
if (!(0, lodash_1.keys)(schemaObject.properties).length) {
|
|
175
179
|
return 'Record<string, unknown>';
|
|
176
180
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openapi-ts-request",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "Swagger2/OpenAPI3/Apifox to TypeScript/JavaScript, request client(support any client), request mock service, enum and enum translation, react-query/vue-query, type field label, JSON Schemas",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0",
|