-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathblogschema.json
More file actions
78 lines (78 loc) · 2.87 KB
/
blogschema.json
File metadata and controls
78 lines (78 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{
"$schema": "https://json-structure.org/meta/extended/v0/#",
"$id": "https://example.com/schemas/OrderEvent.json",
"name": "OrderEvent",
"description": "Objects require a name for clean code generation",
"type": "object",
"properties": {
"orderId": {
"type": "uuid",
"description": "Native UUID type maps to Guid/.NET, UUID/Java, uuid/Python"
},
"customerId": {
"type": "uuid"
},
"timestamp": {
"type": "datetime",
"description": "Native datetime type with RFC3339 encoding"
},
"status": {
"type": "choice",
"description": "Discriminated union with typed payloads per case",
"choices": {
"pending": { "type": "null" },
"shipped": {
"type": "object",
"name": "ShippedInfo",
"properties": {
"carrier": { "type": "string" },
"trackingId": { "type": "string" }
}
},
"delivered": {
"type": "object",
"name": "DeliveredInfo",
"properties": {
"signedBy": { "type": "string" }
}
}
}
},
"total": {
"type": "decimal",
"precision": 12,
"scale": 2,
"description": "Decimal with precision/scale for exact monetary math"
},
"currency": {
"type": "string",
"maxLength": 3
},
"items": {
"type": "array",
"description": "Array of tuples for compact, positional data",
"items": {
"type": "tuple",
"description": "Fixed-length typed sequence, ideal for time-series or line items",
"properties": {
"sku": { "type": "string", "description": "Position 0: SKU" },
"quantity": { "type": "int32", "description": "Position 1: int32 maps to int in all languages" },
"unitPrice": { "type": "decimal", "precision": 10, "scale": 2, "description": "Position 2: unit price" }
},
"tuple": ["sku", "quantity", "unitPrice"],
"required": ["sku", "quantity", "unitPrice"]
}
},
"tags": {
"type": "set",
"items": { "type": "string" },
"description": "Set type: unordered, unique elements"
},
"metadata": {
"type": "map",
"values": { "type": "string" },
"description": "Map type: string keys, typed values"
}
},
"required": ["orderId", "customerId", "timestamp", "status", "total", "currency", "items"]
}