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
{{ message }}
Repository navigation
Support default_response and default in 2.3; stop reading route.desc #989
Follow-up from #987 for grape-swagger 2.3. Not blocked on Grape.
default: is ignored
The README "Default response" section documents desc ..., default: { ... }. The code has only ever read default_response:. The documented spelling silently produces no default response.
Grape's route.default cannot be the fallback: on released Grape it is OrderedOptions#default, i.e. Hash#default, so it is nil even when the :default key is set. Dual-support without going back to route.options is:
try is nil when respond_to? is false, so this still works if Grape drops delegate_missing_to before a real default_response reader exists. settings is a real reader.
default_response: stays the preferred spelling. default: remains until grape-swagger 3.0. Grape HEAD already remaps default: onto default_response (ruby-grape/grape#2862); grape-swagger 3.0 can then read default_response only.
Stop reading route.desc
desc 'text' stores :description. route.desc is almost never set and is not a Grape reader. Drop summary = route.desc if route.desc in summary_object. Keep route.description, route.detail, and route.summary. No Grape reader for desc.
Out of scope
success / failure fallbacks stay until 3.0. No grape-swagger issue for adding a desc reader.
Activity