You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are implementing a V2 of the Rails API using rails-api (eg: http://localhost:3000/v2/people). In V1 we used AMS and worked nicely for us. Now going into V2, we need to isolate our AMS as V2 will have its own AMS contents. I tried namespacing it like so:
Then we explicitly specify it in the render like so: render json:@person, serializer:V2::PersonSerializer. That worked great; however, the issue with the has_many :bids is looking at the original (V1) BidSerializer instead of V2::BidSerializer.
I googled for versioning with AMS and looks like there are discussions going on but hasn't been settled?
Meanwhile, any tips on how I should move forward with V2 implementation without having V1 take over?
Any tips are GREATLY appreciated.
The text was updated successfully, but these errors were encountered:
My experience was that has_many with explicit serializer was not working correctly in 0.10.x current master. See PR #821 for a patch that worked for me.
Using the 0.10.x current master; Rails 4.2.
We are implementing a V2 of the Rails API using rails-api (eg: http://localhost:3000/v2/people). In V1 we used AMS and worked nicely for us. Now going into V2, we need to isolate our AMS as V2 will have its own AMS contents. I tried namespacing it like so:
Then we explicitly specify it in the render like so:
render json:@person, serializer:V2::PersonSerializer
. That worked great; however, the issue with thehas_many :bids
is looking at the original (V1) BidSerializer instead of V2::BidSerializer.I googled for versioning with AMS and looks like there are discussions going on but hasn't been settled?
Meanwhile, any tips on how I should move forward with V2 implementation without having V1 take over?
Any tips are GREATLY appreciated.
The text was updated successfully, but these errors were encountered: