Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use openapi-generator to generate client #58

Merged
merged 6 commits into from
Mar 23, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions kubernetes_asyncio/.openapi-generator/COMMIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Requested Commit: v3.3.4
Actual Commit: 2353d71d4b02be6dbabe25aac1a9e56eb3b812a2
1 change: 1 addition & 0 deletions kubernetes_asyncio/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.4
1 change: 1 addition & 0 deletions kubernetes_asyncio/.openapi-generator/swagger.json.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1458f0da7729213788e8525409c53ef1342ada37dfa1f9554279d6a5b35ffe3d
2 changes: 0 additions & 2 deletions kubernetes_asyncio/.swagger-codegen/COMMIT

This file was deleted.

1 change: 0 additions & 1 deletion kubernetes_asyncio/.swagger-codegen/VERSION

This file was deleted.

19 changes: 11 additions & 8 deletions kubernetes_asyncio/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# kubernetes_asyncio.client
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: v1.12.4
- API version: v1.12.6
- Package version: 8.0.0-snapshot
- Build package: io.swagger.codegen.languages.PythonClientCodegen
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Expand Down Expand Up @@ -52,11 +52,13 @@ from kubernetes_asyncio.client.rest import ApiException
from pprint import pprint

# Configure API key authorization: BearerToken
kubernetes_asyncio.client.configuration.api_key['authorization'] = 'YOUR_API_KEY'
configuration = kubernetes_asyncio.client.Configuration()
configuration.api_key['authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# kubernetes_asyncio.client.configuration.api_key_prefix['authorization'] = 'Bearer'
# configuration.api_key_prefix['authorization'] = 'Bearer'

# create an instance of the API class
api_instance = kubernetes_asyncio.client.AdmissionregistrationApi()
api_instance = kubernetes_asyncio.client.AdmissionregistrationApi(kubernetes_asyncio.client.ApiClient(configuration))

try:
api_response = api_instance.get_api_group()
Expand All @@ -68,7 +70,7 @@ except ApiException as e:

## Documentation for API Endpoints

All URIs are relative to *https://localhost*
All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
Expand Down Expand Up @@ -1472,3 +1474,4 @@ Class | Method | HTTP request | Description




9 changes: 5 additions & 4 deletions kubernetes_asyncio/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@
"""
Kubernetes

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501

OpenAPI spec version: v1.12.4

Generated by: https://github.com/swagger-api/swagger-codegen.git
OpenAPI spec version: v1.12.6
Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

__version__ = "8.0.0-snapshot"

# import apis into sdk package
from kubernetes_asyncio.client.api.admissionregistration_api import AdmissionregistrationApi
from kubernetes_asyncio.client.api.admissionregistration_v1alpha1_api import AdmissionregistrationV1alpha1Api
Expand Down
32 changes: 14 additions & 18 deletions kubernetes_asyncio/client/api/admissionregistration_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
"""
Kubernetes

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501

OpenAPI spec version: v1.12.4

Generated by: https://github.com/swagger-api/swagger-codegen.git
OpenAPI spec version: v1.12.6
Generated by: https://openapi-generator.tech
"""


Expand All @@ -22,10 +21,10 @@


class AdmissionregistrationApi(object):
"""NOTE: This class is auto generated by the swagger code generator program.
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech

Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""

def __init__(self, api_client=None):
Expand Down Expand Up @@ -69,21 +68,22 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
returns the request thread.
"""

local_var_params = locals()

all_params = [] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')

params = locals()
for key, val in six.iteritems(params['kwargs']):
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_api_group" % key
)
params[key] = val
del params['kwargs']
local_var_params[key] = val
del local_var_params['kwargs']

collection_formats = {}

Expand All @@ -101,10 +101,6 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501

# Authentication setting
auth_settings = ['BearerToken'] # noqa: E501

Expand All @@ -118,8 +114,8 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
files=local_var_files,
response_type='V1APIGroup', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
Loading