Skip to content

Instantly share code, notes, and snippets.

@netmilk
Created Mar 3, 2016
Embed
What would you like to do?
Apiary x-summary and x-description Swagger extensions example
swagger: '2.0'
info:
title: Polls API
description: Polls is a simple API allowing consumers to view polls and vote in them.
version: "8234aab51481d37a30757d925b7f4221a659427e"
host: polls.apiblueprint.org
schemes:
- https
paths:
/questions:
x-summary: Questions Collection
x-description: |
You may create your own question adding a member to this collection. It takes a JSON
object containing a question and a collection of answers in the
form of choices.
get:
summary: List all questions
responses:
200:
description: 'List'
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment