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

"required" fields throw errors... #19

Open
the-t-in-rtf opened this issue Sep 19, 2014 · 2 comments
Open

"required" fields throw errors... #19

the-t-in-rtf opened this issue Sep 19, 2014 · 2 comments

Comments

@the-t-in-rtf
Copy link

Your tool is brilliant in that it submits values for all fields, which means it's always a valid record. That should mean that required fields aren't an issue, but unfortunately, the tool chokes on the syntax for required fields for both the v3 and v4 draft standards.

To test with v3 syntax:

{
  "$schema": "http://json-schema.org/draft-03/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "ipsum": "id"
    },
    "name": {
      "type": "string",
      "ipsum": "name"
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "bio": {
      "type": "string",
      "ipsum": "sentence"
    },
    "age": {
      "type": "integer"
    },
    "avatar": {
      "type": "string",
      "ipsum": "small image"
      ,
      "required": true
    }
  }
}                

To test with v4 syntax:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "ipsum": "id"
    },
    "name": {
      "type": "string",
      "ipsum": "name"
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "bio": {
      "type": "string",
      "ipsum": "sentence"
    },
    "age": {
      "type": "integer"
    },
    "avatar": {
      "type": "string",
      "ipsum": "small image"
    }
  },
  "required": ["avatar"]
}                
@jewelsjacobs
Copy link

+1 pls fix! Love the tool . . .

@bjdash
Copy link

bjdash commented Jul 11, 2017

+1 The tool can be more useful with the support for required

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

3 participants