{
  "swagger": "2.0",
  "info": {
    "description": "RippleOSI Middle Tier REST APIs",
    "version":     "1.1.0",
    "title":       "Ripple Showcase Stack  - Swagger - Open APIs"
  },
  "schemes": ["http"],
  "tags": [{
    "name": "Ripple"
  }],
  "securityDefinitions": {
    "QEWDToken": {
      "description": "For accessing the API a valid token must be passed in all the queries in the 'Cookies' header.  A valid token is generated by the /api/initialise API.  The following syntax must be used in the 'Cookie' header :    JSESSIONID=xxxxxxx",
      "type":        "apiKey",
      "name":        "Authorization",
      "in":          "header"
    }
  },
  "paths": {
    "/api/initialise":                               "=> get('initialise.json')",
    "/api/ui/{uiType}":                              "=> get('ui.json')",
    "/api/application" : {
      "get" :                                        "=> get('application-get.json')",
      "post":                                        "=> get('application-post.json', 'desc', 'Saves users application settings')",
      "put":                                         "=> get('application-post.json', 'desc', 'Updates users application settings')"
    },
    "/api/user":                                     "=> get('user.json')",
    "/api/patients":                                 "=> get('patients.json')",
    "/api/patients/{patientId}/counts":              "=> get('patientCounts.json')",
    "/api/patients/{patientId}/dicom/studies":       "=> get('dicomStudies.json')",

    "/api/documents/patient/{patientId}":            "=> get('documentsSummary.json')",
    "/api/documents/patient/{patientId}/{sourceId}": "=> get('documentsDetail.json')",
    "/api/documents/patient/{patientId}/{host}":     "=> get('postDocument.json')"

  },
  "definitions": {
    "initialiseResponse":       "=> get('initialiseResponse.json')",
    "uiResponse":               "=> get('uiResponse.json')",
    "applicationPayload":       "=> get('applicationPayload.json')",
    "applicationSaveResponse":  "=> get('applicationSaveResponse.json')",
    "userResponse":             "=> get('userResponse.json')",
    "userError":                "=> get('userError.json')",
    "patientsResponse":         "=> get('patientsResponse.json')",
    "countsResponse":           "=> get('countsResponse.json')",
    "headingPostResponse":      "=> get('headingPostResponse.json')",
    "dicomStudiesResponse":     "=> get('dicomStudiesResponse.json')",
    "documentsSummaryResponse": "=> get('documentsSummaryResponse.json')",
    "documentsDetailResponse":  "=> get('documentsDetailResponse.json')",
    "postDocumentResponse":     "=> get('postDocumentResponse.json')"
  }
}
