We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e44093 commit 6e2ac36Copy full SHA for 6e2ac36
.changeset/fresh-yaks-try.md
@@ -0,0 +1,5 @@
1
+---
2
+'openapi-ts-request': patch
3
4
+
5
+fix: fix bug #294
src/generator/util.ts
@@ -237,6 +237,16 @@ export function getDefaultType(
237
}
238
239
if (schemaObject.type === 'object' || schemaObject.properties) {
240
+ if (isObject(schemaObject.additionalProperties)) {
241
+ const type = getDefaultType(
242
+ schemaObject.additionalProperties,
243
+ namespace,
244
+ schemas
245
+ );
246
247
+ return `Record<string, ${type}>`;
248
+ }
249
250
if (!keys(schemaObject.properties).length) {
251
return 'Record<string, unknown>';
252
0 commit comments