website cleanup
This commit is contained in:
@@ -173,6 +173,10 @@ function collectDependencies(schema: any, deps: Set<string>, allSchemas: Record<
|
||||
collectDependencies(propSchema, deps, allSchemas);
|
||||
}
|
||||
}
|
||||
|
||||
if (schema.additionalProperties) {
|
||||
collectDependencies(schema.additionalProperties, deps, allSchemas);
|
||||
}
|
||||
|
||||
if (schema.oneOf) {
|
||||
for (const subSchema of schema.oneOf) {
|
||||
@@ -206,6 +210,11 @@ function schemaToTypeString(schema: any): string {
|
||||
}
|
||||
|
||||
if (schema.type === 'object') {
|
||||
if (schema.additionalProperties) {
|
||||
const valueType = schemaToTypeString(schema.additionalProperties);
|
||||
return `Record<string, ${valueType}>`;
|
||||
}
|
||||
|
||||
if (schema.properties) {
|
||||
// Inline object type
|
||||
const props = Object.entries(schema.properties)
|
||||
@@ -243,4 +252,4 @@ function schemaToTypeString(schema: any): string {
|
||||
}
|
||||
}
|
||||
|
||||
generateTypes().catch(console.error);
|
||||
generateTypes().catch(console.error);
|
||||
|
||||
Reference in New Issue
Block a user