-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Servantify more of brig internal api #3346
Conversation
- `get "/i/users/:uid/contacts" (continue getContactListH)` - `get "/i/users/activation-code" (continue getActivationCodeH)` - `get "/i/users/password-reset-code" (continue getPasswordResetCodeH)`
- `post "/i/users/revoke-identity" (continue revokeIdentityH)` - `head "/i/users/blacklist" (continue checkBlacklistH)` - `delete "/i/users/blacklist" (continue deleteFromBlacklistH)` - `post "/i/users/blacklist" (continue addBlacklistH)` - `get "/i/users/phone-prefixes/:prefix" (continue getPhonePrefixesH)` - `delete "/i/users/phone-prefixes/:prefix" (continue deleteFromPhonePrefixH)` - `post "/i/users/phone-prefixes" (continue addPhonePrefixH)` - `put "/i/users/:uid/sso-id" (continue updateSSOIdH)` - `delete "/i/users/:uid/sso-id" (continue deleteSSOIdH)` - `put "/i/users/:uid/managed-by" (continue updateManagedByH)` - `put "/i/users/:uid/rich-info" (continue updateRichInfoH)` - `put "/i/users/:uid/handle" (continue updateHandleH)` - `put "/i/users/:uid/name" (continue updateUserNameH)` - `get "/i/users/:uid/rich-info" (continue getRichInfoH)` - `get "/i/users/rich-info" (continue getRichInfoMultiH)` - `head "/i/users/handles/:handle" (continue checkHandleInternalH)`
- `put "/i/connections/connection-update" (continue updateConnectionInternalH)`
- `post "/i/clients" (continue internalListClientsH)` - `post "/i/clients/full" (continue internalListFullClientsH)` - `post "/i/clients/:uid" (continue addClientInternalH)` - `post "/i/clients/legalhold/:uid/request" (continue legalHoldClientRequestedH)` - `delete "/i/clients/legalhold/:uid" (continue removeLegalHoldClientH)`
this is getting a little out of hand...
i think the problem is that we used to treat object field names as case insensitive in the also failing:
|
Another puzzle: is there a way to allow for the value of a json field to be either an object or an array, so two completely different parsers? I think that's what To be more specific, I have this test (reproduce with
... which requires that
But ghc wasn't convinced:
When I implemented
|
@@ -1065,8 +1064,6 @@ tests = | |||
testObjects [(Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_1, "testObject_RichField_user_1.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_2, "testObject_RichField_user_2.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_3, "testObject_RichField_user_3.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_4, "testObject_RichField_user_4.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_5, "testObject_RichField_user_5.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_6, "testObject_RichField_user_6.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_7, "testObject_RichField_user_7.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_8, "testObject_RichField_user_8.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_9, "testObject_RichField_user_9.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_10, "testObject_RichField_user_10.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_11, "testObject_RichField_user_11.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_12, "testObject_RichField_user_12.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_13, "testObject_RichField_user_13.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_14, "testObject_RichField_user_14.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_15, "testObject_RichField_user_15.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_16, "testObject_RichField_user_16.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_17, "testObject_RichField_user_17.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_18, "testObject_RichField_user_18.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_19, "testObject_RichField_user_19.json"), (Test.Wire.API.Golden.Generated.RichField_user.testObject_RichField_user_20, "testObject_RichField_user_20.json")], | |||
testGroup "Golden: RichInfoAssocList_user" $ | |||
testObjects [(Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_1, "testObject_RichInfoAssocList_user_1.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_2, "testObject_RichInfoAssocList_user_2.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_3, "testObject_RichInfoAssocList_user_3.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_4, "testObject_RichInfoAssocList_user_4.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_5, "testObject_RichInfoAssocList_user_5.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_6, "testObject_RichInfoAssocList_user_6.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_7, "testObject_RichInfoAssocList_user_7.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_8, "testObject_RichInfoAssocList_user_8.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_9, "testObject_RichInfoAssocList_user_9.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_10, "testObject_RichInfoAssocList_user_10.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_11, "testObject_RichInfoAssocList_user_11.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_12, "testObject_RichInfoAssocList_user_12.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_13, "testObject_RichInfoAssocList_user_13.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_14, "testObject_RichInfoAssocList_user_14.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_15, "testObject_RichInfoAssocList_user_15.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_16, "testObject_RichInfoAssocList_user_16.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_17, "testObject_RichInfoAssocList_user_17.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_18, "testObject_RichInfoAssocList_user_18.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_19, "testObject_RichInfoAssocList_user_19.json"), (Test.Wire.API.Golden.Generated.RichInfoAssocList_user.testObject_RichInfoAssocList_user_20, "testObject_RichInfoAssocList_user_20.json")], | |||
testGroup "Golden: RichInfoMapAndList_user" $ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RichInfoMapAndList
doesn't have a Schema
instance any more; it's only needed for implementing (de-)serializing RichInfo
.
@@ -0,0 +1,94 @@ | |||
{-# LANGUAGE OverloadedStrings #-} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this entire module just moved here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Paolo Capriotti <paolo@capriotti.io>
Co-authored-by: Paolo Capriotti <paolo@capriotti.io>
(by running the same, more general handler over the union of the two routes.)
Conflicts: services/brig/src/Brig/API/Internal.hs services/brig/src/Brig/API/Util.hs
https://wearezeta.atlassian.net/browse/WPB-2188
Checklist
changelog.d