Skip to content

Commit d893b27

Browse files
author
Chris Wiechmann
authored
Update README.md
1 parent 1a22b83 commit d893b27

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ import com.vordel.trace.Trace
2323
2424
def invoke(msg)
2525
{
26-
String swagger = msg.get('var.swagger')
27-
def validator = OpenAPIValidator.getInstance(swagger);
26+
def validator = OpenAPIValidator.getInstance(apiId, "apiadmin", "changeme");
2827
def payload = bodyAsString(msg.get("content.body"));
2928
def path = msg.get("api.method.path");
3029
def verb = msg.get("http.request.verb");
@@ -61,8 +60,10 @@ import com.vordel.trace.Trace
6160
6261
def invoke(msg)
6362
{
64-
String swagger = msg.get('var.swagger')
65-
def validator = OpenAPIValidator.getInstance(swagger);
63+
// Read OpenAPI-Spec from an attribute
64+
// String swagger = msg.get('var.swagger')
65+
// def validator = OpenAPIValidator.getInstance(swagger);
66+
def validator = OpenAPIValidator.getInstance(apiId, "apiadmin", "changeme");
6667
def payload = bodyAsString(msg.get('content.body'));
6768
def path = msg.get("api.method.path");
6869
def verb = msg.get("http.request.verb");

0 commit comments

Comments
 (0)