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

Specify configuration object for type properties in schema #49

Open
michael opened this issue Jul 4, 2013 · 1 comment
Open

Specify configuration object for type properties in schema #49

michael opened this issue Jul 4, 2013 · 1 comment
Assignees

Comments

@michael
Copy link
Member

michael commented Jul 4, 2013

Currently for properties we only specify a type.

      "location": {
        "type": "location",
        "name": "Location",
        "properties": {
          "name": "string",
          "citizens": ["array", "person"]
        }
      }

Maybe we should change this in favor of an object where we can add more specs like a required property.

      "location": {
        "type": "location",
        "name": "Location",
        "properties": {
          "name": {
            "type": "string",
            "required": true
          },
          "citizens": {
            "type": ["array", "person"]
        }
      }

Or we just say such integrity checks should be done by the app.. not the schema. What do you think?

@ghost ghost assigned obuchtala Jul 4, 2013
@obuchtala
Copy link
Member

Rather would prefer going without that for now.
However, we should think if there is anything else we would add in future,
thus, switching to an object would make sense then.

On Jul 5, 2013, at 12:12 AM, Michael Aufreiter notifications@github.com wrote:

Currently for properties we only specify a type.

  "location": {
    "type": "location",
    "name": "Location",
    "properties": {
      "name": "string",
      "citizens": ["array", "person"]
    }
  }

Maybe we should change this in favor of an object where we can add more specs like a required property.

  "location": {
    "type": "location",
    "name": "Location",
    "properties": {
      "name": {
        "type": "string",
        "required": true
      },
      "citizens": {
        "type": ["array", "person"]
    }
  }

Or we just say such integrity checks should be done by the app.. not the schema. What do you think?


Reply to this email directly or view it on GitHub.

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