Referring common schema in another schema files


#1

I have a folder named schema having employee.schema file.This schema I will use in my RAML(0.8) file in POST request body schema.With in this request there is address object which will appear at many other POST request’s.

In the code snippet below address attribute is an array type.

How can I have address.schema file in the same folder where employee.schema is kept and refer it in employee.schema?

{
"type":"object",
"$schema": "http://json-schema.org/draft-03/schema",
"properties":{
    "empId":{
        "type":"integer",
        "required":false
     },
     "empName":{
        "type":"string",
        "required":true,
        "minLength":10,
        "maxLength":20
     },
     "contactno":{
        "type":"string",
        "required":true,
        "minLength":10,
        "maxLength":10
      },
      "salary":{
        "type":"integer",
        "required":true
      },
      "address":{
        "type":"array",
         "items":{
            "type": "object",
             "properties": {
                "city":{
                    "type":"string",
                    "required":true
                    },
                "pincode":{
                    "type":"string",
                    "required":true
                    }
               }  
          }
        }
    }
}

#2

Was there something you wanted to ask? I am reading your message and it seems like you know what to do with you JSON schemas but maybe I am missing something.