Skip to content

Commit b3b5cb9

Browse files
api-clients-generation-pipeline[bot]skarimoci.datadog-api-spec
authored
Add support for documenting auth bearer token (#2143)
* disable bearer auth * Regenerate client from commit 7a9d0200 of spec repo --------- Co-authored-by: Sherzod Karimov <sherzod.karimov@datadoghq.com> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com> Co-authored-by: skarimo <40482491+skarimo@users.noreply.github.com>
1 parent e66e6cd commit b3b5cb9

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-12-10 21:05:05.304349",
8-
"spec_repo_commit": "1c4c91d4"
7+
"regenerated": "2024-12-11 14:25:11.418805",
8+
"spec_repo_commit": "7a9d0200"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-12-10 21:05:05.323580",
13-
"spec_repo_commit": "1c4c91d4"
12+
"regenerated": "2024-12-11 14:25:11.437987",
13+
"spec_repo_commit": "7a9d0200"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23427,6 +23427,12 @@ components:
2342723427
type: apiKey
2342823428
x-auth-id-alias: appKeyAuth
2342923429
x-env-name: DD_APP_KEY
23430+
bearerAuth:
23431+
in: header
23432+
name: Authorization
23433+
scheme: bearer
23434+
type: http
23435+
x-env-name: DD_BEARER_TOKEN
2343023436
info:
2343123437
contact:
2343223438
email: support@datadoghq.com

.generator/schemas/v2/openapi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27751,6 +27751,12 @@ components:
2775127751
name: DD-APPLICATION-KEY
2775227752
type: apiKey
2775327753
x-env-name: DD_APP_KEY
27754+
bearerAuth:
27755+
in: header
27756+
name: Authorization
27757+
scheme: bearer
27758+
type: http
27759+
x-env-name: DD_BEARER_TOKEN
2775427760
info:
2775527761
contact:
2775627762
email: support@datadoghq.com

.generator/src/generator/templates/configuration.j2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ module {{ module_name }}
284284
key: 'Authorization',
285285
value: basic_auth_token
286286
},
287-
{%- elif schema.type == "http" and schema.scheme == "bearer" %}
287+
{# {%- elif schema.type == "http" and schema.scheme == "bearer" %}
288288
{{name}}:
289289
{
290290
type: 'bearer',
@@ -295,6 +295,7 @@ module {{ module_name }}
295295
key: 'Authorization',
296296
value: "Bearer #{access_token}"
297297
},
298+
#}
298299
{%- elif schema.type == "oauth2" %}
299300
{{name}}:
300301
{

0 commit comments

Comments
 (0)