*Asserts the field as JSON integer.*

        The field consists of parts separated by spaces, the parts being
        object property names or array indices starting from 0, and the root
        being the instance created by the last request (see `Output` for it).

        For asserting deeply nested properties or multiple objects at once,
        [http://goessner.net/articles/JsonPath|JSONPath] can be used with
        [https://github.com/h2non/jsonpath-ng#jsonpath-syntax|supported JSONPath expressions],
        the root being the response body.

        *Enum*

        The allowed values for the property as zero or more arguments.
        If none given, the value of the property is not asserted.

        *Validations*

        The JSON Schema validation keywords
        [https://json-schema.org/understanding-json-schema/reference/numeric.html#integer|for numeric types]
        can be used. Validations are optional but update the schema of
        the property (more accurate) if given.
        `Output Schema` can be used for the current schema of the field.

        The keyword will fail if any of the given validations fail.
        Given validations can be skipped altogether by adding ``skip=true``.
        When skipped, the schema is updated but the validations are not ran.
        Skip is intented mainly for debugging the updated schema before aborting.

        *Examples*

        | `GET`  | /users/1 | | # https://jsonplaceholder.typicode.com/users/1 |
        | `Integer` | response body id | | # value is optional |
        | `Integer` | response body id | 1 |
        | `Integer` | response body id | ${1} | # same as above |
        | `Integer` | $.id | 1 | # JSONPath alternative |

        | `GET`  | /users?_limit=10 | | | | # https://jsonplaceholder.typicode.com/users |
        | `Integer` | response body 0 id | 1 | | |
        | `Integer` | $[0].id | 1 | | | # same as above |
        | `Integer` | $[*].id | | minimum=1 | maximum=10 |

def integer(self, field, *enum, **validations):
        """*Asserts the field as JSON integer.*

        The field consists of parts separated by spaces, the parts being
        object property names or array indices starting from 0, and the root
        being the instance created by the last request (see `Output` for it).

        For asserting deeply nested properties or multiple objects at once,
        [http://goessner.net/articles/JsonPath|JSONPath] can be used with
        [https://github.com/h2non/jsonpath-ng#jsonpath-syntax|supported JSONPath expressions],
        the root being the response body.

        *Enum*

        The allowed values for the property as zero or more arguments.
        If none given, the value of the property is not asserted.

        *Validations*

        The JSON Schema validation keywords
        [https://json-schema.org/understanding-json-schema/reference/numeric.html#integer|for numeric types]
        can be used. Validations are optional but update the schema of
        the property (more accurate) if given.
        `Output Schema` can be used for the current schema of the field.

        The keyword will fail if any of the given validations fail.
        Given validations can be skipped altogether by adding ``skip=true``.
        When skipped, the schema is updated but the validations are not ran.
        Skip is intented mainly for debugging the updated schema before aborting.

        *Examples*

        | `GET`  | /users/1 | | # https://jsonplaceholder.typicode.com/users/1 |
        | `Integer` | response body id | | # value is optional |
        | `Integer` | response body id | 1 |
        | `Integer` | response body id | ${1} | # same as above |
        | `Integer` | $.id | 1 | # JSONPath alternative |

        | `GET`  | /users?_limit=10 | | | | # https://jsonplaceholder.typicode.com/users |
        | `Integer` | response body 0 id | 1 | | |
        | `Integer` | $[0].id | 1 | | | # same as above |
        | `Integer` | $[*].id | | minimum=1 | maximum=10 |
        """
        values = []
        for found in self._find_by_field(field):
            schema = found["schema"]
            reality = found["reality"]
            skip = self._input_boolean(validations.pop("skip", False))
            self._set_type_validations("integer", schema, validations)
            if enum:
                if "enum" not in schema:
                    schema["enum"] = []
                for value in enum:
                    value = self._input_integer(value)
                    if value not in schema["enum"]:
                        schema["enum"].append(value)
            elif self._should_add_examples():
                schema["examples"] = [reality]
            if not skip:
                self._assert_schema(schema, reality)
            values.append(reality)
        return values