Skip to content

Commit 6eb4802

Browse files
remove comments
1 parent 7085e39 commit 6eb4802

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

Diff for: index.js

-9
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,6 @@ const {
1010
} = require('./utils')
1111

1212
function FastifyEnforceSchema (fastify, opts, done) {
13-
// if (Object.prototype.hasOwnProperty.call(opts, 'required')) {
14-
// process.emitWarning(
15-
// 'The `required` option for fastify-enforce-schema will be removed soon. Since all schemas are enforced by default, consider using the `exclude` option to exclude specific schemas.',
16-
// 'DeprecationWarning'
17-
// )
18-
// } else {
19-
// opts.required = []
20-
// }
21-
2213
if (!Object.prototype.hasOwnProperty.call(opts, 'disabled')) {
2314
opts.disabled = []
2415
}

Diff for: test/enforce-schema.test.js

-11
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,6 @@ const { test } = require('tap')
44
const Fastify = require('fastify')
55
const enforceSchema = require('../index.js')
66

7-
// test('required should be deprecated', async (t) => {
8-
// t.plan(1)
9-
10-
// process.on('warning', (warning) => {
11-
// t.equal(warning.name, 'DeprecationWarning')
12-
// })
13-
14-
// const fastify = Fastify()
15-
// await fastify.register(enforceSchema, { required: ['response', 'body', 'params'] })
16-
// })
17-
187
test('response schema should fail if incomplete', async (t) => {
198
t.plan(1)
209

0 commit comments

Comments
 (0)