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

Update openapi generator v4.2.3 #418

Merged
Show file tree
Hide file tree
Changes from all 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
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions settings
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
# limitations under the License.

# kubernetes-client/gen commit to use for code generation.
export GEN_COMMIT=7959939
export GEN_COMMIT=9f439b6

# GitHub username/organization to clone kubernetes repo from.
export USERNAME=kubernetes

# Kubernetes branch to get the OpenAPI spec from.
export KUBERNETES_BRANCH="release-1.15"
# Kubernetes branch/tag to get the OpenAPI spec from.
export KUBERNETES_BRANCH="v1.15.10"

# client version for packaging and releasing. It can
# be different than SPEC_VERSION.
Expand All @@ -30,4 +30,4 @@ export CLIENT_VERSION="0.8-SNAPSHOT"
# Name of the release package
export PACKAGE_NAME="@kubernetes/node-client"

export OPENAPI_GENERATOR_COMMIT=v4.1.3
export OPENAPI_GENERATOR_COMMIT=v4.2.3
4 changes: 2 additions & 2 deletions src/gen/.openapi-generator/COMMIT
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Requested Commit: v4.1.0
Actual Commit: 59c4e381d1f96cbc5acda68f9d3853f28c85fa54
Requested Commit: v4.2.3
Actual Commit: 26ace1337d42638e2f3c3727d3438666a6886b31
2 changes: 1 addition & 1 deletion src/gen/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1.0
4.2.3
2 changes: 1 addition & 1 deletion src/gen/.openapi-generator/swagger.json.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ae5b752dc9ffc1f061bdabf702220d44f11ae5e788f545708eb387e533aa0984
de851c0d8c4c496da7e2d31a2e3f7182cdcc3644fc67cdebe7f37f45b8062872
48 changes: 39 additions & 9 deletions src/gen/api/admissionregistrationApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1.15.5
* The version of the OpenAPI document: v1.15.10
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand All @@ -16,8 +16,10 @@ import http = require('http');
/* tslint:disable:no-unused-locals */
import { V1APIGroup } from '../model/v1APIGroup';

import { ObjectSerializer, Authentication, VoidAuth } from '../model/models';
import { ApiKeyAuth } from '../model/models';
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';

import { HttpError, RequestFile } from './apis';

let defaultBasePath = 'http://localhost';

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

export class AdmissionregistrationApi {
protected _basePath = defaultBasePath;
protected defaultHeaders : any = {};
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;

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

protected interceptors: Interceptor[] = [];

constructor(basePath?: string);
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
if (password) {
Expand All @@ -60,6 +64,14 @@ export class AdmissionregistrationApi {
this._basePath = basePath;
}

set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}

get defaultHeaders() {
return this._defaultHeaders;
}

get basePath() {
return this._basePath;
}
Expand All @@ -72,13 +84,24 @@ export class AdmissionregistrationApi {
(this.authentications as any)[AdmissionregistrationApiApiKeys[key]].apiKey = value;
}

public addInterceptor(interceptor: Interceptor) {
this.interceptors.push(interceptor);
}

/**
* get information of a group
*/
public async getAPIGroup (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: V1APIGroup; }> {
const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
let localVarFormParams: any = {};

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

let authenticationPromise = Promise.resolve();
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));

if (this.authentications.BearerToken.apiKey) {
authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));
}
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
return authenticationPromise.then(() => {

let interceptorPromise = authenticationPromise;
for (const interceptor of this.interceptors) {
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
}

return interceptorPromise.then(() => {
if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
Expand All @@ -115,7 +145,7 @@ export class AdmissionregistrationApi {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
resolve({ response: response, body: body });
} else {
reject({ response: response, body: body });
reject(new HttpError(response, body, response.statusCode));
}
}
});
Expand Down
Loading