File tree Expand file tree Collapse file tree 1 file changed +28
-9
lines changed
Expand file tree Collapse file tree 1 file changed +28
-9
lines changed Original file line number Diff line number Diff line change @@ -74,17 +74,26 @@ test('remove readOnly', function(assert) {
7474 assert . plan ( 1 ) ;
7575
7676 schema = {
77- type : 'string' ,
78- readOnly : true
77+ type : 'object' ,
78+ properties : {
79+ readOnly : {
80+ type : 'string' ,
81+ readOnly : true
82+ }
83+ }
7984 } ;
8085
8186 result = convert ( schema ) ;
8287
8388 expected = {
8489 $schema : 'http://json-schema.org/draft-04/schema#' ,
85- type : 'string'
90+ type : 'object' ,
91+ properties : {
92+ readOnly : {
93+ type : 'string'
94+ }
95+ }
8696 } ;
87-
8897 assert . deepEqual ( result , expected , 'readOnly removed' ) ;
8998} ) ;
9099
@@ -97,17 +106,27 @@ test('remove writeOnly', function(assert) {
97106 assert . plan ( 1 ) ;
98107
99108 schema = {
100- type : 'string' ,
101- format : 'password' ,
102- writeOnly : true
109+ type : 'object' ,
110+ properties : {
111+ test : {
112+ type : 'string' ,
113+ format : 'password' ,
114+ writeOnly : true
115+ }
116+ }
103117 } ;
104118
105119 result = convert ( schema ) ;
106120
107121 expected = {
108122 $schema : 'http://json-schema.org/draft-04/schema#' ,
109- type : 'string' ,
110- format : 'password'
123+ type : 'object' ,
124+ properties : {
125+ test : {
126+ type : 'string' ,
127+ format : 'password'
128+ }
129+ }
111130 } ;
112131
113132 assert . deepEqual ( result , expected , 'writeOnly removed' ) ;
You can’t perform that action at this time.
0 commit comments