Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype PatchOp tag = PatchOp {
- getOperations :: [Operation]
- data Operation = Operation {}
- data Op
- data Path
- parsePath :: [Schema] -> Text -> Either String Path
- pPath :: [Schema] -> Parser Path
- rPath :: Path -> Text
- operationFromJSON :: [Schema] -> Value -> Parser Operation
- pathFromJSON :: [Schema] -> Value -> Parser Path
- class Patchable a where
- applyOperation :: MonadError ScimError m => a -> Operation -> m a
Documentation
The Path
attribute value is a String
containing an attribute path
describing the target of the operation. It is OPTIONAL
for Op
s "add" and "replace", and is REQUIRED for "remove". See
relevant operation sections below for details.
TODO(arianvp): When value is an array, it needs special handling. e.g. primary fields need to be negated and whatnot. We currently do not do that :)
NOTE: When the path contains a schema, this schema must be implicitly added to the list of schemas on the result type
PATH = attrPath / valuePath [subAttr]
class Patchable a where Source #
A very coarse description of what it means to be Patchable
I do not like it. We should handhold people using this library more
applyOperation :: MonadError ScimError m => a -> Operation -> m a Source #
Instances
Patchable NoUserExtra Source # | |
Defined in Web.Scim.Schema.User applyOperation :: MonadError ScimError m => NoUserExtra -> Operation -> m NoUserExtra Source # | |
(UserTypes tag, FromJSON (User tag), Patchable (UserExtra tag)) => Patchable (User tag) Source # | |
Defined in Web.Scim.Schema.User applyOperation :: MonadError ScimError m => User tag -> Operation -> m (User tag) Source # | |
Patchable (HashMap Text Text) Source # | |
Defined in Web.Scim.Schema.PatchOp |