Created
September 25, 2014 12:21
-
-
Save esperancaJS/c0c3fcd046ed4e05a7de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is an example of the Uber API | |
# as a demonstration of an API spec in YAML | |
swagger: 2 | |
info: | |
title: Merkatsu API | |
description: Move your app forward with the Merkatsu API | |
version: "0.0.1" | |
# the domain of the service | |
host: localhost.com:2000 | |
# array of all schemes that your API supports | |
schemes: | |
- http | |
# will be prefixed to all paths | |
basePath: /api | |
produces: | |
- application/json | |
paths: | |
/user: | |
get: | |
summary: summ | |
description: descript | |
parameters: | |
- name: text | |
in: query | |
type: array | |
items: | |
type: string | |
responses: | |
200: | |
description: An array of users | |
schema: | |
type: array | |
items: | |
$ref: User | |
default: | |
description: Unexpected error | |
schema: | |
$ref: Error | |
definitions: | |
User: | |
properties: | |
product_id: | |
type: string | |
description: Unique identifier representing a specific product for a given latitude & longitude. For example, uberX in San Francisco will have a different product_id than uberX in Los Angeles. | |
description: | |
type: string | |
description: Description of product. | |
display_name: | |
type: string | |
description: Display name of product. | |
capacity: | |
type: string | |
description: Capacity of product. For example, 4 people. | |
image: | |
type: string | |
description: Image URL representing the product. | |
Error: | |
properties: | |
code: | |
type: integer | |
format: int32 | |
message: | |
type: string | |
fields: | |
type: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment