view common/src/main/resources/swagger-template.json @ 26:33cf0b946e3d

Add SwaggerCombine utility This patch adds a new utility class SwaggerCombine, that, given a list of Swagger files, will create one massive Swagger file. Any differing elements that do not have the key "description" are flagged - descriptions are allow to differ. The basic usage is: SwaggerCombine [--yaml|--json] [--pretty] [--quiet] infile1 [infile2]... --yaml or --json write the combined file to stdout, --pretty indents JSON, and --quiet omitsprocessing messages. The default is to combine all files and only output error and processing messages. Reviewed-by: sgehwolf Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-September/025103.html Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-October/025262.html
author stooke@redhat.com
date Wed, 11 Oct 2017 10:35:59 -0400
parents
children
line wrap: on
line source

{
  "swagger": "2.0",
  "info": {
    "version": "0.0.1",
    "title": "Thermostat Combined API",
    "license": {
      "name": "GPL v2 with Classpath Exception",
      "url": "http://www.gnu.org/licenses"
    }
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json",
    "text/html; charset=utf-8"
  ],
  "basePath": "/",
  "paths": {
  },
  "definitions": {
    "environment-items": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "metric": {
      "type": "object",
      "properties": {
        "$numberLong": {
          "type": "string"
        }
      }
    }
  },
  "parameters": {
    "system-id": {
      "name": "systemId",
      "in": "path",
      "required": true,
      "type": "string",
      "description": "The system ID for the current request."
    },
    "jvm-id": {
      "name": "jvmId",
      "in": "path",
      "required": true,
      "type": "string",
      "description": "The JVM ID for the current request."
    },
    "timestamp": {
      "name": "timeStamp",
      "in": "path",
      "required": true,
      "type": "integer",
      "format": "int64",
      "description": "The UNIX timestamp in milliseconds to set the last_updated field for."
    },
    "limit": {
      "name": "limit",
      "in": "query",
      "description": "Maximum number of items to return. Example '1'",
      "type": "integer",
      "required": false,
      "default": 1
    },
    "offset": {
      "name": "offset",
      "in": "query",
      "description": "Offset of first item to return. Example '0'",
      "type": "integer",
      "required": false,
      "default": 0
    },
    "sort": {
      "name": "sort",
      "in": "query",
      "description": "Sort string. Comma separated list of fields prefixed with '+' for ascending or '-' for descending. Example '?sort=+a,-b' Fields use dot notation for embedded documents. Example 'outer.inner' refers to field inner contained in field outer.",
      "type": "string",
      "required": false
    },
    "query": {
      "name": "query",
      "in": "query",
      "description": "Query string. Comma separated list of key, comparator, value pairs. Comparator supports '==', '<=', '>=', '<', '>', '!='. Example '?query=a==b,c!=d'. Keys are fields in documents and use dot notation for embedded documents. Example 'outer.inner' refers to field inner contained in field outer.",
      "type": "string",
      "required": false
    },
    "include": {
      "name": "include",
      "in": "query",
      "description": "Inclusion string. Comma separated list of fields to include in the response. Example '?include=a,b' Fields use dot notation for embedded documents. Example 'outer.inner' refers to field inner contained in field outer. Cannot be used in combination with 'exclude' parameter Overriden by 'exclude' parameter",
      "type": "string",
      "required": false
    },
    "exclude": {
      "name": "exclude",
      "in": "query",
      "description": "Exclusion string. Comma separated list of fields to exclude in the response. Example '?exclude=a,b' Fields use dot notation for embedded documents. Example 'outer.inner' refers to field inner contained in field outer. Cannot be used in combination with 'include' parameter; takes precedence over 'include' parameter",
      "type": "string",
      "required": false
    }
  }
}