jsonschema

enforce empty JSON schema

enforce empty JSON schema
I want a JSON schema that enforces an empty JSON object, e.g.{}Is this a good idea and possible?I tried the following but it allows me to enter anything in the JSON body:{ "description": "voice mail record", "type": "obj

JSON Schema Validation - Why is required not being enforced?

JSON Schema Validation - Why is required not being enforced?
I've been trying to create a JSON Schema and have been using an online validation toolhttp://jsonschemalint.com/. I made a change to my JSON object that I expected to fail against my schema but it didn't - so I think I must have made a mistake somewh

How to use additionalProperties with allOf in JSON schema?

How to use additionalProperties with allOf in JSON schema?
Consider this example:"allOf": [ {"$ref": "test-address-prefix-types-base.json#"}, { "properties": {}, "additionalProperties" : false } ]}When I validate this with Java schema validator, I get error saying

How to manage multiple JSON schema files?

How to manage multiple JSON schema files?
I'm trying to validate my JSON API using node.js + json-schema.js from commonjs-utils. Just single validation was easy but could not find right way how to manage multiple schema files to enable referencing each other.Suppose that I got two Models & t

What is the logical relationship between keyword in a json schema?

What is the logical relationship between keyword in a json schema?
According to the specification (http://json-schema.org/schema) there is no mutual exclusion among schema keywords. For example I could create the following schema:{ "properties" : { "foo" : {"type" : "string"} } &qu

JSON schema for an object whose value is an array of objects

JSON schema for an object whose value is an array of objects
I am writing a software that can read the JSON data from a file. The file contains "person" - an object whose value is an array of objects. I am planning to use a JSON schema validating libraries to validate the contents instead of writing the c

How can I get Visual Studio 2013 to use a custom JSON schema?

How can I get Visual Studio 2013 to use a custom JSON schema?
I am working on a project that involves the use of JSON to store and retrieve data; in order to write some example data I am using VS2013's JSON editor, which supports, supposedly, the use of arbitrary JSON schema for its Intellisense code-completion

Tool to generate JSON schema from JSON data

Tool to generate JSON schema from JSON data
We have this json schemadraft. I would like to get a sample of my JSON data and generate a skeleton for the JSON schema, that I can rework manually, adding things like description, required, etc, which can not be infered from the specific examples.Fo

JSON schema does not validate against valid data (validictory)

JSON schema does not validate against valid data (validictory)
The following data + JSON schema (generated from using JSON Schema Generator with the same data) is supposed to validate correctly. However instead I receive a valdation error here.The validation is based on the validictory module.import json import

Using $ref for jsonschema in Abao

Using $ref for jsonschema in Abao
Can someone help with schemas refs in abao? How to use --schemas option? Here is simple gisthttps://gist.github.com/SeanSilke/e5a2f7673ad4aa2aa43ba800c9aec31bI try to run "abao api.raml --schemas fref.json" but got error " Missing/unresolve

Json schema how to validate property keys based of another property value?

Json schema how to validate property keys based of another property value?
Data:{ "languages": ['en', 'ch'], "file": { "en": "file1", "ch": "file2" } }How to define a schema that verifies name of keys in file property by "languages" property?{ "$schema&qu

What properties of an item should be included in the json schema?

What properties of an item should be included in the json schema?
I am confused about for which situation I am defining the properties in my json schemas.Assume I have an itemproductfor which I am trying to define a schema. In my database theproductstable hasid,brand_id,name,item_numberanddescription. All exceptdes

Swagger: how to represent a property whose type if oneOf a list of types

Swagger: how to represent a property whose type if oneOf a list of types
I have an object that has a property that is an object whose type would be one of list of types. All my attempts have been rejected by Swagger Editor with the following error:Data does not match any schemas from 'anyOf' Jump to line 43 Details Object

Generating JSON schema from C# class

Generating JSON schema from C# class
Is there any way to problematically generate JSON schema from a C# class? Something which we can do manually using thehttp://www.jsonschema.net/You can use Json.NET for that. Check out this article:http://sixgun.wordpress.com/2012/02/09/using-json-ne

Why doesn't jsonschema validate following definition from schema?

Why doesn't jsonschema validate following definition from schema?
I have definition as below. And it does not validatemy_field_type_1at all. What could be the reason? I am using jsonschema's python module.definitions: TestRouteSchema1: required: - my_field properties: my_field: type: object my_field_type_1: $ref: "

APIkit Router can't resolve $ref in JSON schema

APIkit Router can't resolve $ref in JSON schema
I'm using the APIkit Router and have an endpoint for postingInvoiceGroups. In the RAML I've specified the InvoiceGroups.schema.json (and related schemas). Here's a simplified version of the schema:{ "type" : "object", "id" :

Error: can't resolve reference error.json from id #

Error: can't resolve reference error.json from id #
I not understand how correct reference to other schema. I usedajv, and have next two schemaFirst schema incorrect-email.json:{ "title": "Не корректный email", "properties": { "status": { "description": &qu

Is there a way to define certain parts of my JSON schema as elements that must simply validate according to the core JSON schema?

Is there a way to define certain parts of my JSON schema as elements that must simply validate according to the core JSON schema?
I have some generated JSON schemas and I am trying to use JSON schema to draw up a schema for these schemas. The reason for this is that I need others to provide me with JSON schemas that match what I have generated. They can create them any way they
What Others Are Reading