#1715 assigned defect

change all docs and generated URLs to point to "/cap" instead of "/uri"

Reported by: marlowe Owned by: davidsarah
Priority: normal Milestone: undecided
Component: documentation Version: 1.9.1
Keywords: docs cruft backward-compatibility Cc:
Launchpad Bug:

Description (last modified by davidsarah)

From #tahoe-lafs:

13:58 < warner> I also noticed that /uri and /cap are synonyms.. not sure if that's documented

13:59 < zooko> I had the idea, many years ago, to rename "uri" to "cap" everywhere, but never finished that process...

14:00 < marlowe> warner: if you create the ticket, and assign it to docs, I will make the change

14:00 < warner> I think that synonym came from that process

14:00 * zooko nods

14:01 < marlowe> also, once I finish #1663 we should have a good idea on what is a synonym for what

14:01 < zooko> I had planned to change the Web API docs to direct programmers to the new name -- /cap/ -- and leave the old one for backward-compatibility.

Attachments (1)

ticket-1715.patch (755 bytes) - added by marlowe at 2012-04-11T02:43:13Z.

Download all attachments as: .zip

Change History (11)

comment:1 follow-up: Changed at 2012-04-11T02:00:54Z by davidsarah

Another option would be to delete /cap. Why have two ways to do things?

comment:2 Changed at 2012-04-11T02:01:41Z by davidsarah

  • Description modified (diff)
  • Keywords docs cruft backward-compatibility added

comment:3 in reply to: ↑ 1 Changed at 2012-04-11T02:18:44Z by marlowe

Replying to davidsarah:

Another option would be to delete /cap. Why have two ways to do things?

You read my mind. I think ticket #1663 will help us get an idea where we have synonyms and then create tickets to either remove the cruft or maintain backwards compatibility. I added Brian and Zooko to the ticket as they can shed more light on it than I.

In the meantime until we decide how to proceed on the above, I will make the necessary changes to webapi.rst.

comment:4 Changed at 2012-04-11T02:31:56Z by zooko

  • Summary changed from /cap and /uri are synonyms to change all docs and generated URLs to point to "/cap" instead of "/uri"

comment:5 Changed at 2012-04-11T02:42:00Z by marlowe

The attached patch is a workaround, until we get all instances of /uri changed to /cap, we need to have this in webapi.rst. If someone can tell me when /cap was introduced, I will add the version information into webapi.rst. I submitted a pull request to github with this patch.

Changed at 2012-04-11T02:43:13Z by marlowe

comment:6 Changed at 2012-04-11T02:56:26Z by davidsarah

Reasons not to rename /uri to /cap:

  • it's unnecessary work;
  • /cap is not that much better a name;
  • in order not to be disruptive to older third-party tools, or Tahoe CLI instances, connecting to a newer gateway, we'd have to maintain /uri as well as /cap;
  • there's no evidence that anyone is using /cap, and it wasn't documented, so there's no reason not to just delete it.
Last edited at 2012-04-11T02:57:00Z by davidsarah (previous) (diff)

comment:7 Changed at 2012-04-11T03:03:41Z by davidsarah

Incidentally, if we are going to change the gateway URLs, I'd rather shorten them by not having any additional prefix, since the URI: prefix (or lafs: if we change it to that) is unambiguous. This would only involve a slight complication in the root handler.

comment:8 Changed at 2012-04-11T03:36:33Z by zooko

  • Owner changed from marlowe to davidsarah

David-Sarah: I think "cap" is a much better name. These things are not officially URIs, as they aren't officially recognized by IANA and they don't even follow the URI spec. Also, they are not even conceptually URIs, because an "identifier" does not, according to most people's conceptions, convey authority. That's how a cap differs from an identifier.

Also, we use the name cap fairly consistently in all the documentation except for the URL structure itself, so currently someone who reads the docs has to remember "Okay, '/uri/' is where the cap goes.", which seems harder than "Okay, '/cap/' is where the cap goes.".

I like your idea of removing the "/uri/" or "/cap/" altogether. That's intriguing. Want to talk about that?

comment:9 Changed at 2012-05-17T00:30:20Z by davidsarah

  • Status changed from new to assigned

Accepting to remind me to talk about removing "/uri/" or "/cap/"

comment:10 Changed at 2012-11-20T03:02:54Z by davidsarah

So, we can get away with removing "/uri/" or "/cap/" because the URI: prefix (or lafs: if and when we switch to that) makes the meaning unambiguous. The root handler can just check whether the immediate child name starts with "URI:", and if it does, delegate to the same handler as "/uri/".

Note: See TracTickets for help on using tickets.