Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions tests/draft2019-09/ref.json
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,30 @@
}
]
},
{
"description": "simple custom URI base URI with $ref via the custom URI",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this description needs to be more clear about what's "custom" is the URI scheme. Here's my suggestion.

Suggested change
"description": "simple custom URI base URI with $ref via the custom URI",
"description": "simple base URI using an arbitrary URI scheme with $ref to that URI",

"schema": {
"$comment": "URIs do not have to have HTTP(s) schemes",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "foo:bar/baz",
"minimum": 30,
"properties": {
"foo": {"$ref": "foo:bar/baz"}
}
},
"tests": [
{
"description": "valid under the custom URI IDed schema",
"data": {"foo": 37},
"valid": true
},
{
"description": "invalid under the custom URI IDed schema",
"data": {"foo": 12},
"valid": false
}
]
},
{
"description": "simple URN base URI with JSON pointer",
"schema": {
Expand Down
24 changes: 24 additions & 0 deletions tests/draft2020-12/ref.json
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,30 @@
}
]
},
{
"description": "simple custom URI base URI with $ref via the custom URI",
"schema": {
"$comment": "URIs do not have to have HTTP(s) schemes",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "foo:bar/baz",
"minimum": 30,
"properties": {
"foo": {"$ref": "foo:bar/baz"}
}
},
"tests": [
{
"description": "valid under the custom URI IDed schema",
"data": {"foo": 37},
"valid": true
},
{
"description": "invalid under the custom URI IDed schema",
"data": {"foo": 12},
"valid": false
}
]
},
{
"description": "simple URN base URI with JSON pointer",
"schema": {
Expand Down
24 changes: 24 additions & 0 deletions tests/draft6/ref.json
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,30 @@
}
]
},
{
"description": "simple custom URI base URI with $ref via the custom URI",
"schema": {
"$comment": "URIs do not have to have HTTP(s) schemes",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "foo:bar/baz",
"minimum": 30,
"properties": {
"foo": {"$ref": "foo:bar/baz"}
}
},
"tests": [
{
"description": "valid under the custom URI IDed schema",
"data": {"foo": 37},
"valid": true
},
{
"description": "invalid under the custom URI IDed schema",
"data": {"foo": 12},
"valid": false
}
]
},
{
"description": "simple URN base URI with JSON pointer",
"schema": {
Expand Down
24 changes: 24 additions & 0 deletions tests/draft7/ref.json
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,30 @@
}
]
},
{
"description": "simple custom URI base URI with $ref via the custom URI",
"schema": {
"$comment": "URIs do not have to have HTTP(s) schemes",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "foo:bar/baz",
"minimum": 30,
"properties": {
"foo": {"$ref": "foo:bar/baz"}
}
},
"tests": [
{
"description": "valid under the custom URI IDed schema",
"data": {"foo": 37},
"valid": true
},
{
"description": "invalid under the custom URI IDed schema",
"data": {"foo": 12},
"valid": false
}
]
},
{
"description": "simple URN base URI with JSON pointer",
"schema": {
Expand Down
24 changes: 24 additions & 0 deletions tests/v1/ref.json
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,30 @@
}
]
},
{
"description": "simple custom URI base URI with $ref via the custom URI",
"schema": {
"$comment": "URIs do not have to have HTTP(s) schemes",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "foo:bar/baz",
"minimum": 30,
"properties": {
"foo": {"$ref": "foo:bar/baz"}
}
},
"tests": [
{
"description": "valid under the custom URI IDed schema",
"data": {"foo": 37},
"valid": true
},
{
"description": "invalid under the custom URI IDed schema",
"data": {"foo": 12},
"valid": false
}
]
},
{
"description": "simple URN base URI with JSON pointer",
"schema": {
Expand Down
Loading