Skip to content

Commit 2792ad9

Browse files
committed
correct minor mistake on the readme file
1 parent c734b7a commit 2792ad9

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

README.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Example:-
2525
"instanceLocation": "#/name",
2626
"message": "Expected a string at least 5 characters long."
2727
}
28+
]
2829
}
2930
```
3031

@@ -202,23 +203,23 @@ When an instance matches multiple `anyOf` alternatives type, the library priorit
202203
**Schema:**
203204
```json
204205
{
205-
anyOf: [
206+
"anyOf": [
206207
{
207-
type: "object",
208-
properties: {
209-
name: { type: "string" },
210-
age: { type: "number" }
208+
"type": "object",
209+
"properties": {
210+
"name": { "type": "string" },
211+
"age": { "type": "number" }
211212
},
212-
required: ["name", "age"]
213+
"required": ["name", "age"]
213214
},
214215
{
215-
type: "object",
216-
properties: {
217-
title: { type: "string" },
218-
author: { type: "string" },
219-
ID: { type: "string", pattern: "^[0-9\\-]+$" }
216+
"type": "object",
217+
"properties": {
218+
"title": { "type": "string" },
219+
"author": { "type": "string" },
220+
"ID": { "type": "string", "pattern": "^[0-9\\-]+$" }
220221
},
221-
required: ["title", "author", "ID"]
222+
"required": ["title", "author", "ID"]
222223
}
223224
]
224225
}
@@ -227,10 +228,10 @@ When an instance matches multiple `anyOf` alternatives type, the library priorit
227228
Invalid Instance:-
228229
``` Json
229230
{
230-
title: "Clean Code",
231-
author: "Robert Martin",
232-
ID: "NotValidId"
233-
};
231+
"title": "Clean Code",
232+
"author": "Robert Martin",
233+
"ID": "NotValidId"
234+
}
234235
```
235236
BetterJSONSchemaErrors Output:-
236237
``` Json
@@ -239,7 +240,7 @@ BetterJSONSchemaErrors Output:-
239240
{
240241
"schemaLocation": "https://example.com/main#/anyOf/1/properties/ID/pattern",
241242
"instanceLocation": "#/ID",
242-
"message": "The instance should match the format: "^[0-9\\-]+$". "
243+
"message": "The instance should match the format: \"^[0-9\\-]+$\". "
243244
}
244245
]
245246
}

0 commit comments

Comments
 (0)