Skip to content
Open
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
23 changes: 12 additions & 11 deletions modules/ROOT/pages/design-json-schema-required-error.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ In Draft 3, you specify fields as `required` in the definition of each field, as
...
----

In Draft 4, you specify that fields are `required` by creating an array that is at the same level as the definitions of the fields, like this:
In Draft 4, you specify that fields are `required` by creating an array that is at the same level as the `properties` with the definitions of the fields, like this:
----
{
"$schema": "http://json-schema.org/draft-4/schema#",
Expand All @@ -55,13 +55,13 @@ In Draft 4, you specify that fields are `required` by creating an array that is
30,
40,
50
]
},
"required": [
"pageNum",
"pageSize"
]
},
},
"required": [
"pageNum",
"pageSize"
]
...
----

Expand All @@ -80,12 +80,13 @@ Here is another example of the method used in Draft 4:
"city": {
"type": "string"
},
"required": [
"streetAddress",
"city"
]
},
"phoneNumber": {
"required": [
"streetAddress",
"city"
]
},
"phoneNumber": {
...
----

Expand Down