Skip to content

Instantly share code, notes, and snippets.

@seanpk
Last active February 17, 2016 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanpk/34bdbd25e64b022a660c to your computer and use it in GitHub Desktop.
Save seanpk/34bdbd25e64b022a660c to your computer and use it in GitHub Desktop.
Code snippets referenced from the pointsource.com blog: 3 Best Practices for API Development with Swagger (Open API)
get:
summary: User Profile
description: |
The User Profile endpoint returns information about the Uber user that has authorized with the application.
tags:
- User
responses:
200:
description: Profile information for a user
schema:
$ref: '../definitions/Profile.yaml'
default:
description: Unexpected error
schema:
$ref: '../definitions/Error.yaml'
{
"name": "address",
"in": "query",
"required": false,
"type": "string",
"description": "A string representing the address to be geocoded and used in a query.\nThis string should consist of a combination of components such as:\nstreet address, city, state, and zip code.\n\n**Examples**:\n\n1. `address=123 main st, fl`\n2. `address=33133`\n3. `address=401 Channelside Dr, Tampa, FL 33602`\n"
}
name: address
in: query
required: false
type: string
description: |
A string representing the address to be geocoded and used in a query.
This string should consist of a combination of components such as:
street address, city, state, and zip code.
**Examples**:
1. `address=123 main st, fl`
2. `address=33133`
3. `address=401 Channelside Dr, Tampa, FL 33602`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment