Comments (2)
Hi @ablack3 - referencing files works (they are interpreted relative to the first schema passed to jsonvalidate from memory). Using schemas via URL/URI is not yet supported, though this is something that I agree it would be good to support.
None of this is well documented and something that we'll try and tidy up in the vignette at some point
from jsonvalidate.
This example seems to work so I think I'm making a mistake in my definition somewhere.
https://stackoverflow.com/questions/42999230/liquid-studio-how-to-write-a-json-schema-ref-to-another-file
schema <- '
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"additionalProperties": false,
"properties": {
"ReferenceToLocalSchema": {
"$ref": "#/definitions/LocalType"
},
"ReferenceToExternalSchema": {
"$ref": "Common.json#/definitions/ExternalType"
}
},
"definitions": {
"LocalType": {
"type": "object",
"additionalProperties": false,
"properties": {
"no-write": {
"type": "boolean",
"default": false
}
}
}
}
}
'
v <- jsonvalidate::json_validator(schema, "ajv")
from jsonvalidate.
Related Issues (20)
- can't validate against draft-04 meta schema HOT 4
- Regex flag when specifying a pattern HOT 1
- Dev version fails with biocompute HOT 1
- Refactor validator instances to have one per context
- Use roxygen markdown
- Deprecate and remove dataPath from errors
- Revdep failure with clinDataReview HOT 2
- Latest CRAN headaches
- Latest jsonvalidate throws "SyntaxError: Use of const in strict mode." HOT 17
- Is it possible to simply validate a JSON string? HOT 1
- Can't resolve path to sub-schemas in sub-folders HOT 4
- Resolve pointers (references) in json being validated prior to validation HOT 2
- More options for serialising `NULL` & `NA` when serialising?
- Support for protocol-based sub-schemas HOT 2
- Support options for `ajv` HOT 1
- Not sure how else to put this, it doesn't appear to work. HOT 1
- Serialization using `$ref` returns arrays
- Nesting an array inside an object in JSON schema always returns valid (even when it's not) HOT 2
- validating unique key values in array of objects
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsonvalidate.