From b46c75ad7203269b3b620a06b1a42a0d26955531 Mon Sep 17 00:00:00 2001 From: Joe Loewengruber Date: Sat, 6 Aug 2016 19:26:34 -0400 Subject: [PATCH] update swagger.yaml --- api/swagger/swagger.yaml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/api/swagger/swagger.yaml b/api/swagger/swagger.yaml index e94138d..ca8d2d0 100755 --- a/api/swagger/swagger.yaml +++ b/api/swagger/swagger.yaml @@ -65,12 +65,32 @@ paths: description: Error schema: $ref: "#/definitions/ErrorResponse" + /garages: + # binds app logic to a route (api/controllers/applications.js) + x-swagger-router-controller: garages + get: + description: Returns a list of garages to the caller + # used as the method name of the controller inside garages.js + operationId: garages + responses: + "200": + description: Success + schema: + type: array + items: + # a pointer to a definition + $ref: "#/definitions/Garage" + # responses may fall through to errors + default: + description: Error + schema: + $ref: "#/definitions/ErrorResponse" /garages/{garageId}: # Use the house address as the garageId # binds app logic to a route (api/controllers/garages.js) x-swagger-router-controller: garages get: - description: Returns a single garage configurations to the caller + description: Returns a single garage configuration to the caller # used as the method name of the controller inside garages.js operationId: garages parameters: @@ -125,6 +145,18 @@ definitions: type: string status: type: string + Garage: + properties: + garageId: + type: string + name: + type: string + description: + type: string + desiredState: + type: string + status: + type: string ErrorResponse: required: - message