Fork me on GitHub
#ring-swagger
<
2015-10-15
>
shaym14:10:11

@juhoteperi: when sending a number as a header with the following :header-params [delta :- Number ks :- [String] ] i am getting a {"errors":{"delta":"(not (instance? java.lang.Number \"940376\"))"}}

shaym14:10:24

is there a reason why its not getting coerced?

shaym14:10:35

to a number or a long

shaym14:10:10

yep that worked

juhoteperi14:10:11

Number should also work, but perhaps it requires it to be floating point number

juhoteperi14:10:13

Or hmm, in fact Schema doesn't implement coercion for java.lang.Number

shaym14:10:31

Long also works

juhoteperi14:10:01

s/Num = java.lang.Number so should work probably

shaym14:10:36

@juhoteperi: cool tx much !

shaym15:10:06

@juhoteperi: how would i define a header which is an array of strings? i tried "ar :- [String]" and "ar [String]" interestingly the first form worked in body-params

shaym15:10:41

the header on the wire comes as ks:user1,acme123

juhoteperi15:10:53

@shaym: header-params don't support collections, you need to split the string yourself

shaym15:10:15

@juhoteperi: sounds good , ill give it a try

juhoteperi17:10:55

@shaym: I created issue about supporting collections in header params as I closed previous issue when I implemented partial support