json-everything: Base schema not resolving from $ref
Using the sandbox: https://json-everything.net/json-schema
- Nuget Package: JsonSchema.Net
- Nuget Version: 4.03
- OS: Windows
Describe the bug Exception is thrown when trying to validate against a valid Schema when using $ref keyword in the root.
To Reproduce
Json schema:
{ "$schema": "http://json-schema.org/draft-06/schema#", "$ref": "#/definitions/Order", "definitions": { "Order": { "type": "object", "additionalProperties": true, "properties": { "orderId": { "type": "string", "format": "uuid" } }, "required": [ "orderId" ], "title": "Order" } } }
Test data:
{ "orderId": "3cb65f2d-4049-43c1-b185-1943765acd9" }
Click “Validate” => nothing seems to happen but if you open the browser console you will see the following error:
Got the same error when trying to implement it myself.
Expected behavior No exception should be thrown, test data should validate to false with a message like “String ‘3cb65f2d-4049-43c1-b185-1943765acd9’ does not validate against format ‘uuid’.”
Additional context
Tried the same scenario on a validator that uses the Newtonsoft Schema, which results in correct validation.

About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (9 by maintainers)
Commits related to this issue
- reproduce #432 — committed to gregsdennis/json-everything by gregsdennis a year ago
I just pushed an update that handles URIs a bit better in *nix systems. Please see if that fixes your problem.
If not, please open a new issue with some reproduction steps.
I’ve pushed the fix for the library. v4.0.4 should be available soon, and it should be working in the playground as soon as that redeploys.
I’ll work on handling exceptions better in the website in the future.