Define simple Duck object

This commit is contained in:
Gábor Barna 2016-10-28 03:26:19 +02:00
parent b3c2a6b7ec
commit 4ebc4d7e0f

View File

@ -1,7 +1,7 @@
--- ---
swagger: "2.0" swagger: "2.0"
info: info:
version: "0.0.0" version: "0.1.0"
title: "Rubber Duck Booking Tool API" title: "Rubber Duck Booking Tool API"
basePath: "/api/v1" basePath: "/api/v1"
consumes: consumes:
@ -25,6 +25,13 @@ paths:
$ref: '#/definitions/Duck' $ref: '#/definitions/Duck'
security: security:
- api_key: [] - api_key: []
/duck:
get:
tags:
- "default_controller"
responses:
200:
description: "All data regarding the specified duck"
securityDefinitions: securityDefinitions:
api_key: api_key:
type: "apiKey" type: "apiKey"
@ -32,6 +39,28 @@ securityDefinitions:
in: "header" in: "header"
definitions: definitions:
Duck: Duck:
type: object
properties: properties:
duck_id:
type: number
description: ID number of the duck
name: 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)