Skip to content

Commit a8a60d6

Browse files
committed
Add schema example for post https://stackoverflow.com/a/65150457/687896
1 parent d4c6235 commit a8a60d6

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

docs/address.schema.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"type": "object",
3+
4+
"properties": {
5+
"billing_address": { "$ref": "definitions.schema.json#" },
6+
"shipping_address": { "$ref": "definitions.schema.json#" }
7+
}
8+
}

docs/base.schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#"
3+
}

docs/definitions.schema.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "object",
3+
"properties": {
4+
"street_address": { "type": "string" },
5+
"city": { "type": "string" },
6+
"state": { "type": "string" }
7+
},
8+
"required": ["street_address", "city", "state"]
9+
}

0 commit comments

Comments
 (0)