Add get/post parameters to /duck

This commit is contained in:
Gábor Barna 2016-10-28 11:51:36 +02:00
parent 4cb80df58a
commit 5c7ca46e56
1 changed files with 32 additions and 8 deletions

View File

@ -20,7 +20,7 @@ paths:
200: 200:
description: "An object which contains metadata and an array of ducks" description: "An object which contains metadata and an array of ducks"
schema: schema:
type: array type: "array"
items: items:
$ref: '#/definitions/Duck' $ref: '#/definitions/Duck'
security: security:
@ -30,9 +30,33 @@ paths:
tags: tags:
- "default_controller" - "default_controller"
operationId: "controllers.default_controller.duck_get" operationId: "controllers.default_controller.duck_get"
parameters:
- name: "duck_id"
description: "ID of the Duck"
in: "path"
required: true
type: "integer"
responses: responses:
200: 200:
description: "All data regarding the specified duck" description: "All data regarding the specified duck"
post:
tags:
- "default_controller"
operationId: "controllers.default_controller.duck_post"
parameters:
- name: "name"
description: "Name of the Duck"
in: "formData"
required: true
type: "string"
- name: "color"
description: "Color of the Duck"
in: "formData"
required: true
type: "string"
responses:
200:
description: "Cool"
securityDefinitions: securityDefinitions:
api_key: api_key:
type: "apiKey" type: "apiKey"
@ -40,17 +64,17 @@ securityDefinitions:
in: "header" in: "header"
definitions: definitions:
Duck: Duck:
type: object type: "object"
properties: properties:
duck_id: duck_id:
type: number type: "integer"
description: ID number of the duck description: "ID number of the duck"
name: name:
type: string type: "string"
description: The name of the duck description: "The name of the duck"
color: color:
type: string type: "string"
description: Color of the duck description: "Color of the duck"
#species = models.ForeignKey(Species) #species = models.ForeignKey(Species)
#location = models.ForeignKey(Location) #location = models.ForeignKey(Location)
#competencies: #competencies: