-
-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
443977a
commit 7d424fe
Showing
8 changed files
with
215 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
[ | ||
{ | ||
"name": "Getting started basic schema", | ||
"default": true, | ||
"file": "/getting-started-examples/schemas/default.json", | ||
"instances": [ | ||
{ | ||
"name": "Valid instance", | ||
"default": true, | ||
"valid": true, | ||
"file": "/getting-started-examples/instances/default-ok.json", | ||
"details": "This is a valid JSON instance for the provided JSON Schema" | ||
}, | ||
{ | ||
"name": "Invalid instance", | ||
"default": false, | ||
"valid": false, | ||
"file": "/getting-started-examples/instances/default-ko.json", | ||
"details": "This is an invalid JSON instance for the provided JSON Schema" | ||
} | ||
] | ||
}, | ||
|
||
{ | ||
"name": "Getting started extended schema", | ||
"default": false, | ||
"file": "/getting-started-examples/schemas/default-extended.json", | ||
"instances": [ | ||
{ | ||
"name": "Valid instance", | ||
"default": true, | ||
"valid": true, | ||
"file": "/getting-started-examples/instances/default-extended-ok.json", | ||
"details": "This is a valid JSON instance for the provided JSON Schema" | ||
} | ||
] | ||
} | ||
] |
15 changes: 15 additions & 0 deletions
15
public/getting-started-examples/instances/default-extended-v.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,15 @@ | ||
{ | ||
"productId": 1, | ||
"productName": "An ice sculpture", | ||
"price": 12.5, | ||
"tags": ["cold", "ice"], | ||
"dimensions": { | ||
"length": 7.0, | ||
"width": 12.0, | ||
"height": 9.5 | ||
}, | ||
"warehouseLocation": { | ||
"latitude": -78.75, | ||
"longitude": 20.4 | ||
} | ||
} |
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,5 @@ | ||
{ | ||
"productId": 1, | ||
"product": "An ice sculpture", | ||
"price": "100" | ||
} |
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,6 @@ | ||
{ | ||
"productId": 1, | ||
"productName": "An ice sculpture", | ||
"price": 12.5, | ||
"tags": ["cold", "ice"] | ||
} |
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,16 @@ | ||
{ | ||
"productId": 1, | ||
"productName": "An ice sculpture", | ||
"price": 12.50, | ||
"tags": [ "cold", "ice" ], | ||
"dimensions": { | ||
"length": 7.0, | ||
"width": 12.0, | ||
"height": 9.5 | ||
}, | ||
"warehouseLocation": { | ||
"latitude": -78.75, | ||
"longitude": 20.4 | ||
} | ||
} | ||
|
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,32 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://example.com/product.schema.json", | ||
"title": "Product", | ||
"description": "A product from Acme's catalog", | ||
"type": "object", | ||
"properties": { | ||
"productId": { | ||
"description": "The unique identifier for a product", | ||
"type": "integer" | ||
}, | ||
"productName": { | ||
"description": "Name of the product", | ||
"type": "string" | ||
}, | ||
"price": { | ||
"description": "The price of the product", | ||
"type": "number", | ||
"exclusiveMinimum": 0 | ||
}, | ||
"tags": { | ||
"description": "Tags for the product", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"minItems": 1, | ||
"uniqueItems": true | ||
} | ||
}, | ||
"required": ["productId", "productName", "price"] | ||
} |
51 changes: 51 additions & 0 deletions
51
public/getting-started-examples/schemas/default-extended.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,51 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://example.com/product.schema.json", | ||
"title": "Product", | ||
"description": "A product from Acme's catalog", | ||
"type": "object", | ||
"properties": { | ||
"productId": { | ||
"description": "The unique identifier for a product", | ||
"type": "integer" | ||
}, | ||
"productName": { | ||
"description": "Name of the product", | ||
"type": "string" | ||
}, | ||
"price": { | ||
"description": "The price of the product", | ||
"type": "number", | ||
"exclusiveMinimum": 0 | ||
}, | ||
"tags": { | ||
"description": "Tags for the product", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"minItems": 1, | ||
"uniqueItems": true | ||
}, | ||
"dimensions": { | ||
"type": "object", | ||
"properties": { | ||
"length": { | ||
"type": "number" | ||
}, | ||
"width": { | ||
"type": "number" | ||
}, | ||
"height": { | ||
"type": "number" | ||
} | ||
}, | ||
"required": ["length", "width", "height"] | ||
}, | ||
"warehouseLocation": { | ||
"description": "Coordinates of the warehouse where the product is located.", | ||
"$ref": "https://example.com/geographical-location.schema.json" | ||
} | ||
}, | ||
"required": ["productId", "productName", "price"] | ||
} |
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,52 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://example.com/product.schema.json", | ||
"title": "Product", | ||
"description": "A product from Acme's catalog", | ||
"type": "object", | ||
"properties": { | ||
"productId": { | ||
"description": "The unique identifier for a product", | ||
"type": "integer" | ||
}, | ||
"productName": { | ||
"description": "Name of the product", | ||
"type": "string" | ||
}, | ||
"price": { | ||
"description": "The price of the product", | ||
"type": "number", | ||
"exclusiveMinimum": 0 | ||
}, | ||
"tags": { | ||
"description": "Tags for the product", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"minItems": 1, | ||
"uniqueItems": true | ||
}, | ||
"dimensions": { | ||
"type": "object", | ||
"properties": { | ||
"length": { | ||
"type": "number" | ||
}, | ||
"width": { | ||
"type": "number" | ||
}, | ||
"height": { | ||
"type": "number" | ||
} | ||
}, | ||
"required": [ "length", "width", "height" ] | ||
}, | ||
"warehouseLocation": { | ||
"description": "Coordinates of the warehouse where the product is located.", | ||
"$ref": "https://example.com/geographical-location.schema.json" | ||
} | ||
}, | ||
"required": [ "productId", "productName", "price" ] | ||
} | ||
|