File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 7
7
[ ![ npm] ( https://img.shields.io/npm/v/express-json-validator-middleware.svg )] ( https://www.npmjs.com/package/express-json-validator-middleware )
8
8
[ ![ npm] ( https://img.shields.io/npm/l/express-json-validator-middleware.svg )] ( https://www.npmjs.com/package/express-json-validator-middleware )
9
9
10
+ Coming from ` express-jsonschema ` ? Read our [ migration notes] ( #migrating )
11
+
10
12
Based heavily on https://github.com/trainiac/express-jsonschema . A big thank you to @trainiac for the original package!
11
13
12
14
## Why use this library over [ express-jsonschema] ( https://github.com/trainiac/express-jsonschema ) ?
@@ -190,9 +192,9 @@ npm test
190
192
191
193
- [ spacetelescope's understanding json schema] ( http://spacetelescope.github.io/understanding-json-schema/ )
192
194
193
- ## Notes
195
+ ## < a name = " migrating " ></ a > Migrating from ` express-jsonschema `
194
196
195
- In ``` express-jsonschema `` ` , you could define a required property in two ways. Ajv only supports one way of doing this.
197
+ In ` express-jsonschema ` , you could define a required property in two ways. Ajv only supports one way of doing this.
196
198
197
199
``` js
198
200
@@ -203,7 +205,7 @@ In ```express-jsonschema```, you could define a required property in two ways. A
203
205
foo: {
204
206
type: ' string'
205
207
},
206
- required: [' foo' ]
208
+ required: [' foo' ] < --
207
209
}
208
210
}
209
211
@@ -213,7 +215,7 @@ In ```express-jsonschema```, you could define a required property in two ways. A
213
215
properties: {
214
216
foo: {
215
217
type: ' string' ,
216
- required: true
218
+ required: true
217
219
}
218
220
}
219
221
}
You can’t perform that action at this time.
0 commit comments