I'm using postman to validate the schema of json data returned from an api.
I have a test that runs through basic http validation, then ends with:
if (tv4.error){
console.log("Validation failed: ", tv4.error);
}
The error I get back is…
This is what i am trying, but it always passes the test even for bad results.
pm.test("Schema is valid", function () {
var data = pm.response.json();
var schema = {
...
my schema
...
};
tv4.validate(data,…
Is there a way to set a custom message for json schema (tv4) for when it fails at a oneOf field?
I saw that there was an issue opened for custom messages about a year ago here and here but is there a way to make this work for something like this?
{
…
I've did a lot of tests but I coulnd't find the way to solve it. Simplifying, I have this Postman test script to validate that the JSON response es according with the JSON schema defined to this API:
const stockQuotesSchema =…
I need a javascript regex pattern to test a schema variable, so that it should have either of the following.
It can start with any character followed by "_water_glass" and must not be anything after water_glass like "xxxx_water_glass"
or
It can…
tv4.validate will always return true. No matter if schema is valid JSON or even just dummy string. I browse stackoverflow for related issues and banUnknownProperties does not help me
As i told i even tried to change schema variable to "dummy" and…
I need to get a list of the required fields out of a JSON-Schema+Data.
Currently, we are using AJV to get error messages in our forms with JSON Schema and it is working great.
I need a way to get all the required fields (even if filled) in order to…
I'm trying to validate my JSON schema and use the additionalProperties: false to confirm there is not other properties.
My responseBody look like this:
[
{
"id": 1234567890987654,
"email": "eemail@domain.com",
"civility": 0,
…
is possible to validate JSON, if value of object is true, then this object is valid, and if Obj2.included == true is valid, if Obj1.included == true ?
This is small piece of schema:
'attachments': {
'type': 'object',
…
I would like to validate that a property called "foo" contains an array of "bar" objects.
Using TV4 for validation all works as expected if I use an array as the value of foo however if I specify something other than an array such as a string or an…
I am using postman, i have added a test to validate the schema of the response.
The schema and response schema return as expected, but somewhere in the following code i get the error "tv4.validateResult TypeError: Cannot read property '$ref' of…
I'm currently using angular-schema-form (https://github.com/json-schema-form/angular-schema-form) to generate forms based on json schema. The form generates as expected but while validating it gives me an error "Please add error message for tv4-xxx"…
I'm new to Angular Schema Form and having some issues with select and checkbox fields required validation.
Under $scope.schema I have the select field named designation:
"designation": {
"title": "Designation",
"type": "select",
…