From c2c04217f850088ec15be1f02fedb2fa4431e4f5 Mon Sep 17 00:00:00 2001 From: Chongsun Ahn Date: Wed, 29 Mar 2017 09:08:09 -0700 Subject: [PATCH] Update style guide: UUIDs should end in "Id" --- STYLE-GUIDE.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/STYLE-GUIDE.md b/STYLE-GUIDE.md index 0a87113..953359f 100644 --- a/STYLE-GUIDE.md +++ b/STYLE-GUIDE.md @@ -76,6 +76,9 @@ taken to design the endpoints in a way that makes sense for clients. Examples: * Note: this is to ensure compliance with all JSON parsers, especially ones that adhere to RFC4627, which do not consider JSON values to be valid JSON. See the discussion [here](http://stackoverflow.com/questions/18419428/what-is-the-minimum-valid-json). +* When giving names to resources in the APIs, if it is a UUID, its name should have a suffix of "Id" +to show that. (e.g. `/api/users/{userId}/fulfillmentFacilities` has query parameter `rightId` to get +by right UUID.) We use RAML (0.8) to document our RESTful APIs, which are then converted into HTML for static API documentation or Swagger UI for live documentation. Some guidelines for defining APIs in RAML: