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

Fix additional properties #31

Merged
merged 2 commits into from
Dec 27, 2017

Conversation

shtrihstr
Copy link

According the documentation https://spacetelescope.github.io/understanding-json-schema/reference/object.html

If additionalProperties is an object, that object is a schema that will be used to validate any additional properties not listed in properties.

{
  "type": "object",
  "properties": {
    "number":      { "type": "number" },
    "street_name": { "type": "string" },
    "street_type": { "type": "string",
                     "enum": ["Street", "Avenue", "Boulevard"]
                   }
  },
  "additionalProperties": { "type": "string" }
}

@tlivings
Copy link
Owner

Can you add a test that validates this?

@tlivings
Copy link
Owner

Thanks for the PR @shtrihstr - can you add tests?

@tlivings tlivings merged commit 0f58716 into tlivings:master Dec 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants