We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e69b5e commit 45c119cCopy full SHA for 45c119c
1 file changed
lib/process-schema.ts
@@ -2,6 +2,7 @@ import camelcase from 'camelcase';
2
import type $RefParser from 'json-schema-ref-parser';
3
import type { OpenAPIV3 } from 'openapi-types';
4
import {
5
+ CodeBlockWriter,
6
EnumDeclaration,
7
InterfaceDeclaration,
8
OptionalKind,
@@ -54,6 +55,19 @@ export function schemaToType(
54
55
schemaObject.items,
56
);
57
58
+ if (type.type instanceof Function) {
59
+ const typeWriter = type.type;
60
+ return {
61
+ name,
62
+ hasQuestionToken,
63
+ type: (writer: CodeBlockWriter) => {
64
+ writer.write('Array<');
65
+ typeWriter(writer);
66
+ writer.write('>');
67
+ },
68
+ };
69
+ }
70
+
71
return {
72
name,
73
hasQuestionToken,
0 commit comments