Skip to content

Commit fb255ba

Browse files
committed
chore: remove commented code
1 parent 7163ab9 commit fb255ba

File tree

1 file changed

+1
-35
lines changed

1 file changed

+1
-35
lines changed

src/bin/compileTS.js

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,44 +11,10 @@ import { compile } from "json-schema-to-typescript";
1111
* await compileTS(esseSchema, "./dist/types.ts");
1212
*/
1313
export 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
{

0 commit comments

Comments
 (0)