Skip to content

Use JSON Schema in block definitions? #2

@tlrobinson

Description

@tlrobinson

JSON Schema looks a lot like what we have for specifying inputs/outputs. I think we all prefer using existing standards where it makes sense. Does it make sense?

Example JSON Schema from http://tools.ietf.org/html/draft-zyp-json-schema-03#section-3

{
  "name":"Product",
  "properties":{
    "id":{
      "type":"number",
      "description":"Product identifier",
      "required":true
    },
    "name":{
      "description":"Name of the product",
      "type":"string",
      "required":true
    },
    "price":{
      "required":true,
      "type": "number",
      "minimum":0,
      "required":true
    },
    "tags":{
      "type":"array",
      "items":{
        "type":"string"
      }
    }
  },
  "links":[
    {
      "rel":"full",
      "href":"{id}"
    },
    {
      "rel":"comments",
      "href":"comments/?id={id}"
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions