Naming convention

For example, we should follow a consistent set of naming conventions for all our URLs. Specifically, we will do the following:

  • Use kebab-case for URLs
  • Use camelCase for parameters in the query string, for example, /users/12?fields=name,coverImage,avatar
  • For nested resources, structure them like so: /resource/id/sub-resource/id, for example, /users/21/article/583

For our non-CRUD endpoints, the URL naming convention should follow a /verb-noun structure: we should use /search-articles instead of /articles-search.

Get Building Enterprise JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.