Skip to content

Commit 1448e8a

Browse files
authored
Migrate account_config.json to oneof-discriminated schema (DataDog#23861)
Rewrites legacy flat-format account_config.json files to the oneof-discriminated shape: the type discriminator becomes the field name (e.g. "type": "text" -> "text": {...}), type-specific config nests under it, and zero-valued placeholders like "pattern": null are dropped. Touches: - klaviyo - ringcentral
1 parent 0bfcb5a commit 1448e8a

2 files changed

Lines changed: 57 additions & 69 deletions

File tree

klaviyo/assets/account_config.json

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
2-
"supported_auth_methods": [
3-
{
4-
"auth_name": "oauth",
5-
"auth_method": "oauth2_authorization_code",
6-
"fields": [],
2+
"supported_auth_methods": [
3+
{
4+
"auth_name": "oauth",
5+
"oauth2_authorization_code": {
76
"authorization_server": {
87
"authorization_endpoint": "https://www.klaviyo.com/oauth/authorize"
98
},
@@ -17,17 +16,14 @@
1716
"pkce": "required"
1817
}
1918
}
20-
],
21-
"additional_config_fields": [
22-
{
23-
"type": "tags",
24-
"key": "tags",
25-
"label": "Tags",
26-
"help": "",
27-
"editable": true,
28-
"required": false
29-
}
30-
],
31-
"dataflow_config": []
32-
}
33-
19+
}
20+
],
21+
"additional_config_fields": [
22+
{
23+
"key": "tags",
24+
"label": "Tags",
25+
"editable": true,
26+
"tags": {}
27+
}
28+
]
29+
}
Lines changed: 42 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
2-
"supported_auth_methods": [
3-
{
4-
"auth_name": "oauth",
5-
"auth_method": "oauth2_authorization_code",
6-
"fields": [],
2+
"supported_auth_methods": [
3+
{
4+
"auth_name": "oauth",
5+
"oauth2_authorization_code": {
76
"authorization_server": {
87
"authorization_endpoint": "https://platform.ringcentral.com/restapi/oauth/authorize"
98
},
@@ -18,53 +17,46 @@
1817
"pkce": "required"
1918
}
2019
}
21-
],
22-
"additional_config_fields": [
23-
{
24-
"type": "tags",
25-
"key": "tags",
26-
"label": "Tags",
27-
"help": "",
28-
"editable": true,
29-
"required": false
30-
},
31-
{
32-
"type": "checkbox",
33-
"key": "get_voice_calls",
34-
"label": "Voice calls",
35-
"help": "",
36-
"editable": true,
37-
"required": false,
20+
}
21+
],
22+
"additional_config_fields": [
23+
{
24+
"key": "tags",
25+
"label": "Tags",
26+
"editable": true,
27+
"tags": {}
28+
},
29+
{
30+
"key": "get_voice_calls",
31+
"label": "Voice calls",
32+
"editable": true,
33+
"checkbox": {
3834
"default": true
39-
},
40-
{
41-
"type": "checkbox",
42-
"key": "get_audit_logs",
43-
"label": "Audit logs",
44-
"help": "",
45-
"editable": true,
46-
"required": false,
35+
}
36+
},
37+
{
38+
"key": "get_audit_logs",
39+
"label": "Audit logs",
40+
"editable": true,
41+
"checkbox": {
4742
"default": true
48-
},
49-
{
50-
"type": "checkbox",
51-
"key": "get_analytics_metrics",
52-
"label": "Analytics metrics",
53-
"help": "",
54-
"editable": true,
55-
"required": false,
43+
}
44+
},
45+
{
46+
"key": "get_analytics_metrics",
47+
"label": "Analytics metrics",
48+
"editable": true,
49+
"checkbox": {
5650
"default": true
57-
},
58-
{
59-
"type": "checkbox",
60-
"key": "get_message_metrics",
61-
"label": "SMS metrics",
62-
"help": "",
63-
"editable": true,
64-
"required": false,
51+
}
52+
},
53+
{
54+
"key": "get_message_metrics",
55+
"label": "SMS metrics",
56+
"editable": true,
57+
"checkbox": {
6558
"default": true
6659
}
67-
],
68-
"dataflow_config": []
69-
}
70-
60+
}
61+
]
62+
}

0 commit comments

Comments
 (0)