swagger: '2.0' info: version: '1.0' title: "API 6.0 Private" description: Polls is a simple API allowing consumers to view polls and vote in them. license: name: MIT url: https://github.com/apiaryio/polls-api/blob/master/LICENSE host: polls.apiblueprint.org basePath: / schemes: - http consumes: - application/json produces: - application/json paths: /questions: x-summary: Questions Collection get: summary: List All Questions responses: 200: description: Successful Response schema: type: array items: $ref: '#/definitions/Question' examples: application/json: - question: Favourite programming language? published_at: '2015-08-05T08:40:51.620Z' choices: - choice: Swift votes: 2048 - choice: Python votes: 1024 - choice: Objective-C votes: 512 - choice: Ruby votes: 256 post: description: >- You may create your own question using this action. It takes a JSON object containing a question and a collection of answers in the form of choices. summary: Create a New Question parameters: - name: body in: body required: true schema: $ref: '#/definitions/QuestionRequest' responses: 201: description: '' schema: $ref: '#/definitions/Question' examples: application/json: question: Favourite programming language? published_at: '2015-08-05T08:40:51.620Z' choices: - choice: Swift votes: 0 - choice: Python votes: 0 - choice: Objective-C votes: 0 - choice: Ruby votes: 0 definitions: Question: title: Question type: object properties: question: type: string published_at: type: string choices: type: array items: $ref: '#/definitions/Choice' required: - question - published_at - choices Choice: title: Choice type: object properties: votes: type: integer format: int32 choice: type: string required: - votes - choice QuestionRequest: title: Question Request type: object properties: question: type: string choices: type: array items: type: string required: - question - choices example: question: Favourite programming language? choices: - Swift - Python - Objective-C - Ruby