Skip to content

Commit faadb09

Browse files
author
ci.datadog-api-spec
committed
pre-commit fixes
1 parent 4f1e58d commit faadb09

8,664 files changed

Lines changed: 274515 additions & 405165 deletions

File tree

Some content is hidden

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

packages/datadog-api-client-common/auth.ts

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -82,62 +82,52 @@ export class AppKeyAuthAuthentication implements SecurityAuthentication {
8282
}
8383

8484
export type AuthMethods = {
85-
"AuthZ"?: SecurityAuthentication,
86-
"apiKeyAuth"?: SecurityAuthentication,
87-
"appKeyAuth"?: SecurityAuthentication
88-
}
85+
AuthZ?: SecurityAuthentication;
86+
apiKeyAuth?: SecurityAuthentication;
87+
appKeyAuth?: SecurityAuthentication;
88+
};
8989

9090
export type ApiKeyConfiguration = string;
91-
export type HttpBasicConfiguration = { "username": string, "password": string };
91+
export type HttpBasicConfiguration = { username: string; password: string };
9292
export type HttpBearerConfiguration = { tokenProvider: TokenProvider };
9393
export type OAuth2Configuration = { accessToken: string };
9494

9595
export type AuthMethodsConfiguration = {
96-
"AuthZ"?: OAuth2Configuration,
97-
"apiKeyAuth"?: ApiKeyConfiguration,
98-
"appKeyAuth"?: ApiKeyConfiguration
99-
}
96+
AuthZ?: OAuth2Configuration;
97+
apiKeyAuth?: ApiKeyConfiguration;
98+
appKeyAuth?: ApiKeyConfiguration;
99+
};
100100

101101
/**
102102
* Creates the authentication methods from a swagger description.
103103
*
104104
*/
105-
export function configureAuthMethods(config: AuthMethodsConfiguration | undefined): AuthMethods {
106-
let authMethods: AuthMethods = {}
105+
export function configureAuthMethods(
106+
config: AuthMethodsConfiguration | undefined
107+
): AuthMethods {
108+
const authMethods: AuthMethods = {};
107109

108110
if (!config) {
109111
return authMethods;
110112
}
111113

112114
if (config["AuthZ"]) {
113115
authMethods["AuthZ"] = new AuthZAuthentication(
114-
115-
116-
117-
118116
config["AuthZ"]["accessToken"]
119117
);
120118
}
121119

122120
if (config["apiKeyAuth"]) {
123121
authMethods["apiKeyAuth"] = new ApiKeyAuthAuthentication(
124-
125122
config["apiKeyAuth"]
126-
127-
128-
129123
);
130124
}
131125

132126
if (config["appKeyAuth"]) {
133127
authMethods["appKeyAuth"] = new AppKeyAuthAuthentication(
134-
135128
config["appKeyAuth"]
136-
137-
138-
139129
);
140130
}
141131

142132
return authMethods;
143-
}
133+
}

packages/datadog-api-client-common/baseapi.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@ export class BaseAPIRequestFactory {
2727
* @extends {Error}
2828
*/
2929
export class RequiredError extends Error {
30-
constructor(public field: string, operation: string) {
31-
super(`Required parameter ${field} was null or undefined when calling ${operation}.`);
30+
constructor(
31+
public field: string,
32+
operation: string
33+
) {
34+
super(
35+
`Required parameter ${field} was null or undefined when calling ${operation}.`
36+
);
3237
this.name = "RequiredError";
3338
}
34-
}
39+
}

0 commit comments

Comments
 (0)