github.com/kaptinlin/jsonschema@v0.4.6/testdata/JSON-Schema-Test-Suite/tests/draft7/multipleOf.json (about)

     1  [
     2      {
     3          "description": "by int",
     4          "schema": {"multipleOf": 2},
     5          "tests": [
     6              {
     7                  "description": "int by int",
     8                  "data": 10,
     9                  "valid": true
    10              },
    11              {
    12                  "description": "int by int fail",
    13                  "data": 7,
    14                  "valid": false
    15              },
    16              {
    17                  "description": "ignores non-numbers",
    18                  "data": "foo",
    19                  "valid": true
    20              }
    21          ]
    22      },
    23      {
    24          "description": "by number",
    25          "schema": {"multipleOf": 1.5},
    26          "tests": [
    27              {
    28                  "description": "zero is multiple of anything",
    29                  "data": 0,
    30                  "valid": true
    31              },
    32              {
    33                  "description": "4.5 is multiple of 1.5",
    34                  "data": 4.5,
    35                  "valid": true
    36              },
    37              {
    38                  "description": "35 is not multiple of 1.5",
    39                  "data": 35,
    40                  "valid": false
    41              }
    42          ]
    43      },
    44      {
    45          "description": "by small number",
    46          "schema": {"multipleOf": 0.0001},
    47          "tests": [
    48              {
    49                  "description": "0.0075 is multiple of 0.0001",
    50                  "data": 0.0075,
    51                  "valid": true
    52              },
    53              {
    54                  "description": "0.00751 is not multiple of 0.0001",
    55                  "data": 0.00751,
    56                  "valid": false
    57              }
    58          ]
    59      },
    60      {
    61          "description": "float division = inf",
    62          "schema": {"type": "integer", "multipleOf": 0.123456789},
    63          "tests": [
    64              {
    65                  "description": "always invalid, but naive implementations may raise an overflow error",
    66                  "data": 1e308,
    67                  "valid": false
    68              }
    69          ]
    70      },
    71      {
    72          "description": "small multiple of large integer",
    73          "schema": {"type": "integer", "multipleOf": 1e-8},
    74          "tests": [
    75              {
    76                  "description": "any integer is a multiple of 1e-8",
    77                  "data": 12391239123,
    78                  "valid": true
    79              }
    80          ]
    81      }
    82  ]