lina icon indicating copy to clipboard operation
lina copied to clipboard

参数中是数字的 json schema怎么破

Open trevorwang opened this issue 9 years ago • 4 comments

screen shot 2015-04-18 at 12 19 01 pm

Controller声明为string类型的是可以的,但是起不到校验作用啊

trevorwang avatar Apr 18 '15 04:04 trevorwang

没看明白你说的意思啊,能举个例子吗?

On 2015年4月18日, at 下午12:31, Trevor [email protected] wrote:

如何声明为string类型的,起不到校验作用

― Reply to this email directly or view it on GitHub.

windy avatar Apr 18 '15 06:04 windy

@trevorwang ok, 用手机邮箱看不到图. 让我先看看.

windy avatar Apr 18 '15 14:04 windy

@windy 想使用count来控制每次返回的list大小,结果声明为integer就会出现上面的错误

trevorwang avatar Apr 27 '15 02:04 trevorwang

目前 Lina 入口参数都被 Rails 自动转为 string 了, 所以用 integer 就出现了你类似的问题.

这个问题我还要去找个更好的办法处理, 不能粗暴转换. 暂时还没有更好的办法, 暂时用 string 的 format 试试?

Original Message Sender:[email protected] Recipient:windy/[email protected] Cc:yafei [email protected] Date:Monday, Apr 27, 2015 10:30 Subject:Re: [lina] 参数中是数字的 json schema怎么破 (#14)

@windy 想使用count来控制每次返回的list大小,结果声明为integer就会出现上面的错误 — Reply to this email directly or view it on GitHub.

windy avatar Apr 27 '15 04:04 windy