schema.json 2.61 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
{
  "$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",
16
      "require": true,
Rafael Monnerat's avatar
Rafael Monnerat committed
17 18 19 20 21
      "enum": ["xml", "json-in-xml"],
      "type": "string"
    },
    "software-type": {
      "description": "Existing software types",
22
      "require": true,
Rafael Monnerat's avatar
Rafael Monnerat committed
23 24 25 26 27
      "patternProperties": {
        ".*": {
          "description": "Software type declaration",
          "additionalProperties": false,
          "properties": {
28 29 30 31
            "title": {
              "description": "A human-friendly title of the software type",
              "type": "string"
            },
Rafael Monnerat's avatar
Rafael Monnerat committed
32 33 34 35 36 37 38 39 40 41
            "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": {
42
              "require": true,
Rafael Monnerat's avatar
Rafael Monnerat committed
43 44 45 46
              "description": "URL, relative to Software Release base path, of a json schema for values expected by instance of current software type",
              "type": "string"
            },
            "response": {
47
              "require": true,
Rafael Monnerat's avatar
Rafael Monnerat committed
48 49 50
              "description": "URL, relative to Software Release base path, of a json schema for values published by instance of current software type",
              "type": "string"
            },
51 52 53 54 55 56 57 58
            "software-type" : {
              "description": "Value to be used as software type instead of the software type id (in order to use multiple diferent forms for the same software type).",
              "type": "string"
            },
            "shared" : {
              "description": "Define if the request will request a Slave or Software Instance.",
              "type": "boolean"
            },
Rafael Monnerat's avatar
Rafael Monnerat committed
59 60
            "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)",
61
              "type": "number"
Rafael Monnerat's avatar
Rafael Monnerat committed
62 63 64 65 66 67 68 69 70 71 72
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}