Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation of required properties is not working properly #3

Open
niho opened this issue Feb 18, 2020 · 0 comments
Open

Validation of required properties is not working properly #3

niho opened this issue Feb 18, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@niho
Copy link
Owner

niho commented Feb 18, 2020

Problem

It seems like properties that is listed in the required list, but is not present in the properties will be ignored by the validation. This makes the validated data not properly valid in accordance with the JSON Schema standard, and will fail validation with other validators.

How to reproduce

Example of a schema that reproduces the problem:

{
  "$schema": "http://json-schema.org/schema#",
  "required": [
    "title",
    "description"
  ],
  "properties": {
    "title": {
      "type": "string"
    }
  }
}

The above schema requires both a title and a description property to be present (while the schema for the description property is unspecified). But the json-schema-form validator will simply ignore the description property.

@niho niho added the bug Something isn't working label Feb 18, 2020
@niho niho self-assigned this Feb 18, 2020
@niho niho removed their assignment Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant