Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/4-docs/client-api-version-bump-checklist
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a client API version bump checklist
15 changes: 15 additions & 0 deletions docs/src/developer/developer/api-versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,21 @@ by this system. It is still possible to implement them, but they will appear as
different endpoints (and have different names) on the same path, and with
non-overlapping version ranges.

### Version bump checklist

When making the client API version bump, i.e., when finalising a version, there
are several steps to make apart from deciding what endpoint changes are part of
the version:

- In `wire-api` extend the `Version` type with a new version by appending the
new version to the end, e.g., by adding `V4`. Make sure to update its
`ToSchema` instance,
- In the same `Version` module update the `developmentVersions` value to list
only the new version,
- Consider updating the `backendApiVersion` value in Stern, which is
unit-tested by checking if it is listed as supported in the response to `GET
/api-version`.

### Examples of endpoint evolution

In the following, we present some examples of API changes and how they might be
Expand Down
4 changes: 3 additions & 1 deletion libs/wire-api/src/Wire/API/Routes/Version.hs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ import Servant.Swagger
import Wire.API.Routes.Named
import Wire.API.VersionInfo

-- | Version of the public API.
-- | Version of the public API. Check the documentation in the *docs* directory
-- for a checklist when adding a new version.
-- https://docs.wire.com/developer/developer/api-versioning.html#version-bump-checklist
data Version = V0 | V1 | V2 | V3 | V4
deriving stock (Eq, Ord, Bounded, Enum, Show)
deriving (FromJSON, ToJSON) via (Schema Version)
Expand Down