forked from loafle/openapi-generator-original
Omit @property.setter for readonly property
This commit is contained in:
2
samples/client/petstore/python/.gitignore
vendored
2
samples/client/petstore/python/.gitignore
vendored
@@ -44,6 +44,8 @@ nosetests.xml
|
||||
coverage.xml
|
||||
*,cover
|
||||
.hypothesis/
|
||||
venv/
|
||||
.python-version
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# swagger_client
|
||||
# petstore_api
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
- Build date: 2016-06-08T23:40:51.798+09:00
|
||||
- Build date: 2016-06-09T08:00:02.342+09:00
|
||||
- Build package: class io.swagger.codegen.languages.PythonClientCodegen
|
||||
|
||||
## Requirements.
|
||||
@@ -24,7 +24,7 @@ pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
||||
|
||||
Then import the package:
|
||||
```python
|
||||
import petstore_api
|
||||
import petstore_api
|
||||
```
|
||||
|
||||
### Setuptools
|
||||
@@ -130,12 +130,6 @@ Class | Method | HTTP request | Description
|
||||
## Documentation For Authorization
|
||||
|
||||
|
||||
## api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
## petstore_auth
|
||||
|
||||
- **Type**: OAuth
|
||||
@@ -145,6 +139,12 @@ Class | Method | HTTP request | Description
|
||||
- **write:pets**: modify pets in your account
|
||||
- **read:pets**: read your pets
|
||||
|
||||
## api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
|
||||
## Author
|
||||
|
||||
|
||||
@@ -221,13 +221,6 @@ class Configuration(object):
|
||||
:return: The Auth Settings information dict.
|
||||
"""
|
||||
return {
|
||||
'api_key':
|
||||
{
|
||||
'type': 'api_key',
|
||||
'in': 'header',
|
||||
'key': 'api_key',
|
||||
'value': self.get_api_key_with_prefix('api_key')
|
||||
},
|
||||
|
||||
'petstore_auth':
|
||||
{
|
||||
@@ -236,6 +229,13 @@ class Configuration(object):
|
||||
'key': 'Authorization',
|
||||
'value': 'Bearer ' + self.access_token
|
||||
},
|
||||
'api_key':
|
||||
{
|
||||
'type': 'api_key',
|
||||
'in': 'header',
|
||||
'key': 'api_key',
|
||||
'value': self.get_api_key_with_prefix('api_key')
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -94,18 +94,6 @@ class Name(object):
|
||||
"""
|
||||
return self._snake_case
|
||||
|
||||
@snake_case.setter
|
||||
def snake_case(self, snake_case):
|
||||
"""
|
||||
Sets the snake_case of this Name.
|
||||
|
||||
|
||||
:param snake_case: The snake_case of this Name.
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self._snake_case = snake_case
|
||||
|
||||
@property
|
||||
def _property(self):
|
||||
"""
|
||||
@@ -140,18 +128,6 @@ class Name(object):
|
||||
"""
|
||||
return self.__123_number
|
||||
|
||||
@_123_number.setter
|
||||
def _123_number(self, _123_number):
|
||||
"""
|
||||
Sets the _123_number of this Name.
|
||||
|
||||
|
||||
:param _123_number: The _123_number of this Name.
|
||||
:type: int
|
||||
"""
|
||||
|
||||
self.__123_number = _123_number
|
||||
|
||||
def to_dict(self):
|
||||
"""
|
||||
Returns the model properties as a dict
|
||||
|
||||
@@ -65,18 +65,6 @@ class ReadOnlyFirst(object):
|
||||
"""
|
||||
return self._bar
|
||||
|
||||
@bar.setter
|
||||
def bar(self, bar):
|
||||
"""
|
||||
Sets the bar of this ReadOnlyFirst.
|
||||
|
||||
|
||||
:param bar: The bar of this ReadOnlyFirst.
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._bar = bar
|
||||
|
||||
@property
|
||||
def baz(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user