-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Dmitry Dygalo <[email protected]>
- Loading branch information
1 parent
f9bb59f
commit f9afda4
Showing
5 changed files
with
184 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"$id": "https://example.com/address.schema.json", | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"description": "An address similar to http://microformats.org/wiki/h-card", | ||
"type": "object", | ||
"properties": { | ||
"postOfficeBox": { | ||
"type": "string" | ||
}, | ||
"extendedAddress": { | ||
"type": "string" | ||
}, | ||
"streetAddress": { | ||
"type": "string" | ||
}, | ||
"locality": { | ||
"type": "string" | ||
}, | ||
"region": { | ||
"type": "string" | ||
}, | ||
"postalCode": { | ||
"type": "string" | ||
}, | ||
"countryName": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ "locality", "region", "countryName" ], | ||
"dependentRequired": { | ||
"postOfficeBox": [ "streetAddress" ], | ||
"extendedAddress": [ "streetAddress" ] | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"$id": "https://example.com/blog-post.schema.json", | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"description": "A representation of a blog post", | ||
"type": "object", | ||
"required": ["title", "content", "author"], | ||
"properties": { | ||
"title": { | ||
"type": "string" | ||
}, | ||
"content": { | ||
"type": "string" | ||
}, | ||
"publishedDate": { | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"author": { | ||
"$ref": "https://example.com/user-profile.schema.json" | ||
}, | ||
"tags": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"$id": "https://example.com/calendar.schema.json", | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"description": "A representation of an event", | ||
"type": "object", | ||
"required": [ "dtstart", "summary" ], | ||
"properties": { | ||
"startDate": { | ||
"type": "string", | ||
"description": "Event starting time" | ||
}, | ||
"endDate": { | ||
"type": "string", | ||
"description": "Event ending time" | ||
}, | ||
"summary": { | ||
"type": "string" | ||
}, | ||
"location": { | ||
"type": "string" | ||
}, | ||
"url": { | ||
"type": "string" | ||
}, | ||
"duration": { | ||
"type": "string", | ||
"description": "Event duration" | ||
}, | ||
"recurrenceDate": { | ||
"type": "string", | ||
"description": "Recurrence date" | ||
}, | ||
"recurrenceDule": { | ||
"type": "string", | ||
"description": "Recurrence rule" | ||
}, | ||
"category": { | ||
"type": "string" | ||
}, | ||
"description": { | ||
"type": "string" | ||
}, | ||
"geo": { | ||
"$ref": "https://example.com/geographical-location.schema.json" | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"$id": "https://example.com/device.schema.json", | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"type": "object", | ||
"properties": { | ||
"deviceType": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["deviceType"], | ||
"oneOf": [ | ||
{ | ||
"properties": { | ||
"deviceType": { "const": "smartphone" } | ||
}, | ||
"$ref": "https://example.com/smartphone.schema.json" | ||
}, | ||
{ | ||
"properties": { | ||
"deviceType": { "const": "laptop" } | ||
}, | ||
"$ref": "https://example.com/laptop.schema.json" | ||
} | ||
] | ||
} | ||
|
||
{ | ||
"$id": "https://example.com/smartphone.schema.json", | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"type": "object", | ||
"properties": { | ||
"brand": { | ||
"type": "string" | ||
}, | ||
"model": { | ||
"type": "string" | ||
}, | ||
"screenSize": { | ||
"type": "number" | ||
} | ||
}, | ||
"required": ["brand", "model", "screenSize"] | ||
} | ||
|
||
{ | ||
"$id": "https://example.com/laptop.schema.json", | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"type": "object", | ||
"properties": { | ||
"brand": { | ||
"type": "string" | ||
}, | ||
"model": { | ||
"type": "string" | ||
}, | ||
"processor": { | ||
"type": "string" | ||
}, | ||
"ramSize": { | ||
"type": "number" | ||
} | ||
}, | ||
"required": ["brand", "model", "processor", "ramSize"] | ||
} | ||
|