forked from martin-helmich/php-schema2class
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic-example.json
More file actions
33 lines (33 loc) · 983 Bytes
/
basic-example.json
File metadata and controls
33 lines (33 loc) · 983 Bytes
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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"User": {
"type": "object",
"required": ["name", "status"],
"properties": {
"name": {
"description": "Name of the user - required field.",
"type": "string"
},
"address": {
"description": "Object representing address of the user, field is optional.",
"$ref": "#/definitions/Address"
},
"status": {
"description": "User status. Field is obligatory, but nullable.\n\nIf target PHP is 8.1+ the type will be an `enum` with cases `CUSTOMER = 'customer'` and `MANAGER = 'manager'`",
"anyOf": [
{ "enum": ["customer", "manager"], "type": "string" },
{ "type": "null" }
]
}
}
},
"Address": {
"type": "object",
"properties": {
"street": { "type": "string" },
"house": { "type": "integer" }
}
}
}
}