Skip to content

type is required with patternProperties #2

Description

@LarsBV

If you write

foobar {
    properties: {
         name: { type: 'string'}.
         files: {
               patternProperties: {
                     "^[a-z]+$": {
                           filename: {type:'string'}
                     }
                }
         }
    }
}

then you have too add,
foobar.type = 'object'

even though:

hello: {
    properties: {
        message: {type: 'string'}
    }
}

doesn't require it. After having been bitten by it, this late evening, I think it should have a consistent
behavior.

At the same time a nice error message when no validators have been found would be nice.
Currently if the scheme doesn't match up, atleast in my case, it outputs 'Cannot read property 'validators' of undefined'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions