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

Support required in JSON scheme draft v4 #330

Closed
wsalembi opened this issue Mar 31, 2015 · 1 comment
Closed

Support required in JSON scheme draft v4 #330

wsalembi opened this issue Mar 31, 2015 · 1 comment

Comments

@wsalembi
Copy link

In draft v4 the required property is defined on the object level and not on the property level.

JSON scheme v3 is currently supported and generated @NotNull annotations:

{
  "type":"object",
  "properties": {
    "foo": {
      "type": "string"
    },
    "bar": {
      "type": "integer",
      "required" : true
    },
    "baz": {
      "type": "boolean"
    }
  }
}

JSON scheme v4 is not supported

{
  "type":"object",
  "properties": {
    "foo": {
      "type": "string"
    },
    "bar": {
      "type": "integer"
    },
    "baz": {
      "type": "boolean"
    }
  },
  "required" : ["type"]
}
@joelittlejohn
Copy link
Owner

This has actually just been fixed by pull request #325, it will be released in the next version (0.4.11).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants