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", "...
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...
Using express-jsonschema  How to validation two fields, for example:  ("quantity" == 0 && "actualQuantity" == 0) || ("quantity" > 0 && "actualQuantity" > 0)...
I have a json schema defining several properties. I've moved 2 of the properties to definitions and I make references to them. I did this because I wanted to group them together and do some testing for these properties in a generic way. This work...
I'm evaluating using JSON Schema for validating form data.  I can use it to validate my form data when you click submit using AJV and then check it again on the server using a PHP implementation of JSON Schema.  That part sounds great, but I'...
I have an AJV schema like this:  // schema.js module.exports = {   title: 'task',   description: 'A Task Schema',   type: 'object',   properties: {     object_city: {       title: 'City',       type:'string'...
I'm newbie to json. I'm learning more things in Json schema but I stood helpless in testing  my user.json file against json-schema.json file. Please note I need to test with a javascript variable which should return either true or false to pr...
I am interested in generating a REST API coverage report. We're currently defining our API in RAML, and validating our unit test fixtures from both client and server via JSONSchema. We're also tracking unit test coverage already.  Is there an...
I have json schema definition like this:  (Update: basically its draft 03 format: http://json-schema.org/draft-03/schema#)  {     "$schema": "http://json-schema.org/draft-03/schema",     "product": {         "name": {...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.