Project

General

Profile

Actions

Idea #11860

closed

[API] Discovery document exposes two methods, "index" and "list", on resources that offer the same functionality.

Added by Radhika Chippada almost 7 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
-
Target version:
Start date:
06/26/2017
Due date:
Story points:
-

Subtasks 1 (0 open1 closed)

Task #11881: Review 11860-list-n-index-discovery-methodsResolvedRadhika Chippada06/26/2017Actions
Actions #1

Updated by Tom Morris almost 7 years ago

  • Target version set to 2017-07-05 sprint
Actions #2

Updated by Radhika Chippada almost 7 years ago

  • 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

The discovery document should return the same data for both the "index" and "list" methods.

Update the http://doc.arvados.org/user/tutorials/tutorial-keep-collection-lifecycle.html page to use "list" instead of "index" method when done.

Actions #3

Updated by Tom Clegg almost 7 years ago

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.
Actions #4

Updated by Radhika Chippada almost 7 years ago

Branch 11860-list-n-index-discovery-methods @ a152505e072c4b3ef8957154adf4bfebddc5b42b

  • Implemented the suggestions from note #3
  • All tests passed
  • Updated collection lifecycle to use list instead of index
  • Manual test using arv to get trashed collections passed with list
Actions #5

Updated by Radhika Chippada almost 7 years ago

  • Status changed from New to In Progress
Actions #6

Updated by Tom Clegg almost 7 years ago

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!

Actions #7

Updated by Radhika Chippada almost 7 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:6d146b5f5f7fd6310f4ded16851c8cc02037efc8.

Actions

Also available in: Atom PDF