0

I am trying to validate my json response in my rest assured tests and i get the following error in my schema. not sure how to resolve this. any help will be appreciated :) thank you.

error:

io.restassured.module.jsv.JsonSchemaValidationException: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('s' (code 115)): was expecting double-quote to start field name
 at [Source: java.io.StringReader@54c622a7; line: 1, column: 3]

schema:

{
  "definitions": {},
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://example.com/root.json",
  "type": "object",
  "title": "The Root Schema",
  "required": [
    "status"
  ],
  "properties": {
    "status": {
      "$id": "#/properties/status",
      "type": "string",
      "title": "The Status Schema",
      "default": "",
      "examples": [
        "PROCESSING"
      ],
      "pattern": "^(.*)$"
    }
  }
}

method:

Assert.assertThat(bookingResponse, matchesJsonSchemaInClasspath("book-response-schema.json"));
Fenomenoq
  • 51
  • 4

0 Answers0