schema.json 2.89 KB
Newer Older
Rafael Monnerat committed
1 2 3 4
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Slapos Software Release instantiation descriptor",
  "additionalProperties": false,
5 6 7
  "required": [
    "software-type"
  ],
Rafael Monnerat committed
8 9 10
  "properties": {
    "name": {
      "description": "A short human-friendly name for the sofware release",
11
      "default": "",
Rafael Monnerat committed
12 13 14 15
      "type": "string"
    },
    "description": {
      "description": "A short description of the sofware release",
16
      "default": "",
Rafael Monnerat committed
17 18 19 20
      "type": "string"
    },
    "serialisation": {
      "description": "How the parameters and results are serialised",
21 22 23 24
      "enum": [
        "xml",
        "json-in-xml"
      ],
Rafael Monnerat committed
25 26 27 28 29 30 31 32
      "type": "string"
    },
    "software-type": {
      "description": "Existing software types",
      "patternProperties": {
        ".*": {
          "description": "Software type declaration",
          "additionalProperties": false,
33 34 35 36
          "required": [
            "request",
            "response"
          ],
Rafael Monnerat committed
37
          "properties": {
38 39
            "title": {
              "description": "A human-friendly title of the software type",
40
              "default": "",
41 42
              "type": "string"
            },
Rafael Monnerat committed
43 44
            "description": {
              "description": "A human-friendly description of the software type",
45
              "default": "",
Rafael Monnerat committed
46 47 48
              "type": "string"
            },
            "serialisation": {
49
              "description": "How the parameters and results are serialised, if different from global setting, required if global setting is not provided",
50 51 52 53
              "enum": [
                "xml",
                "json-in-xml"
              ],
Rafael Monnerat committed
54 55 56 57 58 59 60 61 62 63
              "type": "string"
            },
            "request": {
              "description": "URL, relative to Software Release base path, of a json schema for values expected by instance of current software type",
              "type": "string"
            },
            "response": {
              "description": "URL, relative to Software Release base path, of a json schema for values published by instance of current software type",
              "type": "string"
            },
64
            "software-type": {
65 66 67
              "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"
            },
68
            "shared": {
69
              "description": "Define if the request will request a Slave or Software Instance.",
70
              "default": "false",
71 72
              "type": "boolean"
            },
Rafael Monnerat committed
73 74
            "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)",
75
              "default": 0,
76
              "type": "number"
Rafael Monnerat committed
77 78 79 80 81 82 83 84 85 86
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}