What about defaults?


#1

Have defaults been considered to reduce verbosity?

Specifically being able to define these as defaults once per .raml file:

application/json:
schema: |
{ "$schema": "http://json-schema.org/schema",
"type": "object",

This would allow all the following definitions to be shortened by 4 lines for example:
/items:
    description: Lots of items.
    get:
      responses:
        200:
          body:
                { "properties": {
                    "id":  { "type": "string" },
                    "name": { "type": "string" },
                    "description": { "type": "string" },                   
                  }
                }

Same example with extra 4 lines:
/items:
    description: Lots of items.
    get:
      responses:
        200:
          body:
            application/json:
              schema: |
                { "$schema": "http://json-schema.org/schema",
                  "type": "object",
                  "properties": {
                    "id":  { "type": "string" },
                    "name": { "type": "string" },
                    "description": { "type": "string" },                   
                  }
                }

#2

After getting partially through the spec it looks like the answer is yes for some things:

mediaType: application/json

There is a need for a lot more samples in general. The spec is not complicated but it always makes the theory easier to grok.

Maybe I’ll throw up a page or two to illustrate some things I was looking for.