Skip to content

Commit fb35d63

Browse files
committed
Update README
1 parent 088d19e commit fb35d63

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
[![npm](https://img.shields.io/npm/v/express-json-validator-middleware.svg)](https://www.npmjs.com/package/express-json-validator-middleware)
88
[![npm](https://img.shields.io/npm/l/express-json-validator-middleware.svg)](https://www.npmjs.com/package/express-json-validator-middleware)
99

10+
Coming from `express-jsonschema`? Read our [migration notes](#migrating)
11+
1012
Based heavily on https://github.com/trainiac/express-jsonschema. A big thank you to @trainiac for the original package!
1113

1214
## Why use this library over [express-jsonschema](https://github.com/trainiac/express-jsonschema) ?
@@ -190,9 +192,9 @@ npm test
190192

191193
- [spacetelescope's understanding json schema](http://spacetelescope.github.io/understanding-json-schema/)
192194

193-
## Notes
195+
## <a name="migrating"></a> Migrating from `express-jsonschema`
194196

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.
196198

197199
```js
198200

@@ -203,7 +205,7 @@ In ```express-jsonschema```, you could define a required property in two ways. A
203205
foo: {
204206
type: 'string'
205207
},
206-
required: ['foo']
208+
required: ['foo'] <--
207209
}
208210
}
209211

@@ -213,7 +215,7 @@ In ```express-jsonschema```, you could define a required property in two ways. A
213215
properties: {
214216
foo: {
215217
type: 'string',
216-
required: true
218+
required: true
217219
}
218220
}
219221
}

0 commit comments

Comments
 (0)