Skip to Content
Hands-On Software Engineering with Golang
book

Hands-On Software Engineering with Golang

by Achilleas Anagnostopoulos
January 2020
Intermediate to advanced
640 pages
16h 56m
English
Packt Publishing
Content preview from Hands-On Software Engineering with Golang

Including the API version as a route prefix

The most popular approach for implementing API versioning is for clients to include the requested API version as part of the requested API endpoint paths. For instance, /v1/account and /v2/account are versioned endpoints for retrieving the user's account details. However, the /account endpoint, when mounted under the v2 prefix, might return a completely different payload than the one mounted under the v1 prefix.

The choice of the version naming scheme is totally arbitrary and is up to the API designer to decide on. Common versioning schemes include the following:

  • Numeric values; for example, v4
  • API release dates; for example, 20200101
  • Season names that coincide with new API releases; for example, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Software Architecture with Golang

Hands-On Software Architecture with Golang

Jyotiswarup Raiturkar

Publisher Resources

ISBN: 9781838554491Supplemental Content