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/5-internal/user-events
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use schema-profunctor for user event serialisation and introduce golden tests
2 changes: 0 additions & 2 deletions libs/brig-types/brig-types.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ library
Brig.Types.Team.LegalHold
Brig.Types.Test.Arbitrary
Brig.Types.User
Brig.Types.User.Event

other-modules: Paths_brig_types
hs-source-dirs: src
Expand Down Expand Up @@ -85,7 +84,6 @@ library
, imports
, QuickCheck >=2.9
, text >=0.11
, tinylog
, types-common >=0.16
, wire-api

Expand Down
2 changes: 0 additions & 2 deletions libs/brig-types/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
, tasty-hunit
, tasty-quickcheck
, text
, tinylog
, types-common
, wire-api
}:
Expand All @@ -38,7 +37,6 @@ mkDerivation {
imports
QuickCheck
text
tinylog
types-common
wire-api
];
Expand Down
223 changes: 0 additions & 223 deletions libs/brig-types/src/Brig/Types/User/Event.hs

This file was deleted.

9 changes: 5 additions & 4 deletions libs/types-common/src/Data/Id.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module Data.Id
ScimTokenId,
parseIdFromText,
idToText,
idObjectSchema,
IdObject (..),

-- * Client IDs
Expand Down Expand Up @@ -444,7 +445,7 @@ newtype IdObject a = IdObject {fromIdObject :: a}
deriving (ToJSON, FromJSON, S.ToSchema) via Schema (IdObject a)

instance ToSchema a => ToSchema (IdObject a) where
schema =
object "Id" $
IdObject
<$> fromIdObject .= field "id" schema
schema = idObjectSchema (IdObject <$> fromIdObject .= schema)

idObjectSchema :: ValueSchemaP NamedSwaggerDoc a b -> ValueSchemaP NamedSwaggerDoc a b
idObjectSchema sch = object "Id" (field "id" sch)
2 changes: 2 additions & 0 deletions libs/wire-api/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
, tasty-quickcheck
, text
, time
, tinylog
, transitive-anns
, types-common
, unliftio
Expand Down Expand Up @@ -190,6 +191,7 @@ mkDerivation {
tagged
text
time
tinylog
transitive-anns
types-common
unordered-containers
Expand Down
Loading