@@ -57,28 +57,28 @@ describe('getType', () => {
57
57
58
58
it ( 'should support dot' , ( ) => {
59
59
const type = getType ( '#/components/schemas/model.000' ) ;
60
- expect ( type . type ) . toEqual ( 'model_000 ' ) ;
61
- expect ( type . base ) . toEqual ( 'model_000 ' ) ;
60
+ expect ( type . type ) . toEqual ( 'Model000 ' ) ;
61
+ expect ( type . base ) . toEqual ( 'Model000 ' ) ;
62
62
expect ( type . template ) . toEqual ( null ) ;
63
- expect ( type . imports ) . toEqual ( [ 'model_000 ' ] ) ;
63
+ expect ( type . imports ) . toEqual ( [ 'Model000 ' ] ) ;
64
64
expect ( type . isNullable ) . toEqual ( false ) ;
65
65
} ) ;
66
66
67
67
it ( 'should support dashes' , ( ) => {
68
68
const type = getType ( '#/components/schemas/some_special-schema' ) ;
69
- expect ( type . type ) . toEqual ( 'some_special_schema ' ) ;
70
- expect ( type . base ) . toEqual ( 'some_special_schema ' ) ;
69
+ expect ( type . type ) . toEqual ( 'SomeSpecialSchema ' ) ;
70
+ expect ( type . base ) . toEqual ( 'SomeSpecialSchema ' ) ;
71
71
expect ( type . template ) . toEqual ( null ) ;
72
- expect ( type . imports ) . toEqual ( [ 'some_special_schema ' ] ) ;
72
+ expect ( type . imports ) . toEqual ( [ 'SomeSpecialSchema ' ] ) ;
73
73
expect ( type . isNullable ) . toEqual ( false ) ;
74
74
} ) ;
75
75
76
76
it ( 'should support dollar sign' , ( ) => {
77
77
const type = getType ( '#/components/schemas/$some+special+schema' ) ;
78
- expect ( type . type ) . toEqual ( '$some_special_schema ' ) ;
79
- expect ( type . base ) . toEqual ( '$some_special_schema ' ) ;
78
+ expect ( type . type ) . toEqual ( '$SomeSpecialSchema ' ) ;
79
+ expect ( type . base ) . toEqual ( '$SomeSpecialSchema ' ) ;
80
80
expect ( type . template ) . toEqual ( null ) ;
81
- expect ( type . imports ) . toEqual ( [ '$some_special_schema ' ] ) ;
81
+ expect ( type . imports ) . toEqual ( [ '$SomeSpecialSchema ' ] ) ;
82
82
expect ( type . isNullable ) . toEqual ( false ) ;
83
83
} ) ;
84
84
0 commit comments