apiaryio / mson

Markdown Syntax for Object Notation
MIT License
903 stars 180 forks source link

Allow to generate `title` key in JSON Schema #71

Open jmatsushita opened 8 years ago

jmatsushita commented 8 years ago

It would be great to be able to specify a title property with the schema for instance with:

# Test

 - something (string) - # Why not a Title! - As well as a description

Would generate

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "something": {
      "type": "string",
      "title": "Why not a Title!",
      "description": "As well as a description"
    }
  }
}

Allowing to implement root level title (which is connected to #70) and descriptions would also fit idiomatic JSON Schema.

It seems that this is connected to a number of issues which are about using MSON to generate expressive JSON Schema (#43, #69, #70). It might be good to document the subset of JSON Schema that MSON covers (to help both inform those who might be interested in this approach, and maybe feed a roadmap?).

pksunkara commented 8 years ago

@jmatsushita Thanks for the request.