Skip to content

Commit 8ed74de

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents dd9d279 + 3ba56ac commit 8ed74de

File tree

3 files changed

+433
-3
lines changed

3 files changed

+433
-3
lines changed

examples/v2.0/yaml/uber.yaml

Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
swagger: 2
2+
info:
3+
title: Uber API
4+
description: Move your app forward with the Uber API
5+
version: 1.0.0
6+
host: api.uber.com
7+
schemes:
8+
- https
9+
basePath: /v1
10+
produces:
11+
- application/json
12+
# security:
13+
# - oauth2:
14+
# $ref: security/github/accessCode
15+
# - apitoken:
16+
# type: "header"
17+
# name: "api_key"
18+
paths:
19+
/products:
20+
get:
21+
summary: Product Types
22+
description: The Products endpoint returns information about the Uber products offered at a given location. The response includes the display name and other details about each product, and lists the products in the proper display order.
23+
parameters:
24+
- name: latitude
25+
in: query
26+
description: Latitude component of location.
27+
required: true
28+
type: number
29+
- name: longitude
30+
in: query
31+
description: Longitude component of location.
32+
required: true
33+
type: number
34+
tags:
35+
- Products
36+
responses:
37+
200:
38+
description: An array of products
39+
schema:
40+
$ref: Products
41+
default:
42+
description: Unexpected error
43+
schema:
44+
$ref: Error
45+
/estimates/price:
46+
get:
47+
summary: Price Estimates
48+
description: The Price Estimates endpoint returns an estimated price range for each product offered at a given location. The price estimate is provided as a formatted string with the full price range and the localized currency symbol.<br><br>The response also includes low and high estimates, and the [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code for situations requiring currency conversion. When surge is active for a particular product, its surge_multiplier will be greater than 1, but the price estimate already factors in this multiplier.
49+
parameters:
50+
- name: start_latitude
51+
in: query
52+
description: Latitude component of start location.
53+
required: true
54+
type: number
55+
- name: start_longitude
56+
in: query
57+
description: Longitude component of start location.
58+
required: true
59+
type: number
60+
- name: end_latitude
61+
in: query
62+
description: Latitude component of end location.
63+
required: true
64+
type: number
65+
- name: end_longitude
66+
in: query
67+
description: Longitude component of end location.
68+
required: true
69+
type: number
70+
tags:
71+
- Estimates
72+
responses:
73+
200:
74+
description: An array of price estimates by product
75+
schema:
76+
$ref: PriceEstimates
77+
default:
78+
description: Unexpected error
79+
schema:
80+
$ref: Error
81+
/estimates/time:
82+
get:
83+
summary: Time Estimates
84+
description: The Time Estimates endpoint returns ETAs for all products offered at a given location, with the responses expressed as integers in seconds. We recommend that this endpoint be called every minute to provide the most accurate, up-to-date ETAs.
85+
parameters:
86+
- name: start_latitude
87+
in: query
88+
description: Latitude component of start location.
89+
required: true
90+
- name: start_longitude
91+
in: query
92+
description: Longitude component of start location.
93+
required: true
94+
- name: customer_uuid
95+
in: query
96+
type: string
97+
description: Unique customer identifier to be used for experience customization.
98+
- name: product_id
99+
in: query
100+
type: string
101+
description: Unique identifier representing a specific product for a given latitude & longitude.
102+
tags:
103+
- Estimates
104+
responses:
105+
200:
106+
description: An array of products
107+
schema:
108+
$ref: Products
109+
default:
110+
description: Unexpected error
111+
schema:
112+
$ref: Error
113+
/me:
114+
get:
115+
summary: User Profile
116+
description: The User Profile endpoint returns information about the Uber user that has authorized with the application.
117+
tags:
118+
- User
119+
responses:
120+
200:
121+
description: Profile information for a user
122+
schema:
123+
$ref: Profile
124+
default:
125+
description: Unexpected error
126+
schema:
127+
$ref: Error
128+
/history:
129+
get:
130+
summary: User Activity
131+
description: The User Activity endpoint returns data about a user's lifetime activity with Uber. The response will include pickup locations and times, dropoff locations and times, the distance of past requests, and information about which products were requested.<br><br>The history array in the response will have a maximum length based on the limit parameter. The response value count may exceed limit, therefore subsequent API requests may be necessary.
132+
parameters:
133+
- name: offset
134+
in: query
135+
type: integer
136+
description: Offset the list of returned results by this amount. Default is zero.
137+
- name: limit
138+
in: query
139+
type: integer
140+
description: Number of items to retrieve. Default is 5, maximum is 100.
141+
tags:
142+
- User
143+
responses:
144+
200:
145+
description: History information for the given user
146+
schema:
147+
$ref: Activities
148+
default:
149+
description: Unexpected error
150+
schema:
151+
$ref: Error
152+
definitions:
153+
Product:
154+
properties:
155+
product_id:
156+
type: string
157+
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.
158+
description:
159+
type: string
160+
description: Description of product.
161+
display_name:
162+
type: string
163+
description: Display name of product.
164+
capacity:
165+
type: string
166+
description: Capacity of product. For example, 4 people.
167+
image:
168+
type: string
169+
description: Image URL representing the product.
170+
Products:
171+
type: array
172+
items:
173+
$ref: Product
174+
PriceEstimate:
175+
properties:
176+
product_id:
177+
type: string
178+
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
179+
currency_code:
180+
type: string
181+
description: "[ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code."
182+
display_name:
183+
type: string
184+
description: Display name of product.
185+
estimate:
186+
type: string
187+
description: Formatted string of estimate in local currency of the start location. Estimate could be a range, a single number (flat rate) or "Metered" for TAXI.
188+
low_estimate:
189+
type: number
190+
description: Lower bound of the estimated price.
191+
high_estimate:
192+
type: number
193+
description: Upper bound of the estimated price.
194+
surge_multiplier:
195+
type: number
196+
description: Expected surge multiplier. Surge is active if surge_multiplier is greater than 1. Price estimate already factors in the surge multiplier.
197+
PriceEstimates:
198+
type: array
199+
items:
200+
$ref: PriceEstimate
201+
Profile:
202+
properties:
203+
first_name:
204+
type: string
205+
description: First name of the Uber user.
206+
last_name:
207+
type: string
208+
description: Last name of the Uber user.
209+
email:
210+
type: string
211+
description: Email address of the Uber user
212+
picture:
213+
type: string
214+
description: Image URL of the Uber user.
215+
promo_code:
216+
type: string
217+
description: Promo code of the Uber user.
218+
Activity:
219+
properties:
220+
uuid:
221+
type: string
222+
description: Unique identifier for the activity
223+
Activities:
224+
properties:
225+
offset:
226+
type: integer
227+
description: Position in pagination.
228+
limit:
229+
type: integer
230+
description: Number of items to retrieve (100 max).
231+
count:
232+
type: integer
233+
description: Total number of items available.
234+
history:
235+
type: array
236+
$ref: Activity
237+
Error:
238+
properties:
239+
code:
240+
type: integer
241+
format: int32
242+
message:
243+
type: string
244+
fields:
245+
type: object

schemas/v2.0/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@
310310
},
311311
"type": {
312312
"type": "string",
313-
"enum": [ "string", "number", "boolean", "integer", "array" ]
313+
"enum": [ "string", "number", "boolean", "integer", "array", "file" ]
314314
},
315315
"format": {
316316
"type": "string"

0 commit comments

Comments
 (0)