Cleaned code

This commit is contained in:
2026-04-26 17:19:44 +01:00
parent 3eacc4976d
commit 5e6b03356c
57 changed files with 1578 additions and 712 deletions
+19 -9
View File
@@ -1,12 +1,12 @@
import { HttpHeaders, HttpParameterCodec } from '@angular/common/http';
import { Param } from './param';
import { OpenApiHttpParams } from './query.params';
import {HttpHeaders, HttpParameterCodec} from '@angular/common/http';
import {Param} from './param';
import {OpenApiHttpParams} from './query.params';
export interface ConfigurationParameters {
/**
* @deprecated Since 5.0. Use credentials instead
*/
apiKeys?: {[ key: string ]: string};
apiKeys?: { [key: string]: string };
username?: string;
password?: string;
/**
@@ -32,14 +32,14 @@ export interface ConfigurationParameters {
* document. They should map to the value used for authentication
* minus any standard prefixes such as 'Basic' or 'Bearer'.
*/
credentials?: {[ key: string ]: string | (() => string | undefined)};
credentials?: { [key: string]: string | (() => string | undefined) };
}
export class Configuration {
/**
* @deprecated Since 5.0. Use credentials instead
*/
apiKeys?: {[ key: string ]: string};
apiKeys?: { [key: string]: string };
username?: string;
password?: string;
/**
@@ -65,9 +65,19 @@ export class Configuration {
* document. They should map to the value used for authentication
* minus any standard prefixes such as 'Basic' or 'Bearer'.
*/
credentials: {[ key: string ]: string | (() => string | undefined)};
credentials: { [key: string]: string | (() => string | undefined) };
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
constructor({
accessToken,
apiKeys,
basePath,
credentials,
encodeParam,
encoder,
password,
username,
withCredentials
}: ConfigurationParameters = {}) {
if (apiKeys) {
this.apiKeys = apiKeys;
}
@@ -109,7 +119,7 @@ constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder,
* @param contentTypes - the array of content types that are available for selection
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
*/
public selectHeaderContentType (contentTypes: string[]): string | undefined {
public selectHeaderContentType(contentTypes: string[]): string | undefined {
if (contentTypes.length === 0) {
return undefined;
}