Skip to content

Commit

Permalink
update: changing file location
Browse files Browse the repository at this point in the history
  • Loading branch information
DhairyaMajmudar committed Jun 5, 2024
1 parent 443977a commit 7d424fe
Show file tree
Hide file tree
Showing 8 changed files with 215 additions and 0 deletions.
38 changes: 38 additions & 0 deletions public/getting-started-examples.json
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 public/getting-started-examples/instances/default-extended-v.json
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
}
}
5 changes: 5 additions & 0 deletions public/getting-started-examples/instances/default-ko.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"productId": 1,
"product": "An ice sculpture",
"price": "100"
}
6 changes: 6 additions & 0 deletions public/getting-started-examples/instances/default-ok.json
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"]
}
16 changes: 16 additions & 0 deletions public/getting-started-examples/instances/default.json
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
}
}

32 changes: 32 additions & 0 deletions public/getting-started-examples/schemas/default copy.json
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 public/getting-started-examples/schemas/default-extended.json
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"]
}
52 changes: 52 additions & 0 deletions public/getting-started-examples/schemas/default.json
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" ]
}

0 comments on commit 7d424fe

Please sign in to comment.