mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-07 04:16:10 +00:00
[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:
committed by
William Cheng
parent
a41448ab9c
commit
6578cef260
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user