schema.json 2.06 KB
Newer Older
Rafael Monnerat's avatar
Rafael Monnerat committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Slapos Software Release instantiation descriptor",
  "additionalProperties": false,
  "properties": {
    "name": {
      "description": "A short human-friendly name for the sofware release",
      "type": "string"
    },
    "description": {
      "description": "A short description of the sofware release",
      "type": "string"
    },
    "serialisation": {
      "description": "How the parameters and results are serialised",
      "required": true,
      "enum": ["xml", "json-in-xml"],
      "type": "string"
    },
    "software-type": {
      "description": "Existing software types",
      "required": true,
      "patternProperties": {
        ".*": {
          "description": "Software type declaration",
          "additionalProperties": false,
          "properties": {
            "description": {
              "description": "A human-friendly description of the software type",
              "type": "string"
            },
            "serialisation": {
              "description": "How the parameters and results are serialised, if different from global setting",
              "enum": ["xml", "json-in-xml"],
              "type": "string"
            },
            "request": {
              "required": true,
              "description": "URL, relative to Software Release base path, of a json schema for values expected by instance of current software type",
              "type": "string"
            },
            "response": {
              "required": true,
              "description": "URL, relative to Software Release base path, of a json schema for values published by instance of current software type",
              "type": "string"
            },
            "index": {
              "description": "Value to use instead of software type id to sort them (in order to display most relevant software types earlier in a list, for example)",
              "type": "any"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}