Skip to content

Commit 91ade8a

Browse files
authored
[WIP] feat: use openapi-generator to generate client (#58)
* feat: base on openapi-generator, use spec v1.12.7
1 parent 5e927af commit 91ade8a

File tree

1,600 files changed

+31802
-33814
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,600 files changed

+31802
-33814
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Requested Commit: v3.3.4
2+
Actual Commit: 2353d71d4b02be6dbabe25aac1a9e56eb3b812a2
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.3.4
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0cd5951e3519b6cdf9ac53eface4fab758739a7e8d1f326f425b9d1c44879b7f

kubernetes_asyncio/.swagger-codegen/COMMIT

Lines changed: 0 additions & 2 deletions
This file was deleted.

kubernetes_asyncio/.swagger-codegen/VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

kubernetes_asyncio/README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# kubernetes_asyncio.client
2-
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
2+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
33

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

6-
- API version: v1.12.4
6+
- API version: v1.12.7
77
- Package version: 8.0.0-snapshot
8-
- Build package: io.swagger.codegen.languages.PythonClientCodegen
8+
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99

1010
## Requirements.
1111

@@ -52,11 +52,13 @@ from kubernetes_asyncio.client.rest import ApiException
5252
from pprint import pprint
5353

5454
# Configure API key authorization: BearerToken
55-
kubernetes_asyncio.client.configuration.api_key['authorization'] = 'YOUR_API_KEY'
55+
configuration = kubernetes_asyncio.client.Configuration()
56+
configuration.api_key['authorization'] = 'YOUR_API_KEY'
5657
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
57-
# kubernetes_asyncio.client.configuration.api_key_prefix['authorization'] = 'Bearer'
58+
# configuration.api_key_prefix['authorization'] = 'Bearer'
59+
5860
# create an instance of the API class
59-
api_instance = kubernetes_asyncio.client.AdmissionregistrationApi()
61+
api_instance = kubernetes_asyncio.client.AdmissionregistrationApi(kubernetes_asyncio.client.ApiClient(configuration))
6062

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

6971
## Documentation for API Endpoints
7072

71-
All URIs are relative to *https://localhost*
73+
All URIs are relative to *http://localhost*
7274

7375
Class | Method | HTTP request | Description
7476
------------ | ------------- | ------------- | -------------
@@ -1472,3 +1474,4 @@ Class | Method | HTTP request | Description
14721474

14731475

14741476

1477+

kubernetes_asyncio/client/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55
"""
66
Kubernetes
77
8-
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
8+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
99
10-
OpenAPI spec version: v1.12.4
11-
12-
Generated by: https://github.com/swagger-api/swagger-codegen.git
10+
OpenAPI spec version: v1.12.7
11+
Generated by: https://openapi-generator.tech
1312
"""
1413

1514

1615
from __future__ import absolute_import
1716

17+
__version__ = "8.0.0-snapshot"
18+
1819
# import apis into sdk package
1920
from kubernetes_asyncio.client.api.admissionregistration_api import AdmissionregistrationApi
2021
from kubernetes_asyncio.client.api.admissionregistration_v1alpha1_api import AdmissionregistrationV1alpha1Api

kubernetes_asyncio/client/api/admissionregistration_api.py

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
"""
44
Kubernetes
55
6-
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
6+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
77
8-
OpenAPI spec version: v1.12.4
9-
10-
Generated by: https://github.com/swagger-api/swagger-codegen.git
8+
OpenAPI spec version: v1.12.7
9+
Generated by: https://openapi-generator.tech
1110
"""
1211

1312

@@ -22,10 +21,10 @@
2221

2322

2423
class AdmissionregistrationApi(object):
25-
"""NOTE: This class is auto generated by the swagger code generator program.
24+
"""NOTE: This class is auto generated by OpenAPI Generator
25+
Ref: https://openapi-generator.tech
2626
2727
Do not edit the class manually.
28-
Ref: https://github.com/swagger-api/swagger-codegen
2928
"""
3029

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

71+
local_var_params = locals()
72+
7273
all_params = [] # noqa: E501
7374
all_params.append('async_req')
7475
all_params.append('_return_http_data_only')
7576
all_params.append('_preload_content')
7677
all_params.append('_request_timeout')
7778

78-
params = locals()
79-
for key, val in six.iteritems(params['kwargs']):
79+
for key, val in six.iteritems(local_var_params['kwargs']):
8080
if key not in all_params:
8181
raise TypeError(
8282
"Got an unexpected keyword argument '%s'"
8383
" to method get_api_group" % key
8484
)
85-
params[key] = val
86-
del params['kwargs']
85+
local_var_params[key] = val
86+
del local_var_params['kwargs']
8787

8888
collection_formats = {}
8989

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

104-
# HTTP header `Content-Type`
105-
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
106-
['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501
107-
108104
# Authentication setting
109105
auth_settings = ['BearerToken'] # noqa: E501
110106

@@ -118,8 +114,8 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501
118114
files=local_var_files,
119115
response_type='V1APIGroup', # noqa: E501
120116
auth_settings=auth_settings,
121-
async_req=params.get('async_req'),
122-
_return_http_data_only=params.get('_return_http_data_only'),
123-
_preload_content=params.get('_preload_content', True),
124-
_request_timeout=params.get('_request_timeout'),
117+
async_req=local_var_params.get('async_req'),
118+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
119+
_preload_content=local_var_params.get('_preload_content', True),
120+
_request_timeout=local_var_params.get('_request_timeout'),
125121
collection_formats=collection_formats)

0 commit comments

Comments
 (0)