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

oneof property with null value #79

Open
Valery-vs opened this issue Apr 17, 2017 · 1 comment
Open

oneof property with null value #79

Valery-vs opened this issue Apr 17, 2017 · 1 comment

Comments

@Valery-vs
Copy link

Hi
How can I create schema with oneof property which could be null value?

@fbessou
Copy link
Collaborator

fbessou commented Apr 18, 2017

Here is the part of schema that describes what you want:

{
  "oneOf": [{
    "type": "string",
    "enum": ["something"],
    "title": "A non null value"
  }, {
    "type": "null",
    "enum": [null],
    "title": "A null value"
  }]
}

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

No branches or pull requests

2 participants