Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Bound a
- showBound :: Show a => Bound a -> Inlines
- data Property = Property {}
- data Condition :: JsonType -> Type where
- Exactly :: TypedValue t -> Condition t
- Maximum :: !(Bound Scientific) -> Condition 'Number
- Minimum :: !(Down (Bound (Down Scientific))) -> Condition 'Number
- MultipleOf :: !Scientific -> Condition 'Number
- NumberFormat :: !Format -> Condition 'Number
- MaxLength :: !Integer -> Condition 'String
- MinLength :: !Integer -> Condition 'String
- Pattern :: !Pattern -> Condition 'String
- StringFormat :: !Format -> Condition 'String
- Items :: !(ForeachType JsonFormula) -> !(Traced (Referenced Schema)) -> Condition 'Array
- TupleItems :: ![(ForeachType JsonFormula, Traced (Referenced Schema))] -> Condition 'Array
- MaxItems :: !Integer -> Condition 'Array
- MinItems :: !Integer -> Condition 'Array
- UniqueItems :: Condition 'Array
- Properties :: !(Map Text Property) -> !(ForeachType JsonFormula) -> !(Maybe (Traced (Referenced Schema))) -> Condition 'Object
- MaxProperties :: !Integer -> Condition 'Object
- MinProperties :: !Integer -> Condition 'Object
- showCondition :: Condition a -> Blocks
- satisfiesTyped :: TypedValue t -> Condition t -> Bool
- checkStringFormat :: Format -> Text -> Bool
- checkNumberFormat :: Format -> Scientific -> Bool
- data SomeCondition where
- SomeCondition :: Typeable t => Condition t -> SomeCondition
- newtype JsonFormula t = JsonFormula {
- getJsonFormula :: DNF (Condition t)
- satisfiesFormula :: TypedValue t -> JsonFormula t -> Bool
- satisfies :: Value -> ForeachType JsonFormula -> Bool
- showJSONValue :: Value -> Blocks
- showJSONValueInline :: Value -> Inlines
Documentation
data Condition :: JsonType -> Type where Source #
A primitive structural condition for the "top level" of a JSON value (of a specific type)
Exactly :: TypedValue t -> Condition t | |
Maximum :: !(Bound Scientific) -> Condition 'Number | |
Minimum | |
MultipleOf :: !Scientific -> Condition 'Number | |
NumberFormat :: !Format -> Condition 'Number | |
MaxLength :: !Integer -> Condition 'String | |
MinLength :: !Integer -> Condition 'String | |
Pattern :: !Pattern -> Condition 'String | |
StringFormat :: !Format -> Condition 'String | |
Items :: !(ForeachType JsonFormula) -> !(Traced (Referenced Schema)) -> Condition 'Array | |
TupleItems :: ![(ForeachType JsonFormula, Traced (Referenced Schema))] -> Condition 'Array | |
MaxItems :: !Integer -> Condition 'Array | |
MinItems :: !Integer -> Condition 'Array | |
UniqueItems :: Condition 'Array | |
Properties | |
| |
MaxProperties :: !Integer -> Condition 'Object | |
MinProperties :: !Integer -> Condition 'Object |
Instances
Eq (Condition t) Source # | |
Ord (Condition t) Source # | |
Show (Condition t) Source # | |
showCondition :: Condition a -> Blocks Source #
satisfiesTyped :: TypedValue t -> Condition t -> Bool Source #
checkNumberFormat :: Format -> Scientific -> Bool Source #
data SomeCondition where Source #
SomeCondition :: Typeable t => Condition t -> SomeCondition |
Instances
Eq SomeCondition Source # | |
Defined in Data.OpenApi.Compare.Validate.Schema.JsonFormula (==) :: SomeCondition -> SomeCondition -> Bool # (/=) :: SomeCondition -> SomeCondition -> Bool # | |
Ord SomeCondition Source # | |
Defined in Data.OpenApi.Compare.Validate.Schema.JsonFormula compare :: SomeCondition -> SomeCondition -> Ordering # (<) :: SomeCondition -> SomeCondition -> Bool # (<=) :: SomeCondition -> SomeCondition -> Bool # (>) :: SomeCondition -> SomeCondition -> Bool # (>=) :: SomeCondition -> SomeCondition -> Bool # max :: SomeCondition -> SomeCondition -> SomeCondition # min :: SomeCondition -> SomeCondition -> SomeCondition # | |
Show SomeCondition Source # | |
Defined in Data.OpenApi.Compare.Validate.Schema.JsonFormula showsPrec :: Int -> SomeCondition -> ShowS # show :: SomeCondition -> String # showList :: [SomeCondition] -> ShowS # |
newtype JsonFormula t Source #
JsonFormula | |
|
Instances
satisfiesFormula :: TypedValue t -> JsonFormula t -> Bool Source #
satisfies :: Value -> ForeachType JsonFormula -> Bool Source #
showJSONValue :: Value -> Blocks Source #
showJSONValueInline :: Value -> Inlines Source #