schema.json 2.61 KB
{
  "$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",
      "require": true,
      "enum": ["xml", "json-in-xml"],
      "type": "string"
    },
    "software-type": {
      "description": "Existing software types",
      "require": true,
      "patternProperties": {
        ".*": {
          "description": "Software type declaration",
          "additionalProperties": false,
          "properties": {
            "title": {
              "description": "A human-friendly title of the software type",
              "type": "string"
            },
            "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": {
              "require": 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": {
              "require": true,
              "description": "URL, relative to Software Release base path, of a json schema for values published by instance of current software type",
              "type": "string"
            },
            "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"
            },
            "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": "number"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}