You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
Importing an openapi definition for requests using application/xml body type with schema will result in expectations that never seem to be matching the body.
What you are trying to do
I would like to import an OpenAPI definition and then verify that my service is sending requests in the right format.
MockServer version
5.15.0
To Reproduce
Steps to reproduce the issue:
I used the MockServerJavaClient to import open api definition
Tried running a request against it and logs show everything matches except for body.
notice how the content-type description seems broken. Why the \/ ??
Also the body type is JSON_SCHEMA, but that could be OK because OpenAPI uses the same schemas for both XML and JSON, however, is Mock Server going to read the xml tags in the schema?
Expected behaviour
Simple request should have been accepted. If there is indeed some valid reason to reject the body, I would appreciate that the reason is explained in the logs. So far the only explanation we get is "body doesn't match". Why doesn't it match? Is is the content-type? Is it the xml doesn't match the schema? A mandatory field is missing?
Describe the issue
Importing an openapi definition for requests using application/xml body type with schema will result in expectations that never seem to be matching the body.
What you are trying to do
I would like to import an OpenAPI definition and then verify that my service is sending requests in the right format.
MockServer version
5.15.0
To Reproduce
Steps to reproduce the issue:
I noticed that the expectation seems weird:
"method" : "POST",
2023-12-18 11:03:30 "path" : "/request",
2023-12-18 11:03:30 "headers" : {
2023-12-18 11:03:30 "content-type" : [ "application\/xml.*" ]
2023-12-18 11:03:30 },
2023-12-18 11:03:30 "body" : {
2023-12-18 11:03:30 "type" : "JSON_SCHEMA",
2023-12-18 11:03:30 "jsonSchema" : {
notice how the content-type description seems broken. Why the \/ ??
Also the body type is JSON_SCHEMA, but that could be OK because OpenAPI uses the same schemas for both XML and JSON, however, is Mock Server going to read the xml tags in the schema?
Expected behaviour
Simple request should have been accepted. If there is indeed some valid reason to reject the body, I would appreciate that the reason is explained in the logs. So far the only explanation we get is "body doesn't match". Why doesn't it match? Is is the content-type? Is it the xml doesn't match the schema? A mandatory field is missing?
MockServer Log
The text was updated successfully, but these errors were encountered: