mirror of
https://github.com/NorfairKing/autodocodec.git
synced 2024-11-22 04:43:15 +03:00
Integer codec
This commit is contained in:
parent
0aa088a28a
commit
b435803c33
@ -135,6 +135,7 @@ instance GenValid JSONSchema where
|
||||
NullSchema -> [AnySchema]
|
||||
BoolSchema -> [AnySchema]
|
||||
StringSchema -> [AnySchema]
|
||||
IntegerSchema mBounds -> AnySchema : (IntegerSchema <$> shrinkValid mBounds)
|
||||
NumberSchema mBounds -> AnySchema : (NumberSchema <$> shrinkValid mBounds)
|
||||
MapSchema s -> AnySchema : s : (MapSchema <$> shrinkValid s)
|
||||
ArraySchema s -> AnySchema : s : (ArraySchema <$> shrinkValid s)
|
||||
@ -156,7 +157,8 @@ instance GenValid JSONSchema where
|
||||
then elements [AnySchema, NullSchema, BoolSchema, StringSchema]
|
||||
else
|
||||
oneof
|
||||
[ NumberSchema <$> genValid,
|
||||
[ IntegerSchema <$> genValid,
|
||||
NumberSchema <$> genValid,
|
||||
ArraySchema <$> resize (n - 1) genValid,
|
||||
MapSchema <$> resize (n - 1) genValid,
|
||||
(ObjectSchema <$> resize (n - 1) genValid) `suchThat` isValid,
|
||||
@ -203,7 +205,7 @@ instance GenValid ObjectSchema where
|
||||
ObjectAllOfSchema <$> genValid
|
||||
]
|
||||
|
||||
instance GenValid NumberBounds where
|
||||
instance (GenValid a) => GenValid (Bounds a) where
|
||||
genValid = genValidStructurallyWithoutExtraChecking
|
||||
shrinkValid = shrinkValidStructurallyWithoutExtraFiltering
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Error in $: Number 1.0e10000 is bigger than the upper bound 9.223372036854775807e18
|
||||
Error in $: Number 1.0e10000 is bigger than the upper bound 1.0e1024
|
@ -1 +1 @@
|
||||
Error in $: Number 200.0 is bigger than the upper bound 127.0
|
||||
Error in $: Number 200 is bigger than the upper bound 127
|
@ -1 +1 @@
|
||||
Error in $: Number -3.0 is smaller than the lower bound 1.8446744073709551615e19
|
||||
Error in $: Number -3 is smaller than the lower bound 0
|
@ -1 +1 @@
|
||||
Error in $: Number 300.0 is bigger than the upper bound 255.0
|
||||
Error in $: Number 300 is bigger than the upper bound 255
|
@ -49,7 +49,7 @@
|
||||
"value": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"maximum": 32767,
|
||||
"minimum": -32768,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"maximum": 2147483647,
|
||||
"minimum": -2147483648,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"maximum": 127,
|
||||
"minimum": -128,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
@ -1,5 +1,3 @@
|
||||
{
|
||||
"maximum": 1.0e1024,
|
||||
"minimum": -1.0e1024,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
@ -13,7 +13,7 @@
|
||||
"items": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
@ -22,7 +22,7 @@
|
||||
"items": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
|
@ -2,7 +2,7 @@
|
||||
"additionalProperties": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "object"
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"maximum": 1.0e1024,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
"$comment": "base case",
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"$comment": "Recurse",
|
||||
|
@ -6,7 +6,7 @@
|
||||
"int": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"type": {
|
||||
"const": "that"
|
||||
@ -23,7 +23,7 @@
|
||||
"int": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
|
@ -3,7 +3,7 @@
|
||||
{
|
||||
"maximum": 255,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"maximum": 1.8446744073709551615e19,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"maximum": 65535,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"maximum": 4294967295,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"maximum": 1.8446744073709551615e19,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"maximum": 255,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
@ -1,2 +1,2 @@
|
||||
{ lib }:
|
||||
lib.types.s16
|
||||
lib.types.ints.s16
|
||||
|
@ -1,2 +1,2 @@
|
||||
{ lib }:
|
||||
lib.types.s32
|
||||
lib.types.ints.s32
|
||||
|
@ -1,2 +1,2 @@
|
||||
{ lib }:
|
||||
lib.types.s8
|
||||
lib.types.ints.s8
|
||||
|
@ -1,2 +1,2 @@
|
||||
{ lib }:
|
||||
lib.types.number
|
||||
lib.types.int
|
||||
|
@ -1,2 +1,2 @@
|
||||
{ lib }:
|
||||
lib.types.number
|
||||
lib.types.int
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ lib }:
|
||||
lib.types.oneOf [
|
||||
lib.types.u8
|
||||
lib.types.ints.u8
|
||||
lib.types.str
|
||||
]
|
||||
|
@ -1,2 +1,2 @@
|
||||
{ lib }:
|
||||
lib.types.u16
|
||||
lib.types.ints.u16
|
||||
|
@ -1,2 +1,2 @@
|
||||
{ lib }:
|
||||
lib.types.u32
|
||||
lib.types.ints.u32
|
||||
|
@ -1,2 +1,2 @@
|
||||
{ lib }:
|
||||
lib.types.u8
|
||||
lib.types.ints.u8
|
||||
|
@ -32,7 +32,7 @@
|
||||
"value": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
@ -15,7 +15,7 @@
|
||||
"items": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
@ -25,7 +25,7 @@
|
||||
"items": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
|
@ -18,7 +18,7 @@
|
||||
"description": "base case",
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/Recurse"
|
||||
|
@ -5,7 +5,7 @@
|
||||
"int": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
@ -29,7 +29,7 @@
|
||||
"int": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
|
@ -5,7 +5,7 @@
|
||||
{
|
||||
"maximum": 255,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -33,7 +33,7 @@
|
||||
"value": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
@ -4,7 +4,7 @@
|
||||
"Int": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4,7 +4,7 @@
|
||||
"Int16": {
|
||||
"maximum": 32767,
|
||||
"minimum": -32768,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4,7 +4,7 @@
|
||||
"Int32": {
|
||||
"maximum": 2147483647,
|
||||
"minimum": -2147483648,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4,7 +4,7 @@
|
||||
"Int64": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4,7 +4,7 @@
|
||||
"Int8": {
|
||||
"maximum": 127,
|
||||
"minimum": -128,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2,9 +2,7 @@
|
||||
"components": {
|
||||
"schemas": {
|
||||
"Integer": {
|
||||
"maximum": 1.0e1024,
|
||||
"minimum": -1.0e1024,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -16,7 +16,7 @@
|
||||
"items": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
@ -26,7 +26,7 @@
|
||||
"items": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
|
@ -5,7 +5,7 @@
|
||||
"additionalProperties": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
|
@ -2,9 +2,8 @@
|
||||
"components": {
|
||||
"schemas": {
|
||||
"Natural": {
|
||||
"maximum": 1.0e1024,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -19,7 +19,7 @@
|
||||
"description": "base case",
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/Recurse"
|
||||
|
@ -6,7 +6,7 @@
|
||||
"int": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
@ -30,7 +30,7 @@
|
||||
"int": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
|
@ -6,7 +6,7 @@
|
||||
{
|
||||
"maximum": 255,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
|
@ -4,7 +4,7 @@
|
||||
"Word": {
|
||||
"maximum": 1.8446744073709551615e19,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4,7 +4,7 @@
|
||||
"Word16": {
|
||||
"maximum": 65535,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4,7 +4,7 @@
|
||||
"Word32": {
|
||||
"maximum": 4294967295,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4,7 +4,7 @@
|
||||
"Word64": {
|
||||
"maximum": 1.8446744073709551615e19,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4,7 +4,7 @@
|
||||
"Word8": {
|
||||
"maximum": 255,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -12,6 +12,10 @@ EitherCodec
|
||||
(ObjectOfCodec
|
||||
Nothing
|
||||
(RequiredKeyCodec
|
||||
"Right" Nothing (NumberCodec Nothing Nothing))))))
|
||||
"Right"
|
||||
Nothing
|
||||
(NumberCodec
|
||||
Nothing
|
||||
Bounds { boundsLower = Nothing , boundsUpper = Nothing }))))))
|
||||
(ObjectOfCodec
|
||||
Nothing (RequiredKeyCodec "Right" Nothing (StringCodec Nothing)))
|
@ -43,12 +43,11 @@ ReferenceCodec
|
||||
(BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
(IntegerCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = -9.223372036854775808e18
|
||||
, numberBoundsUpper = 9.223372036854775807e18
|
||||
}))))
|
||||
Bounds
|
||||
{ boundsLower = Just (-9223372036854775808)
|
||||
, boundsUpper = Just 9223372036854775807
|
||||
})))
|
||||
)
|
||||
]))
|
@ -1,10 +1,9 @@
|
||||
BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
(IntegerCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = -9.223372036854775808e18
|
||||
, numberBoundsUpper = 9.223372036854775807e18
|
||||
}))
|
||||
Bounds
|
||||
{ boundsLower = Just (-9223372036854775808)
|
||||
, boundsUpper = Just 9223372036854775807
|
||||
})
|
@ -1,8 +1,6 @@
|
||||
BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
(IntegerCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = -32768.0 , numberBoundsUpper = 32767.0 }))
|
||||
Bounds { boundsLower = Just (-32768) , boundsUpper = Just 32767 })
|
@ -1,10 +1,9 @@
|
||||
BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
(IntegerCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = -2.147483648e9
|
||||
, numberBoundsUpper = 2.147483647e9
|
||||
}))
|
||||
Bounds
|
||||
{ boundsLower = Just (-2147483648)
|
||||
, boundsUpper = Just 2147483647
|
||||
})
|
@ -1,10 +1,9 @@
|
||||
BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
(IntegerCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = -9.223372036854775808e18
|
||||
, numberBoundsUpper = 9.223372036854775807e18
|
||||
}))
|
||||
Bounds
|
||||
{ boundsLower = Just (-9223372036854775808)
|
||||
, boundsUpper = Just 9223372036854775807
|
||||
})
|
@ -1,8 +1,6 @@
|
||||
BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
(IntegerCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = -128.0 , numberBoundsUpper = 127.0 }))
|
||||
Bounds { boundsLower = Just (-128) , boundsUpper = Just 127 })
|
@ -1,8 +1,2 @@
|
||||
BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = -1.0e1024 , numberBoundsUpper = 1.0e1024 }))
|
||||
IntegerCodec
|
||||
Nothing Bounds { boundsLower = Nothing , boundsUpper = Nothing }
|
@ -16,13 +16,12 @@ ObjectOfCodec
|
||||
(BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
(IntegerCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = -9.223372036854775808e18
|
||||
, numberBoundsUpper = 9.223372036854775807e18
|
||||
})))))
|
||||
Bounds
|
||||
{ boundsLower = Just (-9223372036854775808)
|
||||
, boundsUpper = Just 9223372036854775807
|
||||
}))))
|
||||
_
|
||||
(Just "possibly empty list with omitted default empty list")))
|
||||
(BimapCodec
|
||||
@ -38,13 +37,12 @@ ObjectOfCodec
|
||||
(BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
(IntegerCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = -9.223372036854775808e18
|
||||
, numberBoundsUpper = 9.223372036854775807e18
|
||||
})))))
|
||||
Bounds
|
||||
{ boundsLower = Just (-9223372036854775808)
|
||||
, boundsUpper = Just 9223372036854775807
|
||||
}))))
|
||||
_
|
||||
(Just "possibly empty list with default empty list"))))
|
||||
(BimapCodec
|
||||
|
@ -2,10 +2,9 @@ MapCodec
|
||||
(BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
(IntegerCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = -9.223372036854775808e18
|
||||
, numberBoundsUpper = 9.223372036854775807e18
|
||||
})))
|
||||
Bounds
|
||||
{ boundsLower = Just (-9223372036854775808)
|
||||
, boundsUpper = Just 9223372036854775807
|
||||
}))
|
@ -1,8 +1,5 @@
|
||||
BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = 0.0 , numberBoundsUpper = 1.0e1024 }))
|
||||
(IntegerCodec
|
||||
Nothing Bounds { boundsLower = Just 0 , boundsUpper = Nothing })
|
@ -10,13 +10,12 @@ ReferenceCodec
|
||||
(BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
(IntegerCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = -9.223372036854775808e18
|
||||
, numberBoundsUpper = 9.223372036854775807e18
|
||||
}))))
|
||||
Bounds
|
||||
{ boundsLower = Just (-9223372036854775808)
|
||||
, boundsUpper = Just 9223372036854775807
|
||||
})))
|
||||
(ObjectOfCodec
|
||||
(Just "Recurse")
|
||||
(RequiredKeyCodec
|
||||
|
@ -1 +1,2 @@
|
||||
NumberCodec Nothing Nothing
|
||||
NumberCodec
|
||||
Nothing Bounds { boundsLower = Nothing , boundsUpper = Nothing }
|
@ -13,13 +13,12 @@ ObjectOfCodec
|
||||
(BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
(IntegerCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = -9.223372036854775808e18
|
||||
, numberBoundsUpper = 9.223372036854775807e18
|
||||
}))))
|
||||
Bounds
|
||||
{ boundsLower = Just (-9223372036854775808)
|
||||
, boundsUpper = Just 9223372036854775807
|
||||
})))
|
||||
)
|
||||
, ( "both"
|
||||
, BimapCodec
|
||||
@ -37,13 +36,12 @@ ObjectOfCodec
|
||||
(BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
(IntegerCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = -9.223372036854775808e18
|
||||
, numberBoundsUpper = 9.223372036854775807e18
|
||||
}))))))
|
||||
Bounds
|
||||
{ boundsLower = Just (-9223372036854775808)
|
||||
, boundsUpper = Just 9223372036854775807
|
||||
})))))
|
||||
)
|
||||
, ( "this"
|
||||
, BimapCodec
|
||||
|
@ -6,9 +6,6 @@ BimapCodec
|
||||
(BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = 0.0 , numberBoundsUpper = 255.0 })))
|
||||
(IntegerCodec
|
||||
Nothing Bounds { boundsLower = Just 0 , boundsUpper = Just 255 }))
|
||||
(StringCodec Nothing))
|
@ -1,10 +1,7 @@
|
||||
BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
(IntegerCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = 0.0
|
||||
, numberBoundsUpper = 1.8446744073709551615e19
|
||||
}))
|
||||
Bounds
|
||||
{ boundsLower = Just 0 , boundsUpper = Just 18446744073709551615 })
|
@ -1,8 +1,5 @@
|
||||
BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = 0.0 , numberBoundsUpper = 65535.0 }))
|
||||
(IntegerCodec
|
||||
Nothing Bounds { boundsLower = Just 0 , boundsUpper = Just 65535 })
|
@ -1,8 +1,6 @@
|
||||
BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
(IntegerCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = 0.0 , numberBoundsUpper = 4.294967295e9 }))
|
||||
Bounds { boundsLower = Just 0 , boundsUpper = Just 4294967295 })
|
@ -1,10 +1,7 @@
|
||||
BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
(IntegerCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = 0.0
|
||||
, numberBoundsUpper = 1.8446744073709551615e19
|
||||
}))
|
||||
Bounds
|
||||
{ boundsLower = Just 0 , boundsUpper = Just 18446744073709551615 })
|
@ -1,8 +1,5 @@
|
||||
BimapCodec
|
||||
_
|
||||
_
|
||||
(NumberCodec
|
||||
Nothing
|
||||
(Just
|
||||
NumberBounds
|
||||
{ numberBoundsLower = 0.0 , numberBoundsUpper = 255.0 }))
|
||||
(IntegerCodec
|
||||
Nothing Bounds { boundsLower = Just 0 , boundsUpper = Just 255 })
|
@ -14,7 +14,7 @@
|
||||
"value": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
@ -3,7 +3,7 @@
|
||||
"Int": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
|
@ -3,7 +3,7 @@
|
||||
"Int16": {
|
||||
"maximum": 32767,
|
||||
"minimum": -32768,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
|
@ -3,7 +3,7 @@
|
||||
"Int32": {
|
||||
"maximum": 2147483647,
|
||||
"minimum": -2147483648,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
|
@ -3,7 +3,7 @@
|
||||
"Int64": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
|
@ -3,7 +3,7 @@
|
||||
"Int8": {
|
||||
"maximum": 127,
|
||||
"minimum": -128,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
|
@ -1,9 +1,7 @@
|
||||
{
|
||||
"definitions": {
|
||||
"Integer": {
|
||||
"maximum": 1.0e1024,
|
||||
"minimum": -1.0e1024,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
|
@ -15,7 +15,7 @@
|
||||
"items": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
@ -24,7 +24,7 @@
|
||||
"items": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
|
@ -4,7 +4,7 @@
|
||||
"additionalProperties": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
|
@ -1,9 +1,8 @@
|
||||
{
|
||||
"definitions": {
|
||||
"Natural": {
|
||||
"maximum": 1.0e1024,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
|
@ -5,7 +5,7 @@
|
||||
"int": {
|
||||
"maximum": 9223372036854775807,
|
||||
"minimum": -9223372036854775808,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
|
@ -3,7 +3,7 @@
|
||||
"Word": {
|
||||
"maximum": 1.8446744073709551615e19,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
|
@ -3,7 +3,7 @@
|
||||
"Word16": {
|
||||
"maximum": 65535,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
|
@ -3,7 +3,7 @@
|
||||
"Word32": {
|
||||
"maximum": 4294967295,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
|
@ -3,7 +3,7 @@
|
||||
"Word64": {
|
||||
"maximum": 1.8446744073709551615e19,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
|
@ -3,7 +3,7 @@
|
||||
"Word8": {
|
||||
"maximum": 255,
|
||||
"minimum": 0,
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
|
@ -14,7 +14,7 @@
|
||||
[37mtype[m: # [31mrequired[m
|
||||
product
|
||||
, [37mvalue[m: # [31mrequired[m
|
||||
[33m<number>[m # [32m64 bit signed integer[m
|
||||
[33m<integer>[m # [32m64 bit signed integer[m
|
||||
[37mtype[m: # [31mrequired[m
|
||||
literal
|
||||
]
|
||||
|
@ -1 +1 @@
|
||||
[33m<number>[m # [32m64 bit signed integer[m
|
||||
[33m<integer>[m # [32m64 bit signed integer[m
|
||||
|
@ -1 +1 @@
|
||||
[33m<number>[m # [32m16 bit signed integer[m
|
||||
[33m<integer>[m # [32m16 bit signed integer[m
|
||||
|
@ -1 +1 @@
|
||||
[33m<number>[m # [32m32 bit signed integer[m
|
||||
[33m<integer>[m # [32m32 bit signed integer[m
|
||||
|
@ -1 +1 @@
|
||||
[33m<number>[m # [32m64 bit signed integer[m
|
||||
[33m<integer>[m # [32m64 bit signed integer[m
|
||||
|
@ -1 +1 @@
|
||||
[33m<number>[m # [32m8 bit signed integer[m
|
||||
[33m<integer>[m # [32m8 bit signed integer[m
|
||||
|
@ -1 +1 @@
|
||||
[33m<number>[m # between [32m-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000[m and [32m10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000[m
|
||||
[33m<integer>[m
|
||||
|
@ -2,11 +2,11 @@
|
||||
[37mpossibly-empty-with-omitted-default[m: # [34moptional[m
|
||||
# default: [35m[][m
|
||||
# possibly empty list with omitted default empty list
|
||||
- [33m<number>[m # [32m64 bit signed integer[m
|
||||
- [33m<integer>[m # [32m64 bit signed integer[m
|
||||
[37mpossibly-empty-with-default[m: # [34moptional[m
|
||||
# default: [35m[][m
|
||||
# possibly empty list with default empty list
|
||||
- [33m<number>[m # [32m64 bit signed integer[m
|
||||
- [33m<integer>[m # [32m64 bit signed integer[m
|
||||
[37mrequired-non-empty[m: # [31mrequired[m
|
||||
# required non-empty list
|
||||
- [33m<string>[m
|
||||
|
@ -1,2 +1,2 @@
|
||||
[37m<key>[m:
|
||||
[33m<number>[m # [32m64 bit signed integer[m
|
||||
[33m<integer>[m # [32m64 bit signed integer[m
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user