Add Bearer authentication support to Python client (#1999)

* add bearer auth support to python

* add bearer auth support to python

* update python oas2 petstore samples

* update samples

* add bearer format

* update php symfony samle
This commit is contained in:
William Cheng
2019-01-30 22:16:53 +08:00
committed by GitHub
parent 77d2de4e3d
commit 2eb99f602a
37 changed files with 294 additions and 89 deletions

View File

@@ -15,6 +15,7 @@ To test special tags
To test special tags and operation ID starting with number
### Example
```python
from __future__ import print_function
import time

View File

@@ -27,6 +27,7 @@ creates an XmlItem
this route creates an XmlItem
### Example
```python
from __future__ import print_function
import time
@@ -74,6 +75,7 @@ No authorization required
Test serialization of outer boolean types
### Example
```python
from __future__ import print_function
import time
@@ -121,6 +123,7 @@ No authorization required
Test serialization of object with outer number type
### Example
```python
from __future__ import print_function
import time
@@ -168,6 +171,7 @@ No authorization required
Test serialization of outer number types
### Example
```python
from __future__ import print_function
import time
@@ -215,6 +219,7 @@ No authorization required
Test serialization of outer string types
### Example
```python
from __future__ import print_function
import time
@@ -262,6 +267,7 @@ No authorization required
For this test, the body for this request much reference a schema named `File`.
### Example
```python
from __future__ import print_function
import time
@@ -306,6 +312,7 @@ No authorization required
### Example
```python
from __future__ import print_function
import time
@@ -354,6 +361,7 @@ To test \"client\" model
To test \"client\" model
### Example
```python
from __future__ import print_function
import time
@@ -403,7 +411,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
### Example
* Basic Authentication (http_basic_test):
* Basic Authentication (http_basic_test):
```python
from __future__ import print_function
import time
@@ -481,6 +489,7 @@ To test enum parameters
To test enum parameters
### Example
```python
from __future__ import print_function
import time
@@ -542,6 +551,7 @@ Fake endpoint to test group parameters (optional)
Fake endpoint to test group parameters (optional)
### Example
```python
from __future__ import print_function
import time
@@ -597,6 +607,7 @@ No authorization required
test inline additionalProperties
### Example
```python
from __future__ import print_function
import time
@@ -642,6 +653,7 @@ No authorization required
test json serialization of form data
### Example
```python
from __future__ import print_function
import time

View File

@@ -16,7 +16,7 @@ To test class name in snake case
### Example
* Api Key Authentication (api_key_query):
* Api Key Authentication (api_key_query):
```python
from __future__ import print_function
import time

View File

@@ -22,7 +22,7 @@ Add a new pet to the store
### Example
* OAuth Authentication (petstore_auth):
* OAuth Authentication (petstore_auth):
```python
from __future__ import print_function
import time
@@ -72,7 +72,7 @@ Deletes a pet
### Example
* OAuth Authentication (petstore_auth):
* OAuth Authentication (petstore_auth):
```python
from __future__ import print_function
import time
@@ -126,7 +126,7 @@ Multiple status values can be provided with comma separated strings
### Example
* OAuth Authentication (petstore_auth):
* OAuth Authentication (petstore_auth):
```python
from __future__ import print_function
import time
@@ -179,7 +179,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
### Example
* OAuth Authentication (petstore_auth):
* OAuth Authentication (petstore_auth):
```python
from __future__ import print_function
import time
@@ -232,7 +232,7 @@ Returns a single pet
### Example
* Api Key Authentication (api_key):
* Api Key Authentication (api_key):
```python
from __future__ import print_function
import time
@@ -285,7 +285,7 @@ Update an existing pet
### Example
* OAuth Authentication (petstore_auth):
* OAuth Authentication (petstore_auth):
```python
from __future__ import print_function
import time
@@ -335,7 +335,7 @@ Updates a pet in the store with form data
### Example
* OAuth Authentication (petstore_auth):
* OAuth Authentication (petstore_auth):
```python
from __future__ import print_function
import time
@@ -389,7 +389,7 @@ uploads an image
### Example
* OAuth Authentication (petstore_auth):
* OAuth Authentication (petstore_auth):
```python
from __future__ import print_function
import time
@@ -444,7 +444,7 @@ uploads an image (required)
### Example
* OAuth Authentication (petstore_auth):
* OAuth Authentication (petstore_auth):
```python
from __future__ import print_function
import time

View File

@@ -18,6 +18,7 @@ Delete purchase order by ID
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
### Example
```python
from __future__ import print_function
import time
@@ -66,7 +67,7 @@ Returns a map of status codes to quantities
### Example
* Api Key Authentication (api_key):
* Api Key Authentication (api_key):
```python
from __future__ import print_function
import time
@@ -116,6 +117,7 @@ Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
### Example
```python
from __future__ import print_function
import time
@@ -162,6 +164,7 @@ No authorization required
Place an order for a pet
### Example
```python
from __future__ import print_function
import time

View File

@@ -22,6 +22,7 @@ Create user
This can only be done by the logged in user.
### Example
```python
from __future__ import print_function
import time
@@ -67,6 +68,7 @@ No authorization required
Creates list of users with given input array
### Example
```python
from __future__ import print_function
import time
@@ -112,6 +114,7 @@ No authorization required
Creates list of users with given input array
### Example
```python
from __future__ import print_function
import time
@@ -159,6 +162,7 @@ Delete user
This can only be done by the logged in user.
### Example
```python
from __future__ import print_function
import time
@@ -204,6 +208,7 @@ No authorization required
Get user by user name
### Example
```python
from __future__ import print_function
import time
@@ -250,6 +255,7 @@ No authorization required
Logs user into the system
### Example
```python
from __future__ import print_function
import time
@@ -298,6 +304,7 @@ No authorization required
Logs out current logged in user session
### Example
```python
from __future__ import print_function
import time
@@ -341,6 +348,7 @@ Updated user
This can only be done by the logged in user.
### Example
```python
from __future__ import print_function
import time