From 4ebc4d7e0f99f0e65a00f763f19b20c256c13f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Barna?= Date: Fri, 28 Oct 2016 03:26:19 +0200 Subject: [PATCH] Define simple Duck object --- swagger/swagger.yaml | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 4c45b22..9672baf 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -1,7 +1,7 @@ --- swagger: "2.0" info: - version: "0.0.0" + version: "0.1.0" title: "Rubber Duck Booking Tool API" basePath: "/api/v1" consumes: @@ -25,6 +25,13 @@ paths: $ref: '#/definitions/Duck' security: - api_key: [] + /duck: + get: + tags: + - "default_controller" + responses: + 200: + description: "All data regarding the specified duck" securityDefinitions: api_key: type: "apiKey" @@ -32,6 +39,28 @@ securityDefinitions: in: "header" definitions: Duck: + type: object properties: + duck_id: + type: number + description: ID number of the duck name: - type: "string" + type: string + description: The name of the duck + color: + type: string + description: Color of the duck + #species = models.ForeignKey(Species) + #location = models.ForeignKey(Location) + #competencies: + # type: array + # items: strings + # description: A list of competencies the duck has + #donated_by = models.ForeignKey(User) + #donated_at = models.DateTimeField(default=timezone.now) + #adopted_by = models.ForeignKey(User, related_name='adopted_ducks', null=True, blank=True) + #adopted_at = models.DateTimeField(null=True, blank=True) + #bookings = models.ManyToManyField(User, through='Booking', related_name='+') + #on_holiday_since = models.DateTimeField(null=True, blank=True) + #on_holiday_until = models.DateTimeField(null=True, blank=True) +