We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a969726 commit 0ba48abCopy full SHA for 0ba48ab
1 file changed
lib/process-schema.ts
@@ -342,6 +342,17 @@ export function registerTypesFromSchema(
342
typesAndInterfaces.set(`#/components/schemas/${schemaName}`, typeAlias);
343
}
344
345
+ // deal with boolean things
346
+ else if (schemaObject.type === 'boolean') {
347
+ const typeAlias = typesFile.addTypeAlias({
348
+ name: pascalCase(schemaName),
349
+ isExported: true,
350
+ type: withNullUnion('boolean', schemaObject.nullable),
351
+ });
352
+
353
+ typesAndInterfaces.set(`#/components/schemas/${schemaName}`, typeAlias);
354
+ }
355
356
// deal with arrays of refs
357
else if (schemaObject.type === 'array' && '$ref' in schemaObject.items) {
358
const iface = typesAndInterfaces.get(schemaObject.items.$ref);
0 commit comments