forked from loafle/openapi-generator-original
Python-exp clean up model classnames (#7054)
* Adds lazy_import, removes python-exp java class renaming code, partial removal of getPythonClassName call sites Fixes PythonClientExperimentalTest.java Python-exp smaples regeneration Revers makefile Reverst pom.xml Fixes model imports in models.__init__ Updates docstring, omits lazy import in additional properties if we dont need it Improves additional_properties_type assignment if None Removes getPythonClassName Fixes python-exp tests * Removes unused makefiles
This commit is contained in:
@@ -15,7 +15,7 @@ Method | HTTP request | Description
|
||||
|
||||
|
||||
# **create_user**
|
||||
> create_user(user_user)
|
||||
> create_user(user)
|
||||
|
||||
Create user
|
||||
|
||||
@@ -27,7 +27,7 @@ This can only be done by the logged in user.
|
||||
import time
|
||||
import petstore_api
|
||||
from petstore_api.api import user_api
|
||||
from petstore_api.model import user
|
||||
from petstore_api.model.user import User
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
@@ -40,12 +40,12 @@ configuration = petstore_api.Configuration(
|
||||
with petstore_api.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = user_api.UserApi(api_client)
|
||||
user_user = user.User() # user.User | Created user object
|
||||
user = User() # User | Created user object
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Create user
|
||||
api_instance.create_user(user_user)
|
||||
api_instance.create_user(user)
|
||||
except petstore_api.ApiException as e:
|
||||
print("Exception when calling UserApi->create_user: %s\n" % e)
|
||||
```
|
||||
@@ -54,7 +54,7 @@ with petstore_api.ApiClient() as api_client:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user_user** | [**user.User**](User.md)| Created user object |
|
||||
**user** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -77,7 +77,7 @@ No authorization required
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **create_users_with_array_input**
|
||||
> create_users_with_array_input(user_user)
|
||||
> create_users_with_array_input(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
@@ -87,7 +87,7 @@ Creates list of users with given input array
|
||||
import time
|
||||
import petstore_api
|
||||
from petstore_api.api import user_api
|
||||
from petstore_api.model import user
|
||||
from petstore_api.model.user import User
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
@@ -100,12 +100,12 @@ configuration = petstore_api.Configuration(
|
||||
with petstore_api.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = user_api.UserApi(api_client)
|
||||
user_user = [user.User()] # [user.User] | List of user object
|
||||
user = [User()] # [User] | List of user object
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Creates list of users with given input array
|
||||
api_instance.create_users_with_array_input(user_user)
|
||||
api_instance.create_users_with_array_input(user)
|
||||
except petstore_api.ApiException as e:
|
||||
print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e)
|
||||
```
|
||||
@@ -114,7 +114,7 @@ with petstore_api.ApiClient() as api_client:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user_user** | [**[user.User]**](User.md)| List of user object |
|
||||
**user** | [**[User]**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -137,7 +137,7 @@ No authorization required
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **create_users_with_list_input**
|
||||
> create_users_with_list_input(user_user)
|
||||
> create_users_with_list_input(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
@@ -147,7 +147,7 @@ Creates list of users with given input array
|
||||
import time
|
||||
import petstore_api
|
||||
from petstore_api.api import user_api
|
||||
from petstore_api.model import user
|
||||
from petstore_api.model.user import User
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
@@ -160,12 +160,12 @@ configuration = petstore_api.Configuration(
|
||||
with petstore_api.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = user_api.UserApi(api_client)
|
||||
user_user = [user.User()] # [user.User] | List of user object
|
||||
user = [User()] # [User] | List of user object
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Creates list of users with given input array
|
||||
api_instance.create_users_with_list_input(user_user)
|
||||
api_instance.create_users_with_list_input(user)
|
||||
except petstore_api.ApiException as e:
|
||||
print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e)
|
||||
```
|
||||
@@ -174,7 +174,7 @@ with petstore_api.ApiClient() as api_client:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user_user** | [**[user.User]**](User.md)| List of user object |
|
||||
**user** | [**[User]**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -259,7 +259,7 @@ No authorization required
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **get_user_by_name**
|
||||
> user.User get_user_by_name(username)
|
||||
> User get_user_by_name(username)
|
||||
|
||||
Get user by user name
|
||||
|
||||
@@ -269,7 +269,7 @@ Get user by user name
|
||||
import time
|
||||
import petstore_api
|
||||
from petstore_api.api import user_api
|
||||
from petstore_api.model import user
|
||||
from petstore_api.model.user import User
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
@@ -301,7 +301,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
[**user.User**](User.md)
|
||||
[**User**](User.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@@ -440,7 +440,7 @@ No authorization required
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **update_user**
|
||||
> update_user(username, user_user)
|
||||
> update_user(username, user)
|
||||
|
||||
Updated user
|
||||
|
||||
@@ -452,7 +452,7 @@ This can only be done by the logged in user.
|
||||
import time
|
||||
import petstore_api
|
||||
from petstore_api.api import user_api
|
||||
from petstore_api.model import user
|
||||
from petstore_api.model.user import User
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
@@ -466,12 +466,12 @@ with petstore_api.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = user_api.UserApi(api_client)
|
||||
username = 'username_example' # str | name that need to be deleted
|
||||
user_user = user.User() # user.User | Updated user object
|
||||
user = User() # User | Updated user object
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
try:
|
||||
# Updated user
|
||||
api_instance.update_user(username, user_user)
|
||||
api_instance.update_user(username, user)
|
||||
except petstore_api.ApiException as e:
|
||||
print("Exception when calling UserApi->update_user: %s\n" % e)
|
||||
```
|
||||
@@ -481,7 +481,7 @@ with petstore_api.ApiClient() as api_client:
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **str**| name that need to be deleted |
|
||||
**user_user** | [**user.User**](User.md)| Updated user object |
|
||||
**user** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
Reference in New Issue
Block a user