@@ -45,7 +45,10 @@ def invoke(msg)
4545 def verb = msg.get("http.request.verb");
4646 def queryParams = msg.get("params.query");
4747 def headers = msg.get("http.headers");
48+ def contentHeaders = msg.get("http.content.headers");
4849 try {
50+ // Content-Headers contains the required Content-Type header - Merge them into the headers attribute
51+ headers.addHeaders(contentHeaders);
4952 // Call the validator itself
5053 def rc = validator.isValidRequest(payload, verb, path, queryParams, headers);
5154 Trace.info('rc: ' + rc);
@@ -96,8 +99,11 @@ def invoke(msg)
9699 def verb = msg.get("http.request.verb");
97100 def status = msg.get("http.response.status");
98101 def headers = msg.get("http.headers");
102+ def contentHeaders = msg.get("http.content.headers");
99103 Trace.debug('Calling OpenAPIValidator: [path: ' + path + ', verb: ' + verb + ', status: ' + status + ']');
100104 try {
105+ // Content-Headers contains the required Content-Type header - Merge them into the headers attribute
106+ headers.addHeaders(contentHeaders);
101107 def rc = validator.isValidResponse(payload, verb, path, status, headers);
102108 return rc;
103109 // If you would like to return the validation messages, use the following method, that returns you a
0 commit comments