Skip to content

Commit 8919ce9

Browse files
committed
Add $schema to optional/format 2019-09 tests
1 parent d88c04f commit 8919ce9

20 files changed

+77
-19
lines changed

tests/draft2019-09/optional/format/date-time.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "validation of date-time strings",
4-
"schema": { "format": "date-time" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "date-time"
7+
},
58
"tests": [
69
{
710
"description": "all string formats ignore integers",

tests/draft2019-09/optional/format/date.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "validation of date strings",
4-
"schema": { "format": "date" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "date"
7+
},
58
"tests": [
69
{
710
"description": "all string formats ignore integers",

tests/draft2019-09/optional/format/duration.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "validation of duration strings",
4-
"schema": { "format": "duration" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "duration"
7+
},
58
"tests": [
69
{
710
"description": "all string formats ignore integers",

tests/draft2019-09/optional/format/email.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "validation of e-mail addresses",
4-
"schema": { "format": "email" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "email"
7+
},
58
"tests": [
69
{
710
"description": "all string formats ignore integers",

tests/draft2019-09/optional/format/hostname.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "validation of host names",
4-
"schema": { "format": "hostname" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "hostname"
7+
},
58
"tests": [
69
{
710
"description": "all string formats ignore integers",

tests/draft2019-09/optional/format/idn-email.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "validation of an internationalized e-mail addresses",
4-
"schema": { "format": "idn-email" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "idn-email"
7+
},
58
"tests": [
69
{
710
"description": "all string formats ignore integers",

tests/draft2019-09/optional/format/idn-hostname.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "validation of internationalized host names",
4-
"schema": { "format": "idn-hostname" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "idn-hostname"
7+
},
58
"tests": [
69
{
710
"description": "all string formats ignore integers",

tests/draft2019-09/optional/format/ipv4.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "validation of IP addresses",
4-
"schema": { "format": "ipv4" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "ipv4"
7+
},
58
"tests": [
69
{
710
"description": "all string formats ignore integers",

tests/draft2019-09/optional/format/ipv6.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "validation of IPv6 addresses",
4-
"schema": { "format": "ipv6" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "ipv6"
7+
},
58
"tests": [
69
{
710
"description": "all string formats ignore integers",

tests/draft2019-09/optional/format/iri-reference.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "validation of IRI References",
4-
"schema": { "format": "iri-reference" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "iri-reference"
7+
},
58
"tests": [
69
{
710
"description": "all string formats ignore integers",

tests/draft2019-09/optional/format/iri.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "validation of IRIs",
4-
"schema": { "format": "iri" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "iri"
7+
},
58
"tests": [
69
{
710
"description": "all string formats ignore integers",

tests/draft2019-09/optional/format/json-pointer.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "validation of JSON-pointers (JSON String Representation)",
4-
"schema": { "format": "json-pointer" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "json-pointer"
7+
},
58
"tests": [
69
{
710
"description": "all string formats ignore integers",

tests/draft2019-09/optional/format/regex.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "validation of regular expressions",
4-
"schema": { "format": "regex" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "regex"
7+
},
58
"tests": [
69
{
710
"description": "all string formats ignore integers",

tests/draft2019-09/optional/format/relative-json-pointer.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "validation of Relative JSON Pointers (RJP)",
4-
"schema": { "format": "relative-json-pointer" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "relative-json-pointer"
7+
},
58
"tests": [
69
{
710
"description": "all string formats ignore integers",

tests/draft2019-09/optional/format/time.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "validation of time strings",
4-
"schema": { "format": "time" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "time"
7+
},
58
"tests": [
69
{
710
"description": "all string formats ignore integers",

tests/draft2019-09/optional/format/unknown.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "unknown format",
4-
"schema": { "format": "unknown" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "unknown"
7+
},
58
"tests": [
69
{
710
"description": "unknown formats ignore integers",

tests/draft2019-09/optional/format/uri-reference.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "validation of URI References",
4-
"schema": { "format": "uri-reference" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "uri-reference"
7+
},
58
"tests": [
69
{
710
"description": "all string formats ignore integers",

tests/draft2019-09/optional/format/uri-template.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "format: uri-template",
4-
"schema": { "format": "uri-template" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "uri-template"
7+
},
58
"tests": [
69
{
710
"description": "all string formats ignore integers",

tests/draft2019-09/optional/format/uri.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[
22
{
33
"description": "validation of URIs",
4-
"schema": { "format": "uri" },
4+
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"format": "uri"
7+
},
58
"tests": [
69
{
710
"description": "a valid URL with anchor tag",

tests/draft2019-09/optional/format/uuid.json

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
"description": "uuid format",
44
"schema": {
5+
"$schema": "https://json-schema.org/draft/2019-09/schema",
56
"format": "uuid"
67
},
78
"tests": [

0 commit comments

Comments
 (0)