From c6e64f36226d38009baa52a64c40d9d84ffe80be Mon Sep 17 00:00:00 2001 From: Benjamin Granados Date: Thu, 16 May 2024 15:24:06 +0200 Subject: [PATCH] Pushed data changes --- data/getting-started-examples.json | 6 ++- .../instances/default.json | 16 ++++++ .../schemas/default.json | 52 +++++++++++++++++++ 3 files changed, 72 insertions(+), 2 deletions(-) diff --git a/data/getting-started-examples.json b/data/getting-started-examples.json index 7d51bf646d..26e134ac92 100644 --- a/data/getting-started-examples.json +++ b/data/getting-started-examples.json @@ -1,13 +1,15 @@ [ { - "name": "Getting Started Guide", + "name": "Getting Started example", "default": true, "file": "/data/getting-started-examples/schemas/default.json", "instances": [ { "name": "Basic valid instance", "default": true, - "file": "/data/getting-started-examples/instances/default.json" + "valid": true, + "file": "/data/getting-started-examples/instances/default.json", + "details": "This is a valid JSON instance for the provided JSON Schema" } ] } diff --git a/data/getting-started-examples/instances/default.json b/data/getting-started-examples/instances/default.json index e69de29bb2..d09d10536b 100644 --- a/data/getting-started-examples/instances/default.json +++ b/data/getting-started-examples/instances/default.json @@ -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 + } + } + \ No newline at end of file diff --git a/data/getting-started-examples/schemas/default.json b/data/getting-started-examples/schemas/default.json index e69de29bb2..31764cc97a 100644 --- a/data/getting-started-examples/schemas/default.json +++ b/data/getting-started-examples/schemas/default.json @@ -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" ] + } + \ No newline at end of file