| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Web.Scim.Schema.PatchOp
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
Constructors
| PatchOp | |
Fields
| |
The Path attribute value is a Value containing an attribute path
describing the target of the operation. It is OPTIONAL
for Ops "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]
Constructors
| NormalPath AttrPath | |
| IntoValuePath ValuePath (Maybe 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
Methods
applyOperation :: MonadError ScimError m => a -> Operation -> m a Source #
Instances
| Patchable NoUserExtra Source # | |
Defined in Web.Scim.Schema.User Methods applyOperation :: MonadError ScimError m => NoUserExtra -> Operation -> m NoUserExtra Source # | |
| Patchable (KeyMap Text) Source # | |
Defined in Web.Scim.Schema.PatchOp Methods applyOperation :: MonadError ScimError m => KeyMap Text -> Operation -> m (KeyMap Text) Source # | |
| (UserTypes tag, FromJSON (User tag), Patchable (UserExtra tag)) => Patchable (User tag) Source # | |
Defined in Web.Scim.Schema.User Methods applyOperation :: MonadError ScimError m => User tag -> Operation -> m (User tag) Source # | |