Closed panSarin closed 8 years ago
Hello.
I have complex json-schema files. With definitions and links. In link i use targetSchema like
"targetSchema": { "type": "object", "$ref": "/schemata/my_resource#/definitions/my_resource_create_response" }
So in my tests i want to use
schema = JSON.parse(File.read(my_json_path))['definitions'][schema_def_name] # schema_def_name => my_resource_create_response JSON::Validator.validate!(schema, response.body, parse_data: false)
But whatever i try to do it it always expects me to give him url as a schema. Can i pass some JSON schema definition as a schema to compare with my response body ?
Ok nvm, it wasn't about path to file. It was confusing error about $ref path :< srry!
Hello.
I have complex json-schema files. With definitions and links. In link i use targetSchema like
So in my tests i want to use
But whatever i try to do it it always expects me to give him url as a schema. Can i pass some JSON schema definition as a schema to compare with my response body ?