Вопрос

I use wash_out from the master branch. Why I can't use identical data types in different soap actions?

Sample:

soap_action "get_groups",
:args   => {:page => :integer},
:return => {:data => [{:id => :integer, :name => :string}], :total => :integer}

soap_action "get_items",
:args   => {:page => :integer},
:return => {:data => [{:id => :integer, :name => :string}], :total => :integer}

Also I tried wrap it in WashOut::Type but it not help.

Error:

ActionView::Template::Error (Duplicate use of `data` type name. Consider using classified types.)
Это было полезно?

Решение

I found a solution for myself. WashOut can't work with nested objects.

Every hash must be replaced with WashOut::Type. It should look like this: {:data => [SomeType], :total => :integer}

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top