Hi
Ensure you are setting the correct REST API file name to match the file deployed in your application, see the screen grab below for example.
Also often the JSON models for REST API responses are often provided in the Swagger "definitions" or OpenAPI 3 "components/schemas" section, and it's much simpler to provide the JSON path directly to that.
For example the standard Pets Store Swagger 2 example operation "getPetById" defines its response as
"schema" : { "$ref" : "#/definitions/Pet" }
So we can use the simple JSON pointer "/definitions/Pet" directly in the "Message" property on the REST Request node as in the screen grab below.
For reference the more complex JSON pointer for this would be "/paths/~1pet~1{petId}/get/responses/200/schema", noting that in JSON Pointers any "/" must be escaped as "~1", hence the "getPetById" operations path "/pet/{getId}" becomes "~1pet~1{petId}".
HTH
------------------------------
Martin Boag
Software Developer
IBM
------------------------------
Original Message:
Sent: Fri November 26, 2021 05:56 AM
From: Dinesh Kumar
Subject: Json payload validation
Hi, trying to validate json message through Rest Request node.
Properties set at node level are -
[
Message Domain- json
Message model- swagger.json
Message- /paths/~test/{id}/put/responses/200/schema
As resource uri in swagger schema is - /test/{id}
Validation- content and value
Parsing- immediate
]
I'm getting "Validation is enabled but no json schema file name given".
Is above path handling is correct?
------------------------------
Dinesh Kumar
------------------------------