forked from loafle/openapi-generator-original
fix python property name
This commit is contained in:
parent
56ac576a18
commit
8eb3f8a448
0
bin/lumen-petstore-server.sh
Normal file → Executable file
0
bin/lumen-petstore-server.sh
Normal file → Executable file
@ -69,6 +69,8 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
// local variable name used in API methods (endpoints)
|
// local variable name used in API methods (endpoints)
|
||||||
"all_params", "resource_path", "path_params", "query_params",
|
"all_params", "resource_path", "path_params", "query_params",
|
||||||
"header_params", "form_params", "local_var_files", "body_params", "auth_settings",
|
"header_params", "form_params", "local_var_files", "body_params", "auth_settings",
|
||||||
|
// @property
|
||||||
|
"property",
|
||||||
// python reserved words
|
// python reserved words
|
||||||
"and", "del", "from", "not", "while", "as", "elif", "global", "or", "with",
|
"and", "del", "from", "not", "while", "as", "elif", "global", "or", "with",
|
||||||
"assert", "else", "if", "pass", "yield", "break", "except", "import",
|
"assert", "else", "if", "pass", "yield", "break", "except", "import",
|
||||||
|
@ -717,6 +717,8 @@ definitions:
|
|||||||
readOnly: true
|
readOnly: true
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
|
property:
|
||||||
|
type: string
|
||||||
xml:
|
xml:
|
||||||
name: Name
|
name: Name
|
||||||
200_response:
|
200_response:
|
||||||
|
@ -5,7 +5,7 @@ This Python package is automatically generated by the [Swagger Codegen](https://
|
|||||||
|
|
||||||
- API version: 1.0.0
|
- API version: 1.0.0
|
||||||
- Package version: 1.0.0
|
- Package version: 1.0.0
|
||||||
- Build date: 2016-04-19T21:05:59.494+01:00
|
- Build date: 2016-04-20T22:11:45.927+08:00
|
||||||
- Build package: class io.swagger.codegen.languages.PythonClientCodegen
|
- Build package: class io.swagger.codegen.languages.PythonClientCodegen
|
||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
@ -5,6 +5,7 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**name** | **int** | |
|
**name** | **int** | |
|
||||||
**snake_case** | **int** | | [optional]
|
**snake_case** | **int** | | [optional]
|
||||||
|
**_property** | **str** | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -38,16 +38,19 @@ class Name(object):
|
|||||||
"""
|
"""
|
||||||
self.swagger_types = {
|
self.swagger_types = {
|
||||||
'name': 'int',
|
'name': 'int',
|
||||||
'snake_case': 'int'
|
'snake_case': 'int',
|
||||||
|
'_property': 'str'
|
||||||
}
|
}
|
||||||
|
|
||||||
self.attribute_map = {
|
self.attribute_map = {
|
||||||
'name': 'name',
|
'name': 'name',
|
||||||
'snake_case': 'snake_case'
|
'snake_case': 'snake_case',
|
||||||
|
'_property': 'property'
|
||||||
}
|
}
|
||||||
|
|
||||||
self._name = None
|
self._name = None
|
||||||
self._snake_case = None
|
self._snake_case = None
|
||||||
|
self.__property = None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
@ -93,6 +96,28 @@ class Name(object):
|
|||||||
"""
|
"""
|
||||||
self._snake_case = snake_case
|
self._snake_case = snake_case
|
||||||
|
|
||||||
|
@property
|
||||||
|
def _property(self):
|
||||||
|
"""
|
||||||
|
Gets the _property of this Name.
|
||||||
|
|
||||||
|
|
||||||
|
:return: The _property of this Name.
|
||||||
|
:rtype: str
|
||||||
|
"""
|
||||||
|
return self.__property
|
||||||
|
|
||||||
|
@_property.setter
|
||||||
|
def _property(self, _property):
|
||||||
|
"""
|
||||||
|
Sets the _property of this Name.
|
||||||
|
|
||||||
|
|
||||||
|
:param _property: The _property of this Name.
|
||||||
|
:type: str
|
||||||
|
"""
|
||||||
|
self.__property = _property
|
||||||
|
|
||||||
def to_dict(self):
|
def to_dict(self):
|
||||||
"""
|
"""
|
||||||
Returns the model properties as a dict
|
Returns the model properties as a dict
|
||||||
|
Loading…
x
Reference in New Issue
Block a user