*Updates the schema to validate the response body properties.*

        Expectations are effective for following requests in the test suite,
        or until they are reset or updated by using expectation keywords again.
        On the test suite level (suite setup), they are best used for expecting
        the endpoint wide properties that are common regardless of the tested
        HTTP method, and on the test case level (test setup) to merge in
        the HTTP method specific properties.

        `Expect Response Body` is intented to be used on the test case level,
        to validate that the response body has the expected properties for
        the particular HTTP method. Note that if something about response body
        has been already expected with `Expected Response`, using this keyword
        updates the expectations in terms of given response body properties.

        If the keyword is used, following HTTP keywords will fail if
        their response body is not valid against the expected schema.

        If the keyword is not used, and no schema is already expected with
        `Expect Response` for response ``body``, a new schema is inferred for it.
        Use `Output Schema` to output it and use it as an input to this keyword.

        *Tips*

        Regardless whether the HTTP method returns one (an object) or many
        (an array of objects), the validation of the object property types and features can usually be done to some extent on the test suite level
        with `Expect Response`, then extended on the test case level using this
        keyword. This helps in ensuring that the data model is unified between
        the different HTTP methods.

        *Examples*

        | `Expect Response Body` | ${CURDIR}/user_properties.json | # See `Output Schema` |
        | `Expect Response Body` | { "required": ["id", "token"] } | # Only these are required from this method |
        | `Expect Response Body` | { "additionalProperties": false } | # Nothing extra should be responded by this method |

def expect_response_body(self, schema):
        """*Updates the schema to validate the response body properties.*

        Expectations are effective for following requests in the test suite,
        or until they are reset or updated by using expectation keywords again.
        On the test suite level (suite setup), they are best used for expecting
        the endpoint wide properties that are common regardless of the tested
        HTTP method, and on the test case level (test setup) to merge in
        the HTTP method specific properties.

        `Expect Response Body` is intented to be used on the test case level,
        to validate that the response body has the expected properties for
        the particular HTTP method. Note that if something about response body
        has been already expected with `Expected Response`, using this keyword
        updates the expectations in terms of given response body properties.

        If the keyword is used, following HTTP keywords will fail if
        their response body is not valid against the expected schema.

        If the keyword is not used, and no schema is already expected with
        `Expect Response` for response ``body``, a new schema is inferred for it.
        Use `Output Schema` to output it and use it as an input to this keyword.

        *Tips*

        Regardless whether the HTTP method returns one (an object) or many
        (an array of objects), the validation of the object property types and features can usually be done to some extent on the test suite level
        with `Expect Response`, then extended on the test case level using this
        keyword. This helps in ensuring that the data model is unified between
        the different HTTP methods.

        *Examples*

        | `Expect Response Body` | ${CURDIR}/user_properties.json | # See `Output Schema` |
        | `Expect Response Body` | { "required": ["id", "token"] } | # Only these are required from this method |
        | `Expect Response Body` | { "additionalProperties": false } | # Nothing extra should be responded by this method |
        """
        response_properties = self.schema["properties"]["response"][
            "properties"
        ]
        if "body" in response_properties:
            response_properties["body"].update(self._input_object(schema))
        else:
            response_properties["body"] = self._input_object(schema)
        return response_properties["body"]