-
-
Notifications
You must be signed in to change notification settings - Fork 208
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
minProperties is usually used to not allow empty objects.
I'm seeing this behavior fail.
'use strict'
const test = require('tap').test
const build = require('..')
test('minProperties', (t) => {
t.plan(1)
const stringify = build({
title: 'object with missing values',
type: 'object',
minProperties: 1,
properties: {
shouldNotBeReturned: {
type: 'object',
properties: {
str: {
type: 'string'
}
}
}
}
})
t.equal('{}', stringify({ shouldNotBeReturned: {} }))
})
It returns { "shouldNotBeReturned": {} } instead of the expected {}
{ "shouldNotBeReturned": {} } is invalid per the schema
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers