File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 5353}
5454```
5555
56+ At the moment, this library cannot handle more than one item in the array, and so will default to using the first item only.
57+
5658### Types in an array to OneOf
5759
5860This will convert a schema of:
8890}
8991```
9092
93+ Where an array contains ` null ` , it will now set ` nullable ` against all types:
94+
95+ ``` json
96+ {
97+ "type" : " object" ,
98+ "properties" : {
99+ "example" : {
100+ "type" : [" string" , " number" , " null" ],
101+ }
102+ }
103+ }
104+ ```
105+
106+ To:
107+
108+ ``` json
109+ {
110+ "type" : " object" ,
111+ "properties" : {
112+ "example" : {
113+ "oneOf" : [
114+ {
115+ "type" : " string" ,
116+ "nullable" : true
117+ },
118+ {
119+ "type" : " number" ,
120+ "nullable" : true
121+ }
122+ ]
123+ }
124+ }
125+ }
126+ ```
127+
91128### Const to enum
92129
93130This will convert a schema of:
You can’t perform that action at this time.
0 commit comments