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
moduleAcmeclassV1 < Grape::APIformat:jsonversion['v2','v1'],using: :header,vendor: 'acme',format: :json,cascade: truedesc"Returns the current API version, v1."getdo{version: 'v1'}enddesc"Returns pong."get"ping"do{ping: "pong"}endendend
API v2
moduleAcmeclassV2 < Grape::APIformat:jsonversion'v2',using: :header,vendor: 'acme',format: :json,cascade: truedesc"Returns the current API version, v2."getdo{version: 'v2'}endendend
We should be able to mount these in v2, then v1 order, like so:
Rack::Cascade.new([Acme::V2,Acme::V1])
Then V2 will respond to API requests that it implements, and V1 will respond to anything remaining, since it also supports v2.
The text was updated successfully, but these errors were encountered:
API v1
API v2
We should be able to mount these in v2, then v1 order, like so:
Then V2 will respond to API requests that it implements, and V1 will respond to anything remaining, since it also supports v2.
The text was updated successfully, but these errors were encountered: