Blame view

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