File tree Expand file tree Collapse file tree 1 file changed +1
-35
lines changed Expand file tree Collapse file tree 1 file changed +1
-35
lines changed Original file line number Diff line number Diff line change @@ -11,44 +11,10 @@ import { compile } from "json-schema-to-typescript";
1111 * await compileTS(esseSchema, "./dist/types.ts");
1212 */
1313export async function compileTS ( globalSchema , savePath ) {
14- const preparedDefinitions = Object . entries ( globalSchema . definitions ) ;
15- // .reduce(
16- // (newDefinitions, [key, schema]) => {
17- // if (schema.allOf && schema.properties) {
18- // /**
19- // * The current version of json-schema-to-typescript ignores properties if there is allOf array in the schema.
20- // * To fix the issue here we are creating a separate schema from properties and add it to the allOf array
21- // */
22- // return [
23- // ...newDefinitions,
24- // [
25- // key,
26- // {
27- // ...schema,
28- // allOf: [...schema.allOf, makeFlatSchemaRef(`${schema.$id}-properties`)],
29- // properties: null,
30- // },
31- // ],
32- // [
33- // makeFlatSchemaKey(`${schema.$id}-properties`),
34- // {
35- // $id: `${schema.$id}-properties`,
36- // type: "object",
37- // properties: schema.properties,
38- // },
39- // ],
40- // ];
41- // }
42-
43- // return [...newDefinitions, [key, schema]];
44- // },
45- // [],
46- // );
47-
4814 const compiled = await compile (
4915 {
5016 ...globalSchema ,
51- definitions : Object . fromEntries ( preparedDefinitions ) ,
17+ definitions : globalSchema . definitions ,
5218 } ,
5319 "" ,
5420 {
You can’t perform that action at this time.
0 commit comments