Bug when using external references?
See original GitHub issueAny reason why the following should fail? (see https://github.com/kgryte/is-my-json-valid/blob/master/test/failing.js)
var schema = {
"id": "test-schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Test schema.",
"type": "object",
"definitions": {
"port": {
"description": "schema for a port",
"type": "integer",
"minimum": 1024,
"maximum": 65536
}
},
"properties": {
"port": {
"$ref": "#/definitions/port"
}
},
"required": [
"port"
]
}
Test:
tape('external reference', function(t) {
var validate = validator({
'$ref': '#ext'
}, {
schemas: {'ext':schema}
})
t.notOk(validate({}), 'should be invalid') // valid
t.notOk(validate({port:80}), 'should be invalid') // valid
t.end()
})
As demonstrated in other tests, validate( 'beep' )
will fail, but for an object
having internal reference definitions, these are not being resolved.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Error from Excel External Reference Formula
Using Office 365, I have a worksheet where cell's contain formula's that point to information (a table of address information related to an...
Read more >The Danger of External References While Using Microsoft Excel
This is why using of external references within an Excel document should be handled carefully. The problem happens when you don't know what ......
Read more >External reference (xref) file is missing or unresolved in ...
Opening a drawing shows a message about missing xrefs. "One or more referenced files could not be located or read. What do you...
Read more >Problem with External References | Chandoo.org Excel Forums
Hello folks, hopefully someone out there can help me with a problem I'm having using external references within a formula.
Read more >How to fix Autocad Xref problems - YouTube
How to fix Autocad Xref problems - External Reference Issues in AutocadIn this tutorial, I share how to fix external reference problem in ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just confirmed this and had a look at the generated code. I’ll try to solve this in the coming week
Any updates on this? Facing the same issue