Generally speaking elastic.io platform supports draft-03 JSON version with a number of exceptions and differences.

We do not support $ref

We do not support $ref in any of its forms instead we suggest using inline objects.

Practically instead of $ref we simply include the object in the JSON structure. Here is an example when using the standard $ref one could write the following:

shippingAddress: {
    $ref: "/api/v2/schema/types/address.json"
}

However, this would not work on our system. The $ref points to a separate JSON which contains the properties of shippingAddress. This method of referencing is not yet supported on our platform. Instead, we recommend to write properties right in here like it's shown below:

shippingAddress : {
   type: "object",
   properties: {
     "phone": {
       "title": "Phone",
       "description": "The phone number",
       "type": "string",
       "minLength": "1",
       "maxLength": "20"
     },
     "firstName": {
       "title": "First Name",
       "description": "First Name",
       "type": "string",
       "maxLength": "300"
     },
     "lastName": {
       "title": "Last Name",
       "description": "Last Name",
       "type": "string",
       "maxLength": "300"
     }
   }
}

required should be within the object

In general, when any option or property is required according to the recent JSON-schema it is expected to be at object level where the value of this keyword must be an array which we do not support.The following structure will not produce the desired outcome:

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "title": "ID"
    }, 
    "email": {
      "type": "string",
      "title": "Email"
    }, 
    "nickname": {
      "type": "string",
      "title": "Nickname"
    }, 
    "required": [ "id", "email"]
  }
}

Instead on elastic.io platform we expect required to be within the object along with other properties of this object. The following method can be used to achieve the desired outcome:

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "required" : "true",
      "title": "ID"
    }, 
    "email": {
      "type": "string",
      "required" : "true",
      "title": "Email"
    }, 
    "nickname": {
      "type": "string",
      "required": "false",
      "title": "Nickname"
    }
  }
}