Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions samples/core/01-basic-person/example1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://schemas.example.com/basic-person",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1990-05-15",
"email": "john.doe@example.com",
"age": 33,
"profileData": {
"preferences": {
"theme": "dark",
"notifications": true
},
"badges": ["verified", "premium"]
},
"isActive": true
}
9 changes: 9 additions & 0 deletions samples/core/01-basic-person/example2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://schemas.example.com/basic-person",
"firstName": "Jane",
"lastName": "Smith",
"dateOfBirth": "1985-12-03",
"email": "jane.smith@company.org",
"age": 28,
"profileData": "Simple string profile"
}
8 changes: 8 additions & 0 deletions samples/core/01-basic-person/example3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://schemas.example.com/basic-person",
"firstName": "Michael",
"lastName": "Johnson",
"dateOfBirth": "1978-09-22",
"email": "mike.j@example.net",
"isActive": false
}
42 changes: 42 additions & 0 deletions samples/core/01-basic-person/schema.struct.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "https://json-structure.org/meta/core/v0/#",
"$id": "https://schemas.example.com/basic-person",
"name": "Person",
"type": "object",
"description": "A basic person schema demonstrating primitive types",
"properties": {
"firstName": {
"type": "string",
"description": "The person's first name",
"maxLength": 50
},
"lastName": {
"type": "string",
"description": "The person's last name",
"maxLength": 50
},
"dateOfBirth": {
"type": "date",
"description": "The person's date of birth"
},
"email": {
"type": "string",
"description": "The person's email address",
"examples": ["john.doe@example.com"]
},
"age": {
"type": "int8",
"description": "The person's age in years (0-127)"
},
"profileData": {
"type": "any",
"description": "Flexible profile data - can be any JSON value"
},
"isActive": {
"type": "boolean",
"description": "Whether the person is currently active",
"default": true
}
},
"required": ["firstName", "lastName", "email"]
}
8 changes: 8 additions & 0 deletions samples/core/02-address/example1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://schemas.example.com/address",
"street": "123 Main Street",
"city": "New York",
"state": "New York",
"zipCode": "10001",
"country": "US"
}
8 changes: 8 additions & 0 deletions samples/core/02-address/example2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://schemas.example.com/address",
"street": "456 Oak Avenue",
"city": "Toronto",
"state": "Ontario",
"zipCode": "M5V 3A8",
"country": "CA"
}
6 changes: 6 additions & 0 deletions samples/core/02-address/example3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://schemas.example.com/address",
"street": "789 Queen Street",
"city": "London",
"country": "UK"
}
37 changes: 37 additions & 0 deletions samples/core/02-address/schema.struct.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "https://json-structure.org/meta/core/v0/#",
"$id": "https://schemas.example.com/address",
"name": "Address",
"type": "object",
"description": "An address schema demonstrating required fields and additional properties",
"properties": {
"street": {
"type": "string",
"description": "Street address line",
"maxLength": 100
},
"city": {
"type": "string",
"description": "City name",
"maxLength": 50
},
"state": {
"type": "string",
"description": "State or province",
"maxLength": 50
},
"zipCode": {
"type": "string",
"description": "Postal/ZIP code",
"maxLength": 20
},
"country": {
"type": "string",
"description": "Country code",
"enum": ["US", "CA", "MX", "UK", "DE", "FR", "JP", "AU"],
"examples": ["US", "CA"]
}
},
"required": ["street", "city", "country"],
"additionalProperties": false
}
51 changes: 51 additions & 0 deletions samples/core/03-financial-types/example1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$schema": "https://schemas.example.com/financial-types",
"invoiceNumber": "INV-2023-001",
"issueDate": "2023-11-13",
"dueDate": "2023-12-13",
"paymentTermsDays": 30,
"lineItems": [
{
"description": "Professional Services",
"quantity": 10,
"unitPrice": {
"amount": "150.00",
"currency": "USD"
},
"totalPrice": {
"amount": "1500.00",
"currency": "USD"
},
"weight": 0.0,
"discountPercent": 0
},
{
"description": "Software License",
"quantity": 1,
"unitPrice": {
"amount": "299.99",
"currency": "USD"
},
"totalPrice": {
"amount": "299.99",
"currency": "USD"
},
"weight": 0.5,
"discountPercent": 10.5
}
],
"subtotal": {
"amount": "1799.99",
"currency": "USD"
},
"taxRate": "0.0875",
"taxAmount": {
"amount": "157.50",
"currency": "USD"
},
"totalAmount": {
"amount": "1957.49",
"currency": "USD"
},
"cancelledDate": null
}
32 changes: 32 additions & 0 deletions samples/core/03-financial-types/example2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"$schema": "https://schemas.example.com/financial-types",
"invoiceNumber": "INV-2023-002",
"issueDate": "2023-11-14",
"dueDate": "2023-11-28",
"paymentTermsDays": 14,
"lineItems": [
{
"description": "Monthly Subscription",
"quantity": 1,
"unitPrice": {
"amount": "49.99",
"currency": "EUR"
},
"totalPrice": {
"amount": "49.99",
"currency": "EUR"
},
"weight": 0.0,
"discountPercent": 0
}
],
"subtotal": {
"amount": "49.99",
"currency": "EUR"
},
"totalAmount": {
"amount": "49.99",
"currency": "EUR"
},
"cancelledDate": "2023-11-20"
}
51 changes: 51 additions & 0 deletions samples/core/03-financial-types/example3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$schema": "https://schemas.example.com/financial-types",
"invoiceNumber": "INV-2023-003",
"issueDate": "2023-11-15",
"dueDate": "2023-12-15",
"paymentTermsDays": 30,
"lineItems": [
{
"description": "Consulting Hours",
"quantity": 26,
"unitPrice": {
"amount": "200.00",
"currency": "GBP"
},
"totalPrice": {
"amount": "5200.00",
"currency": "GBP"
},
"weight": 0.0,
"discountPercent": 5
},
{
"description": "Travel Expenses",
"quantity": 1,
"unitPrice": {
"amount": "450.75",
"currency": "GBP"
},
"totalPrice": {
"amount": "450.75",
"currency": "GBP"
},
"weight": 15.5,
"discountPercent": 0
}
],
"subtotal": {
"amount": "5650.75",
"currency": "GBP"
},
"taxRate": "0.2000",
"taxAmount": {
"amount": "1130.15",
"currency": "GBP"
},
"totalAmount": {
"amount": "6780.90",
"currency": "GBP"
},
"cancelledDate": null
}
Loading