Skip to content

Commit 9fd4d76

Browse files
committed
Regenerate api with openapi generator v4.2.3
1 parent b3e748c commit 9fd4d76

File tree

676 files changed

+19635
-5379
lines changed

Some content is hidden

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

676 files changed

+19635
-5379
lines changed

src/gen/.openapi-generator/COMMIT

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Requested Commit: v4.1.0
2-
Actual Commit: 59c4e381d1f96cbc5acda68f9d3853f28c85fa54
1+
Requested Commit: v4.2.3
2+
Actual Commit: 26ace1337d42638e2f3c3727d3438666a6886b31

src/gen/.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.1.0
1+
4.2.3
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ae5b752dc9ffc1f061bdabf702220d44f11ae5e788f545708eb387e533aa0984
1+
de851c0d8c4c496da7e2d31a2e3f7182cdcc3644fc67cdebe7f37f45b8062872

src/gen/api/admissionregistrationApi.ts

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Kubernetes
33
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
44
*
5-
* The version of the OpenAPI document: v1.15.5
5+
* The version of the OpenAPI document: v1.15.10
66
*
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -16,8 +16,10 @@ import http = require('http');
1616
/* tslint:disable:no-unused-locals */
1717
import { V1APIGroup } from '../model/v1APIGroup';
1818

19-
import { ObjectSerializer, Authentication, VoidAuth } from '../model/models';
20-
import { ApiKeyAuth } from '../model/models';
19+
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
20+
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
21+
22+
import { HttpError, RequestFile } from './apis';
2123

2224
let defaultBasePath = 'http://localhost';
2325

@@ -31,14 +33,16 @@ export enum AdmissionregistrationApiApiKeys {
3133

3234
export class AdmissionregistrationApi {
3335
protected _basePath = defaultBasePath;
34-
protected defaultHeaders : any = {};
36+
protected _defaultHeaders : any = {};
3537
protected _useQuerystring : boolean = false;
3638

3739
protected authentications = {
3840
'default': <Authentication>new VoidAuth(),
3941
'BearerToken': new ApiKeyAuth('header', 'authorization'),
4042
}
4143

44+
protected interceptors: Interceptor[] = [];
45+
4246
constructor(basePath?: string);
4347
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
4448
if (password) {
@@ -60,6 +64,14 @@ export class AdmissionregistrationApi {
6064
this._basePath = basePath;
6165
}
6266

67+
set defaultHeaders(defaultHeaders: any) {
68+
this._defaultHeaders = defaultHeaders;
69+
}
70+
71+
get defaultHeaders() {
72+
return this._defaultHeaders;
73+
}
74+
6375
get basePath() {
6476
return this._basePath;
6577
}
@@ -72,13 +84,24 @@ export class AdmissionregistrationApi {
7284
(this.authentications as any)[AdmissionregistrationApiApiKeys[key]].apiKey = value;
7385
}
7486

87+
public addInterceptor(interceptor: Interceptor) {
88+
this.interceptors.push(interceptor);
89+
}
90+
7591
/**
7692
* get information of a group
7793
*/
7894
public async getAPIGroup (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: V1APIGroup; }> {
7995
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/';
8096
let localVarQueryParameters: any = {};
81-
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
97+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
98+
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
99+
// give precedence to 'application/json'
100+
if (produces.indexOf('application/json') >= 0) {
101+
localVarHeaderParams.Accept = 'application/json';
102+
} else {
103+
localVarHeaderParams.Accept = produces.join(',');
104+
}
82105
let localVarFormParams: any = {};
83106

84107
(<any>Object).assign(localVarHeaderParams, options.headers);
@@ -95,10 +118,17 @@ export class AdmissionregistrationApi {
95118
};
96119

97120
let authenticationPromise = Promise.resolve();
98-
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
99-
121+
if (this.authentications.BearerToken.apiKey) {
122+
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
123+
}
100124
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
101-
return authenticationPromise.then(() => {
125+
126+
let interceptorPromise = authenticationPromise;
127+
for (const interceptor of this.interceptors) {
128+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
129+
}
130+
131+
return interceptorPromise.then(() => {
102132
if (Object.keys(localVarFormParams).length) {
103133
if (localVarUseFormData) {
104134
(<any>localVarRequestOptions).formData = localVarFormParams;
@@ -115,7 +145,7 @@ export class AdmissionregistrationApi {
115145
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
116146
resolve({ response: response, body: body });
117147
} else {
118-
reject({ response: response, body: body });
148+
reject(new HttpError(response, body, response.statusCode));
119149
}
120150
}
121151
});

0 commit comments

Comments
 (0)