ajv Questions
1
Solved
I'm trying to validate a JSON file using JSON Schema, in order to find cases of "broken references". Essentially my file consists of items and groups, with each item belonging to a single group ref...
Mele asked 23/11, 2017 at 11:22
1
I'm trying to import the definitions from another json schema using $ref but getting the following error:
can't resolve reference ../base/definitions.schema.json#/definitions/datetime from id #
...
Wamble asked 24/9, 2017 at 8:47
1
Solved
Here's my JSON Schema:
{
"required": [
"username",
"password",
"confirmPassword"
],
"properties": {
"username": {
"minLength...
Chavaree asked 21/9, 2017 at 17:11
1
I wrote the following code.
var ajv = new require('ajv');
ajv.addKeyword('allowNull', {
type: 'null',
metaSchema: {
type: 'boolean'
},
compile: function(allowNullEnable, parentSchema) {
re...
1
Solved
Functions returns object which looks something like this:
{
"answer": {
"vehicle_type": 1,
"message": "Car"
},
"model": "VW",
"color": "red"
}
'Answer' object is always there. Other fiel...
Apogee asked 6/6, 2017 at 21:38
1
I would like to specify a regexp pattern for one field based on the data in another. Is this possible? I've tried switch and $data but not sure how to use them.
for example, if data looks like:
{
...
1
Solved
I'm using AJV library to validate my JSON schema. I want to be able to validate Startdate to be a string. In the case where it is not a string, it should be converted to N/A. Currently, it only con...
Volans asked 15/3, 2017 at 19:51
1
Solved
I make json validation with ajv. I need to validate array of strings. I know which elements can be placed there so I make appropriate 'enum'. But in some case enum can be empty and array can be emp...
Trinidadtrinitarian asked 4/6, 2016 at 22:32
© 2022 - 2025 — McMap. All rights reserved.