Idea #11860
closed
[API] Discovery document exposes two methods, "index" and "list", on resources that offer the same functionality.
Added by Radhika Chippada over 7 years ago.
Updated over 7 years ago.
Assigned To:
Radhika Chippada
- Target version set to 2017-07-05 sprint
- Subject changed from [API] Discovery document exposes two methods, "index" and "list", on resources that offer the same functionality. We should deprecate one of them. to [API] Discovery document exposes two methods, "index" and "list", on resources that offer the same functionality.
- Assigned To set to Radhika Chippada
Looks like in SchemaController we could do something like
- say "index" instead of "list" in the hard-coded method description around L192
- remove the hard-coded parameters, because they will be added by the _index_requires_parameters() mechanism
- after the "check for rails routes" section, duplicate the "index" portion, modify the fields that mention the action name so they say "list" instead, and add the result as a "list" method.
Branch 11860-list-n-index-discovery-methods @ a152505e072c4b3ef8957154adf4bfebddc5b42b
- Implemented the suggestions from note #3
- Updated collection lifecycle to use list instead of index
- Manual test using arv to get trashed collections passed with list
- Status changed from New to In Progress
Nit, might be more readable to say "x.sub!(a,b)" instead of "x = x.sub(a,b)" here:
list_method[:id] = list_method[:id].sub('index', 'list')
list_method[:description] = list_method[:description].sub('Index', 'List')
list_method[:description] = list_method[:description].sub('index', 'list')
LGTM, thanks!
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset arvados|commit:6d146b5f5f7fd6310f4ded16851c8cc02037efc8.
Also available in: Atom
PDF