Skip to content

Commit f708f3d

Browse files
Merge master into datadog-api-spec/test/rberger/SYA-1153/synthetics-required-fields
2 parents 5de12e2 + a063366 commit f708f3d

File tree

65 files changed

+2391
-308
lines changed

Some content is hidden

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

65 files changed

+2391
-308
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.5.1.dev2",
7-
"regenerated": "2022-01-13 12:57:54.756060",
8-
"spec_repo_commit": "1ae19d0"
7+
"regenerated": "2022-01-17 16:31:46.250333",
8+
"spec_repo_commit": "9f83d50"
99
},
1010
"v2": {
1111
"apigentools_version": "1.5.1.dev2",
12-
"regenerated": "2022-01-13 12:57:54.780238",
13-
"spec_repo_commit": "1ae19d0"
12+
"regenerated": "2022-01-17 16:31:46.277137",
13+
"spec_repo_commit": "9f83d50"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10107,20 +10107,122 @@ components:
1010710107
- NETWORK_HOP
1010810108
- RECEIVED_MESSAGE
1010910109
SyntheticsBasicAuth:
10110+
description: Object to handle basic authentication when performing the test.
10111+
oneOf:
10112+
- $ref: '#/components/schemas/SyntheticsBasicAuthWeb'
10113+
- $ref: '#/components/schemas/SyntheticsBasicAuthSigv4'
10114+
- $ref: '#/components/schemas/SyntheticsBasicAuthNTLM'
10115+
type: object
10116+
SyntheticsBasicAuthNTLM:
10117+
description: Object to handle `NTLM` authentication when performing the test.
10118+
properties:
10119+
domain:
10120+
description: Domain for the authentication to use when performing the test.
10121+
example: DOMAINNAME
10122+
type: string
10123+
password:
10124+
description: Password for the authentication to use when performing the
10125+
test.
10126+
example: examplepassword
10127+
type: string
10128+
type:
10129+
$ref: '#/components/schemas/SyntheticsBasicAuthNTLMType'
10130+
username:
10131+
description: Username for the authentication to use when performing the
10132+
test.
10133+
example: joedoe
10134+
type: string
10135+
workstation:
10136+
description: Workstation for the authentication to use when performing the
10137+
test.
10138+
example: ''
10139+
type: string
10140+
required:
10141+
- type
10142+
type: object
10143+
SyntheticsBasicAuthNTLMType:
10144+
default: ntlm
10145+
description: The type of authentication to use when performing the test.
10146+
enum:
10147+
- ntlm
10148+
example: ntlm
10149+
type: string
10150+
x-enum-varnames:
10151+
- NTLM
10152+
SyntheticsBasicAuthSigv4:
10153+
description: Object to handle `SIGV4` authentication when performing the test.
10154+
properties:
10155+
accessKey:
10156+
description: Access key for the `SIGV4` authentication.
10157+
example: AKIAIOSFODNN7EXAMPLE
10158+
type: string
10159+
region:
10160+
description: Region for the `SIGV4` authentication.
10161+
example: us-east-1
10162+
type: string
10163+
secretKey:
10164+
description: Secret key for the `SIGV4` authentication.
10165+
example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY
10166+
type: string
10167+
serviceName:
10168+
description: Service name for the `SIGV4` authentication.
10169+
example: execute-api
10170+
type: string
10171+
sessionToken:
10172+
description: Session token for the `SIGV4` authentication.
10173+
example: 'AQoEXAMPLEH4aoAH0gNCAPyJxz4BlCFFxWNE1OPTgk5TthT+FvwqnKwRcOIfrRh3c/L
10174+
10175+
To6UDdyJwOOvEVPvLXCrrrUtdnniCEXAMPLE/IvU1dYUg2RVAJBanLiHb4IgRmpRV3z
10176+
10177+
rkuWJOgQs8IZZaIv2BXIa2R4OlgkBN9bkUDNCJiBeb/AXlzBBko7b15fjrBs2+cTQtp
10178+
10179+
Z3CYWFXG8C5zqx37wnOE49mRl/+OtkIKGO7fAE
10180+
10181+
'
10182+
type: string
10183+
type:
10184+
$ref: '#/components/schemas/SyntheticsBasicAuthSigv4Type'
10185+
required:
10186+
- accessKey
10187+
- secretKey
10188+
- type
10189+
type: object
10190+
SyntheticsBasicAuthSigv4Type:
10191+
default: sigv4
10192+
description: The type of authentication to use when performing the test.
10193+
enum:
10194+
- sigv4
10195+
example: sigv4
10196+
type: string
10197+
x-enum-varnames:
10198+
- SIGV4
10199+
SyntheticsBasicAuthWeb:
1011010200
description: Object to handle basic authentication when performing the test.
1011110201
properties:
1011210202
password:
1011310203
description: Password to use for the basic authentication.
1011410204
example: ''
1011510205
type: string
10206+
type:
10207+
$ref: '#/components/schemas/SyntheticsBasicAuthWebType'
1011610208
username:
1011710209
description: Username to use for the basic authentication.
1011810210
example: ''
1011910211
type: string
1012010212
required:
1012110213
- password
1012210214
- username
10215+
- type
1012310216
type: object
10217+
SyntheticsBasicAuthWebType:
10218+
default: web
10219+
description: The type of basic authentication to use when performing the test.
10220+
enum:
10221+
- web
10222+
example: web
10223+
type: string
10224+
x-enum-varnames:
10225+
- WEB
1012410226
SyntheticsBatchDetails:
1012510227
description: Details about a batch response.
1012610228
properties:
@@ -11583,6 +11685,8 @@ components:
1158311685
description: Port to use when performing the test.
1158411686
format: int64
1158511687
type: integer
11688+
proxy:
11689+
$ref: '#/components/schemas/SyntheticsTestRequestProxy'
1158611690
query:
1158711691
description: Query to use for the test.
1158811692
type: object
@@ -11628,6 +11732,18 @@ components:
1162811732
description: Date of update of the certificate or key, ISO format.
1162911733
type: string
1163011734
type: object
11735+
SyntheticsTestRequestProxy:
11736+
description: The proxy to perform the test.
11737+
properties:
11738+
headers:
11739+
$ref: '#/components/schemas/SyntheticsTestHeaders'
11740+
url:
11741+
description: URL of the proxy to perform the test.
11742+
example: https://example.com
11743+
type: string
11744+
required:
11745+
- url
11746+
type: object
1163111747
SyntheticsTiming:
1163211748
description: 'Object containing all metrics and their values collected for a
1163311749
Synthetic API test.

.generator/schemas/v2/openapi.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ components:
798798
data:
799799
description: A list of Agent rules objects.
800800
items:
801-
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleAttributes'
801+
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleData'
802802
type: array
803803
type: object
804804
ContentEncoding:
@@ -8689,6 +8689,7 @@ paths:
86898689
summary: Get the latest Cloud Workload Security policy
86908690
tags:
86918691
- Cloud Workload Security
8692+
x-menu-order: 1
86928693
x-undo:
86938694
type: safe
86948695
/api/v2/security_monitoring/cloud_workload_security/agent_rules:
@@ -8714,6 +8715,7 @@ paths:
87148715
summary: Get all Cloud Workload Security Agent rules
87158716
tags:
87168717
- Cloud Workload Security
8718+
x-menu-order: 3
87178719
x-undo:
87188720
type: safe
87198721
post:
@@ -8759,6 +8761,7 @@ paths:
87598761
\"My Agent rule\",\n \"expression\": \"exec.file.name == \\\"sh\\\"\",\n
87608762
\ \"enabled\": true\n }\n }\n}"
87618763
step: there is a valid "agent_rule" in the system
8764+
x-menu-order: 4
87628765
x-undo:
87638766
operationId: DeleteCloudWorkloadSecurityAgentRule
87648767
parameters:
@@ -8788,6 +8791,7 @@ paths:
87888791
summary: Delete a Cloud Workload Security Agent rule
87898792
tags:
87908793
- Cloud Workload Security
8794+
x-menu-order: 6
87918795
x-undo:
87928796
type: idempotent
87938797
get:
@@ -8816,6 +8820,7 @@ paths:
88168820
summary: Get a Cloud Workload Security Agent rule
88178821
tags:
88188822
- Cloud Workload Security
8823+
x-menu-order: 2
88198824
x-undo:
88208825
type: safe
88218826
patch:
@@ -8858,6 +8863,7 @@ paths:
88588863
tags:
88598864
- Cloud Workload Security
88608865
x-codegen-request-body-name: body
8866+
x-menu-order: 5
88618867
x-undo:
88628868
type: idempotent
88638869
/api/v2/security_monitoring/configuration/security_filters:

.generator/templates/client.mustache

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ func parameterToString(obj interface{}, collectionFormat string) string {
156156
if reflect.TypeOf(obj).Kind() == reflect.Slice {
157157
return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]")
158158
} else if t, ok := obj.(time.Time); ok {
159-
return t.Format(time.RFC3339)
159+
if t.Nanosecond() == 0 {
160+
return t.Format("2006-01-02T15:04:05Z07:00")
161+
}
162+
return t.Format("2006-01-02T15:04:05.000Z07:00")
160163
}
161164

162165
return fmt.Sprintf("%v", obj)

.github/workflows/test.yml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Run Tests
22

3+
env:
4+
GIT_AUTHOR_EMAIL: "[email protected]"
5+
GIT_AUTHOR_NAME: "ci.datadog-api-spec"
6+
37
on:
48
pull_request:
59
branches:
@@ -12,10 +16,22 @@ concurrency:
1216
jobs:
1317
pre-commit:
1418
runs-on: ubuntu-latest
15-
if: false == startsWith(github.event.pull_request.head.ref, 'datadog-api-spec/generated/')
19+
if: >
20+
github.event.pull_request.draft == false &&
21+
!contains(github.event.pull_request.labels.*.name, 'ci/skip') &&
22+
!contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')
1623
steps:
17-
- uses: actions/checkout@v1
18-
- uses: actions/setup-python@v1
24+
- name: Get GitHub App token
25+
id: get_token
26+
uses: tibdex/[email protected]
27+
with:
28+
app_id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
29+
private_key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
30+
- uses: actions/checkout@v2
31+
with:
32+
fetch-depth: 0
33+
ref: ${{ github.event.pull_request.head.sha }}
34+
token: ${{ steps.get_token.outputs.token }}
1935
- name: Install pre-commit
2036
run: python -m pip install pre-commit
2137
- name: set PY
@@ -24,8 +40,20 @@ jobs:
2440
with:
2541
path: ~/.cache/pre-commit
2642
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
27-
- name: Run pre-commit
28-
run: pre-commit run --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }} --show-diff-on-failure --color=always
43+
- id: pre_commit
44+
name: Run pre-commit
45+
if: github.event.action != 'closed' && github.event.pull_request.merged != true
46+
run: |
47+
pre-commit run --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }} --show-diff-on-failure --color=always
48+
- name: Commit changes
49+
if: ${{ failure() }}
50+
run: |-
51+
git add -A
52+
git config user.name "${GIT_AUTHOR_NAME}"
53+
git config user.email "${GIT_AUTHOR_EMAIL}"
54+
git commit -m "pre-commit fixes"
55+
git push origin HEAD:${{ github.event.pull_request.head.ref }}
56+
exit 1
2957
3058
test:
3159
strategy:

.pre-commit-config.yaml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
11
repos:
22
- repo: local
33
hooks:
4-
- id: generated
5-
name: Do not commit generated files
6-
language: fail
7-
entry: Unstage generated files with 'git reset --' command
8-
files: '^api/.*(?<!\_test.go)$'
9-
verbose: true
10-
- id: generated-features
11-
name: Do not commit generated feature files
12-
language: fail
13-
entry: Unstage generated files with 'git reset --' command
14-
files: "^tests/scenarios/features/v[1-9][0-9]*/.*.feature$"
15-
verbose: true
164
- id: generate
175
name: Generate
186
language: node
197
entry: make
20-
files: "^.generator/.*"
8+
files: '^(\.generator/.*|\.pre-commit-config\.yaml|Makefile)'
219
pass_filenames: false
2210
- id: lint
2311
name: Lint

api/v1/datadog/.openapi-generator/FILES

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,12 @@ docs/SyntheticsAssertionOperator.md
477477
docs/SyntheticsAssertionTarget.md
478478
docs/SyntheticsAssertionType.md
479479
docs/SyntheticsBasicAuth.md
480+
docs/SyntheticsBasicAuthNTLM.md
481+
docs/SyntheticsBasicAuthNTLMType.md
482+
docs/SyntheticsBasicAuthSigv4.md
483+
docs/SyntheticsBasicAuthSigv4Type.md
484+
docs/SyntheticsBasicAuthWeb.md
485+
docs/SyntheticsBasicAuthWebType.md
480486
docs/SyntheticsBatchDetails.md
481487
docs/SyntheticsBatchDetailsData.md
482488
docs/SyntheticsBatchResult.md
@@ -551,6 +557,7 @@ docs/SyntheticsTestProcessStatus.md
551557
docs/SyntheticsTestRequest.md
552558
docs/SyntheticsTestRequestCertificate.md
553559
docs/SyntheticsTestRequestCertificateItem.md
560+
docs/SyntheticsTestRequestProxy.md
554561
docs/SyntheticsTiming.md
555562
docs/SyntheticsTriggerBody.md
556563
docs/SyntheticsTriggerCITestLocation.md
@@ -1144,6 +1151,12 @@ model_synthetics_assertion_operator.go
11441151
model_synthetics_assertion_target.go
11451152
model_synthetics_assertion_type.go
11461153
model_synthetics_basic_auth.go
1154+
model_synthetics_basic_auth_ntlm.go
1155+
model_synthetics_basic_auth_ntlm_type.go
1156+
model_synthetics_basic_auth_sigv4.go
1157+
model_synthetics_basic_auth_sigv4_type.go
1158+
model_synthetics_basic_auth_web.go
1159+
model_synthetics_basic_auth_web_type.go
11471160
model_synthetics_batch_details.go
11481161
model_synthetics_batch_details_data.go
11491162
model_synthetics_batch_result.go
@@ -1218,6 +1231,7 @@ model_synthetics_test_process_status.go
12181231
model_synthetics_test_request.go
12191232
model_synthetics_test_request_certificate.go
12201233
model_synthetics_test_request_certificate_item.go
1234+
model_synthetics_test_request_proxy.go
12211235
model_synthetics_timing.go
12221236
model_synthetics_trigger_body.go
12231237
model_synthetics_trigger_ci_test_location.go

api/v1/datadog/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,12 @@ All URIs are relative to *https://api.datadoghq.com*
710710
- [SyntheticsAssertionTarget](docs/SyntheticsAssertionTarget.md)
711711
- [SyntheticsAssertionType](docs/SyntheticsAssertionType.md)
712712
- [SyntheticsBasicAuth](docs/SyntheticsBasicAuth.md)
713+
- [SyntheticsBasicAuthNTLM](docs/SyntheticsBasicAuthNTLM.md)
714+
- [SyntheticsBasicAuthNTLMType](docs/SyntheticsBasicAuthNTLMType.md)
715+
- [SyntheticsBasicAuthSigv4](docs/SyntheticsBasicAuthSigv4.md)
716+
- [SyntheticsBasicAuthSigv4Type](docs/SyntheticsBasicAuthSigv4Type.md)
717+
- [SyntheticsBasicAuthWeb](docs/SyntheticsBasicAuthWeb.md)
718+
- [SyntheticsBasicAuthWebType](docs/SyntheticsBasicAuthWebType.md)
713719
- [SyntheticsBatchDetails](docs/SyntheticsBatchDetails.md)
714720
- [SyntheticsBatchDetailsData](docs/SyntheticsBatchDetailsData.md)
715721
- [SyntheticsBatchResult](docs/SyntheticsBatchResult.md)
@@ -784,6 +790,7 @@ All URIs are relative to *https://api.datadoghq.com*
784790
- [SyntheticsTestRequest](docs/SyntheticsTestRequest.md)
785791
- [SyntheticsTestRequestCertificate](docs/SyntheticsTestRequestCertificate.md)
786792
- [SyntheticsTestRequestCertificateItem](docs/SyntheticsTestRequestCertificateItem.md)
793+
- [SyntheticsTestRequestProxy](docs/SyntheticsTestRequestProxy.md)
787794
- [SyntheticsTiming](docs/SyntheticsTiming.md)
788795
- [SyntheticsTriggerBody](docs/SyntheticsTriggerBody.md)
789796
- [SyntheticsTriggerCITestLocation](docs/SyntheticsTriggerCITestLocation.md)

api/v1/datadog/client.go

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)