forked from loafle/openapi-generator-original
add travis.yml for python api client
This commit is contained in:
@@ -167,6 +167,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
}
|
||||
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
|
||||
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
|
||||
supportingFiles.add(new SupportingFile("travis.mustache", "", ".travis.yml"));
|
||||
}
|
||||
|
||||
private static String dropDots(String str) {
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# ref: https://docs.travis-ci.com/user/languages/python
|
||||
language: python
|
||||
python:
|
||||
- "2.7"
|
||||
- "3.2"
|
||||
- "3.3"
|
||||
- "3.4"
|
||||
- "3.5"
|
||||
#- "3.5-dev" # 3.5 development branch
|
||||
#- "nightly" # points to the latest development branch e.g. 3.6-dev
|
||||
# command to install dependencies
|
||||
install: "pip install -r requirements.txt"
|
||||
# command to run tests
|
||||
script: nosetests
|
||||
@@ -1,12 +1,14 @@
|
||||
# ref: https://docs.travis-ci.com/user/languages/python
|
||||
language: python
|
||||
python:
|
||||
- "2.6"
|
||||
- "2.7"
|
||||
- "3.2"
|
||||
- "3.3"
|
||||
- "3.4"
|
||||
install:
|
||||
- pip install . --use-mirrors
|
||||
- pip install -r dev-requirements.txt --use-mirrors
|
||||
script:
|
||||
- nosetests
|
||||
- "3.5"
|
||||
#- "3.5-dev" # 3.5 development branch
|
||||
#- "nightly" # points to the latest development branch e.g. 3.6-dev
|
||||
# command to install dependencies
|
||||
install: "pip install -r requirements.txt"
|
||||
# command to run tests
|
||||
script: nosetests
|
||||
|
||||
@@ -5,7 +5,7 @@ This Python package is automatically generated by the [Swagger Codegen](https://
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
- Build date: 2016-06-14T21:15:09.729+09:00
|
||||
- Build date: 2016-06-17T00:41:00.422+08:00
|
||||
- Build package: class io.swagger.codegen.languages.PythonClientCodegen
|
||||
|
||||
## Requirements.
|
||||
@@ -130,6 +130,12 @@ 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
|
||||
@@ -139,12 +145,6 @@ 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,6 +221,13 @@ 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':
|
||||
{
|
||||
@@ -229,13 +236,6 @@ 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')
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user