@@ -53,8 +53,8 @@ export default async () => {
5353 things : {
5454 type : {
5555 arrayOf : {
56- oneOf : { b : 'Bar' , f : 'Foo' } ,
57- resolveType : ( { id } ) => ( id ? 'f ' : 'b ' )
56+ oneOf : { Bar : 'Bar' , Foo : 'Foo' } ,
57+ resolveType : ( { id } ) => ( id ? 'Foo ' : 'Bar ' )
5858 } ,
5959 minLength : 1 ,
6060 maxLength : 10
@@ -84,12 +84,12 @@ export default async () => {
8484 } ,
8585 type : {
8686 oneOf : {
87- String : { type : 'String' , typeInput : { maxLength : 3 } } ,
87+ str : { type : 'String' , typeInput : { maxLength : 3 } } ,
8888 ThingA,
8989 ThingB
9090 } ,
9191 resolveType : val =>
92- typeof val === 'string' ? 'String ' : val . a ? 'ThingA' : 'ThingB'
92+ typeof val === 'string' ? 'str ' : val . a ? 'ThingA' : 'ThingB'
9393 } ,
9494 resolve : ( { input : { thing } } ) => thing
9595 } ,
@@ -100,8 +100,9 @@ export default async () => {
100100 nullableArrayOf : { nullable : { arrayOf : 'String' } } ,
101101 nullableOneOf : {
102102 nullable : {
103- oneOf : { string : 'String' , number : 'Number' } ,
104- resolveType : value => typeof value
103+ oneOf : { String : 'String' , Number : 'Number' } ,
104+ resolveType : value =>
105+ typeof value === 'number' ? 'Number' : 'String'
105106 }
106107 } ,
107108 arrayOfStrings : {
@@ -140,8 +141,9 @@ export default async () => {
140141 object : {
141142 id : {
142143 type : {
143- oneOf : { number : 'Number' , string : 'String' } ,
144- resolveType : value => typeof value
144+ oneOf : { Number : 'Number' , String : 'String' } ,
145+ resolveType : value =>
146+ typeof value === 'number' ? 'Number' : 'String'
145147 }
146148 } ,
147149 subFoo : {
@@ -227,13 +229,13 @@ export default async () => {
227229 nullableStringF : { _ : 'nullableStringArgs' , $ : { string : ' ' } } ,
228230 selfLink : { selfLinkWithAddition : { addition : { } } } ,
229231 things : {
230- _on_f : {
232+ _on_Foo : {
231233 _type : { } ,
232234 id : { } ,
233235 name : { $ : { separator : ' ' } } ,
234236 sub : { _ : 'subFoo' , id : { } , subSub : { _ : 'subFoo' , id : { } } }
235237 } ,
236- _on_b : { _type : { } , color : { } }
238+ _on_Bar : { _type : { } , color : { } }
237239 } ,
238240 oneOfArgsString : { _ : 'oneOfArgs' , $ : { thing : 'str' } } ,
239241 oneOfArgsA : {
0 commit comments