File tree Expand file tree Collapse file tree 3 files changed +10
-18
lines changed Expand file tree Collapse file tree 3 files changed +10
-18
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,11 @@ export class SchemaParserFabric {
3131 this . schemaComponentsMap = schemaComponentsMap ;
3232 this . typeNameFormatter = typeNameFormatter ;
3333 this . templatesWorker = templatesWorker ;
34- this . schemaUtils = new SchemaUtils ( this ) ;
34+ this . schemaUtils = new SchemaUtils (
35+ this . config ,
36+ this . schemaComponentsMap ,
37+ this . typeNameFormatter ,
38+ ) ;
3539 this . schemaFormatters = new SchemaFormatters ( this ) ;
3640 }
3741
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import lodash from "lodash";
33import type { CodeGenConfig } from "../configuration.js" ;
44import { SCHEMA_TYPES } from "../constants.js" ;
55import type { SchemaComponentsMap } from "../schema-components-map.js" ;
6- import type { SchemaWalker } from "../schema-walker.js" ;
76import type { TemplatesWorker } from "../templates-worker.js" ;
87import type { TypeNameFormatter } from "../type-name-formatter.js" ;
98import { sortByProperty } from "../util/sort-by-property.js" ;
@@ -29,7 +28,6 @@ export class SchemaParser {
2928 schemaFormatters : SchemaFormatters ;
3029 schemaUtils : SchemaUtils ;
3130 templatesWorker : TemplatesWorker ;
32- schemaWalker : SchemaWalker ;
3331
3432 typeName ;
3533 schema ;
@@ -42,7 +40,6 @@ export class SchemaParser {
4240 this . templatesWorker = schemaParserFabric . templatesWorker ;
4341 this . schemaComponentsMap = schemaParserFabric . schemaComponentsMap ;
4442 this . typeNameFormatter = schemaParserFabric . typeNameFormatter ;
45- this . schemaWalker = schemaParserFabric . schemaWalker ;
4643 this . schemaFormatters = schemaParserFabric . schemaFormatters ;
4744 this . schemaUtils = schemaParserFabric . schemaUtils ;
4845
Original file line number Diff line number Diff line change @@ -2,25 +2,16 @@ import lodash from "lodash";
22import type { CodeGenConfig } from "../configuration.js" ;
33import { SCHEMA_TYPES } from "../constants.js" ;
44import type { SchemaComponentsMap } from "../schema-components-map.js" ;
5- import type { SchemaWalker } from "../schema-walker.js" ;
65import type { TypeNameFormatter } from "../type-name-formatter.js" ;
76import { internalCase } from "../util/internal-case.js" ;
87import { pascalCase } from "../util/pascal-case.js" ;
98
109export class SchemaUtils {
11- config : CodeGenConfig ;
12- schemaComponentsMap : SchemaComponentsMap ;
13- typeNameFormatter : TypeNameFormatter ;
14-
15- constructor ( {
16- config,
17- schemaComponentsMap,
18- typeNameFormatter,
19- } ) {
20- this . config = config ;
21- this . schemaComponentsMap = schemaComponentsMap ;
22- this . typeNameFormatter = typeNameFormatter ;
23- }
10+ constructor (
11+ public config : CodeGenConfig ,
12+ public schemaComponentsMap : SchemaComponentsMap ,
13+ public typeNameFormatter : TypeNameFormatter ,
14+ ) { }
2415
2516 getRequiredProperties = ( schema ) => {
2617 return lodash . uniq (
You can’t perform that action at this time.
0 commit comments