citrusframework / citrus

Framework for automated integration tests with focus on messaging integration
https://citrusframework.org
Apache License 2.0
445 stars 135 forks source link

OpenAPI request always generates random data, even if a body is specified #1168

Closed ueberfuhr closed 3 weeks ago

ueberfuhr commented 1 month ago

Citrus Version 4.2.1

Expected behavior When I specify a body for the request, this should be sent to the server, independent from being valid in comparison to the OpenAPI schema.

Actual behavior Random data is sent to the server.

Test case sample

        t.when(
                openapi()
                        .specification(apiSpecification)
                        .client(openApiClient)
                        .send("createTodo") // operationId
                        .message()
                        .body("{\"title\": \"test\"}")
        );