-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from sphinx-contrib/renderer-declarative-tests
Add drop-in test infrastructure
- Loading branch information
Showing
21 changed files
with
2,407 additions
and
0 deletions.
There are no files selected for viewing
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
93 changes: 93 additions & 0 deletions
93
tests/renderers/httpdomain/rendered/v2.0/api-with-examples.yaml.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
.. http:get:: / | ||
**List API versions** | ||
|
||
:statuscode 200: | ||
200 300 response | ||
|
||
.. sourcecode:: http | ||
|
||
HTTP/1.1 200 OK | ||
Content-Type: application/json | ||
|
||
{ | ||
"versions": [ | ||
{ | ||
"status": "CURRENT", | ||
"updated": "2011-01-21T11:33:21Z", | ||
"id": "v2.0", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1:8774/v2/", | ||
"rel": "self" | ||
} | ||
] | ||
}, | ||
{ | ||
"status": "EXPERIMENTAL", | ||
"updated": "2013-07-23T11:33:21Z", | ||
"id": "v3.0", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1:8774/v3/", | ||
"rel": "self" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
:statuscode 300: | ||
200 300 response | ||
|
||
.. http:get:: /v2 | ||
**Show API version details** | ||
|
||
:statuscode 200: | ||
200 203 response | ||
|
||
.. sourcecode:: http | ||
|
||
HTTP/1.1 200 OK | ||
Content-Type: application/json | ||
|
||
{ | ||
"version": { | ||
"status": "CURRENT", | ||
"updated": "2011-01-21T11:33:21Z", | ||
"media-types": [ | ||
{ | ||
"base": "application/xml", | ||
"type": "application/vnd.openstack.compute+xml;version=2" | ||
}, | ||
{ | ||
"base": "application/json", | ||
"type": "application/vnd.openstack.compute+json;version=2" | ||
} | ||
], | ||
"id": "v2.0", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1:8774/v2/", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf", | ||
"type": "application/pdf", | ||
"rel": "describedby" | ||
}, | ||
{ | ||
"href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", | ||
"type": "application/vnd.sun.wadl+xml", | ||
"rel": "describedby" | ||
}, | ||
{ | ||
"href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", | ||
"type": "application/vnd.sun.wadl+xml", | ||
"rel": "describedby" | ||
} | ||
] | ||
} | ||
} | ||
:statuscode 203: | ||
200 203 response |
51 changes: 51 additions & 0 deletions
51
tests/renderers/httpdomain/rendered/v2.0/petstore-expanded.yaml.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
.. http:get:: /pets | ||
Returns all pets from the system that the user has access to | ||
|
||
:queryparam tags: | ||
tags to filter by | ||
:queryparamtype tags: array | ||
:queryparam limit: | ||
maximum number of results to return | ||
:queryparamtype limit: integer:int32 | ||
:statuscode 200: | ||
pet response | ||
|
||
:statuscode default: | ||
unexpected error | ||
|
||
.. http:post:: /pets | ||
Creates a new pet in the store. Duplicates are allowed | ||
|
||
|
||
:statuscode 200: | ||
pet response | ||
|
||
:statuscode default: | ||
unexpected error | ||
|
||
.. http:get:: /pets/{id} | ||
Returns a user based on a single ID, if the user does not have access to the pet | ||
|
||
:param id: | ||
ID of pet to fetch | ||
:paramtype id: integer:int64, required | ||
:statuscode 200: | ||
pet response | ||
|
||
:statuscode default: | ||
unexpected error | ||
|
||
.. http:delete:: /pets/{id} | ||
deletes a single pet based on the ID supplied | ||
|
||
:param id: | ||
ID of pet to delete | ||
:paramtype id: integer:int64, required | ||
:statuscode 204: | ||
pet deleted | ||
:statuscode default: | ||
unexpected error |
38 changes: 38 additions & 0 deletions
38
tests/renderers/httpdomain/rendered/v2.0/petstore.yaml.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.. http:get:: /pets | ||
**List all pets** | ||
|
||
:queryparam limit: | ||
How many items to return at one time (max 100) | ||
:queryparamtype limit: integer:int32 | ||
:statuscode 200: | ||
A paged array of pets | ||
|
||
|
||
:resheader x-next: | ||
A link to the next page of responses | ||
:resheadertype x-next: string | ||
:statuscode default: | ||
unexpected error | ||
|
||
.. http:post:: /pets | ||
**Create a pet** | ||
|
||
:statuscode 201: | ||
Null response | ||
:statuscode default: | ||
unexpected error | ||
|
||
.. http:get:: /pets/{petId} | ||
**Info for a specific pet** | ||
|
||
:param petId: | ||
The id of the pet to retrieve | ||
:paramtype petId: string, required | ||
:statuscode 200: | ||
Expected response to a valid request | ||
|
||
:statuscode default: | ||
unexpected error |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
.. http:get:: /products | ||
**Product Types** | ||
|
||
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. | ||
|
||
:queryparam latitude: | ||
Latitude component of location. | ||
:queryparamtype latitude: number:double, required | ||
:queryparam longitude: | ||
Longitude component of location. | ||
:queryparamtype longitude: number:double, required | ||
:statuscode 200: | ||
An array of products | ||
|
||
:statuscode default: | ||
Unexpected error | ||
|
||
.. http:get:: /estimates/price | ||
**Price Estimates** | ||
|
||
.. role:: raw-html-m2r(raw) | ||
:format: html | ||
|
||
|
||
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.\ :raw-html-m2r:`<br>`\ :raw-html-m2r:`<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. | ||
|
||
:queryparam start_latitude: | ||
Latitude component of start location. | ||
:queryparamtype start_latitude: number:double, required | ||
:queryparam start_longitude: | ||
Longitude component of start location. | ||
:queryparamtype start_longitude: number:double, required | ||
:queryparam end_latitude: | ||
Latitude component of end location. | ||
:queryparamtype end_latitude: number:double, required | ||
:queryparam end_longitude: | ||
Longitude component of end location. | ||
:queryparamtype end_longitude: number:double, required | ||
:statuscode 200: | ||
An array of price estimates by product | ||
|
||
:statuscode default: | ||
Unexpected error | ||
|
||
.. http:get:: /estimates/time | ||
**Time Estimates** | ||
|
||
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. | ||
|
||
:queryparam start_latitude: | ||
Latitude component of start location. | ||
:queryparamtype start_latitude: number:double, required | ||
:queryparam start_longitude: | ||
Longitude component of start location. | ||
:queryparamtype start_longitude: number:double, required | ||
:queryparam customer_uuid: | ||
Unique customer identifier to be used for experience customization. | ||
:queryparamtype customer_uuid: string:uuid | ||
:queryparam product_id: | ||
Unique identifier representing a specific product for a given latitude & longitude. | ||
:queryparamtype product_id: string | ||
:statuscode 200: | ||
An array of products | ||
|
||
:statuscode default: | ||
Unexpected error | ||
|
||
.. http:get:: /me | ||
**User Profile** | ||
|
||
The User Profile endpoint returns information about the Uber user that has authorized with the application. | ||
|
||
:statuscode 200: | ||
Profile information for a user | ||
|
||
:statuscode default: | ||
Unexpected error | ||
|
||
.. http:get:: /history | ||
**User Activity** | ||
|
||
.. role:: raw-html-m2r(raw) | ||
:format: html | ||
|
||
|
||
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.\ :raw-html-m2r:`<br>`\ :raw-html-m2r:`<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. | ||
|
||
:queryparam offset: | ||
Offset the list of returned results by this amount. Default is zero. | ||
:queryparamtype offset: integer:int32 | ||
:queryparam limit: | ||
Number of items to retrieve. Default is 5, maximum is 100. | ||
:queryparamtype limit: integer:int32 | ||
:statuscode 200: | ||
History information for the given user | ||
|
||
:statuscode default: | ||
Unexpected error |
Oops, something went wrong.