[python] : Make example code snippet compilable (#3148)

* feat(python): Making example compilable

* feat(python): Updating pet project

* feat(python): Updating comments

* feat(documentation): Fixing comments style

* feat(documentation): Updating documentation

* feat(documentation): Fixing comments style
This commit is contained in:
Sai Giridhar P
2019-06-28 15:23:25 +05:30
committed by William Cheng
parent a41448ab9c
commit 6578cef260
31 changed files with 262 additions and 152 deletions

View File

@@ -30,7 +30,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
body = petstore_api.User() # User | Created user object
@@ -81,7 +81,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
body = [petstore_api.User()] # list[User] | List of user object
@@ -132,7 +132,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
body = [petstore_api.User()] # list[User] | List of user object
@@ -185,7 +185,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | The name that needs to be deleted
@@ -237,7 +237,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | The name that needs to be fetched. Use user1 for testing.
@@ -291,7 +291,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | The user name for login
password = 'password_example' # str | The password for login in clear text
@@ -346,7 +346,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
try:
@@ -395,7 +395,7 @@ import petstore_api
from petstore_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
# Create an instance of the API class
api_instance = petstore_api.UserApi()
username = 'username_example' # str | name that need to be deleted
body = petstore_api.User() # User | Updated user object