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/1-api-changes/WPB-21773
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Create new API version V14 and finalize API version V13
2 changes: 1 addition & 1 deletion integration/test/Test/Swagger.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import Testlib.Prelude
import UnliftIO.Temporary

existingVersions :: Set Int
existingVersions = Set.fromList [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
existingVersions = Set.fromList [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]

internalApis :: Set String
internalApis = Set.fromList ["brig", "cannon", "cargohold", "cannon", "spar"]
Expand Down
2 changes: 1 addition & 1 deletion integration/test/Testlib/Env.hs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ mkGlobalEnv cfgFile = do
gFederationV1Domain = intConfig.federationV1.originDomain,
gFederationV2Domain = intConfig.federationV2.originDomain,
gDynamicDomains = (.domain) <$> Map.elems intConfig.dynamicBackends,
gDefaultAPIVersion = 13,
gDefaultAPIVersion = 14,
gManager = manager,
gServicesCwdBase = devEnvProjectRoot <&> (</> "services"),
gBackendResourcePool = resourcePool,
Expand Down
8 changes: 6 additions & 2 deletions libs/wire-api/src/Wire/API/Routes/Version.hs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ import Wire.Arbitrary (Arbitrary, GenericUniform (GenericUniform))
-- and 'developmentVersions' stay in sync; everything else here should keep working without
-- change. See also documentation in the *docs* directory.
-- https://docs.wire.com/developer/developer/api-versioning.html#version-bump-checklist
data Version = V0 | V1 | V2 | V3 | V4 | V5 | V6 | V7 | V8 | V9 | V10 | V11 | V12 | V13
data Version = V0 | V1 | V2 | V3 | V4 | V5 | V6 | V7 | V8 | V9 | V10 | V11 | V12 | V13 | V14
deriving stock (Eq, Ord, Bounded, Enum, Show, Generic)
deriving (FromJSON, ToJSON) via (Schema Version)
deriving (Arbitrary) via (GenericUniform Version)
Expand Down Expand Up @@ -129,6 +129,8 @@ instance RenderableSymbol V12 where renderSymbol = "V12"

instance RenderableSymbol V13 where renderSymbol = "V13"

instance RenderableSymbol V14 where renderSymbol = "V14"

-- | Manual enumeration of version integrals (the `<n>` in the constructor `V<n>`).
--
-- This is not the same as 'fromEnum': we will remove unsupported versions in the future,
Expand All @@ -150,6 +152,7 @@ versionInt V10 = 10
versionInt V11 = 11
versionInt V12 = 12
versionInt V13 = 13
versionInt V14 = 14

supportedVersions :: [Version]
supportedVersions = [minBound .. maxBound]
Expand Down Expand Up @@ -270,7 +273,8 @@ isDevelopmentVersion V9 = False
isDevelopmentVersion V10 = False
isDevelopmentVersion V11 = False
isDevelopmentVersion V12 = False
isDevelopmentVersion V13 = True
isDevelopmentVersion V13 = False
isDevelopmentVersion V14 = True

developmentVersions :: [Version]
developmentVersions = filter isDevelopmentVersion supportedVersions
Expand Down
Loading