I would like to apply an additional "required" property in an array sub schema based on the presence of a property in the root schema. I have my schema set like this:  {     "$schema": "http://json-schema.org/draft-07/schema#"...
I've been writing simple JSON schemas but I ran into an API input call that is a bit more complex. I have one restful end route that can take 3 very different types of JSON:  localhost/foo  can take:  { "type" : "ice_cream", "...
I am trying to create mock data by using the json-server in combination with the json-schema-faker.  I was trying to use the $ref property but I understood that this only references the type and not the exact value.  Is there a way to reuse the exact...
Functions returns object which looks something like this:      {         "answer": {            "vehicle_type": 1,            "message": "Car"         },         "model": "VW",         "color":...
Is it valid to extend a JSON schema with custom properties?  The reason I am asking is, because I am using a schema to also render a form for the JSON the schema describes (each property described in the schema is  used as a form element with label a...
I am deciding on a validation library that I can use for both client and server side validation. I have been comparing JOI (+ joi-browser) and AJV.  As I understand it JOI and AJV can accomplish the same things.  AJV can even perform async validation...
Suppose we have schema following schema (from tutorial here):   {   "$schema": "http://json-schema.org/draft-04/schema#",    "definitions": {     "address": {       "type": "object",       "properti...
Here's my JSON Schema:  {   "required": [     "username",     "password",     "confirmPassword"   ],   "properties": {     "username": {       "minLength": 3,       "type": "stri...
I want to validate the input from an HTML form using a JSON Schema describing it. I'm using Gary Court's JSV to validate it and it returns an error consistently. I used JSON Schema Lint (jsonschemalint.com) to check my schema. In Chrome Schem...
Using express-jsonschema  How to validation two fields, for example:  ("quantity" == 0 && "actualQuantity" == 0) || ("quantity" > 0 && "actualQuantity" > 0)...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.