Skip to content

Commit 2e5023d

Browse files
Migrate salesforce connection UI metadata to YAML (#62446)
1 parent 0157e0e commit 2e5023d

File tree

2 files changed

+115
-0
lines changed

2 files changed

+115
-0
lines changed

providers/salesforce/provider.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,88 @@ hooks:
9595
connection-types:
9696
- hook-class-name: airflow.providers.salesforce.hooks.salesforce.SalesforceHook
9797
connection-type: salesforce
98+
conn-fields:
99+
security_token:
100+
label: Security Token
101+
schema:
102+
type:
103+
- string
104+
- 'null'
105+
format: password
106+
domain:
107+
label: Domain
108+
schema:
109+
type:
110+
- string
111+
- 'null'
112+
consumer_key:
113+
label: Consumer Key
114+
schema:
115+
type:
116+
- string
117+
- 'null'
118+
consumer_secret:
119+
label: Consumer Secret
120+
schema:
121+
type:
122+
- string
123+
- 'null'
124+
format: password
125+
private_key_file_path:
126+
label: Private Key File Path
127+
schema:
128+
type:
129+
- string
130+
- 'null'
131+
format: password
132+
private_key:
133+
label: Private Key
134+
schema:
135+
type:
136+
- string
137+
- 'null'
138+
format: password
139+
organization_id:
140+
label: Organization ID
141+
schema:
142+
type:
143+
- string
144+
- 'null'
145+
instance:
146+
label: Instance
147+
schema:
148+
type:
149+
- string
150+
- 'null'
151+
instance_url:
152+
label: Instance URL
153+
schema:
154+
type:
155+
- string
156+
- 'null'
157+
proxies:
158+
label: Proxies
159+
schema:
160+
type:
161+
- string
162+
- 'null'
163+
version:
164+
label: API Version
165+
schema:
166+
type:
167+
- string
168+
- 'null'
169+
client_id:
170+
label: Client ID
171+
schema:
172+
type:
173+
- string
174+
- 'null'
175+
ui-field-behaviour:
176+
hidden-fields:
177+
- schema
178+
- port
179+
- extra
180+
- host
181+
relabeling:
182+
login: Username

providers/salesforce/src/airflow/providers/salesforce/get_provider_info.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,36 @@ def get_provider_info():
5757
{
5858
"hook-class-name": "airflow.providers.salesforce.hooks.salesforce.SalesforceHook",
5959
"connection-type": "salesforce",
60+
"conn-fields": {
61+
"security_token": {
62+
"label": "Security Token",
63+
"schema": {"type": ["string", "null"], "format": "password"},
64+
},
65+
"domain": {"label": "Domain", "schema": {"type": ["string", "null"]}},
66+
"consumer_key": {"label": "Consumer Key", "schema": {"type": ["string", "null"]}},
67+
"consumer_secret": {
68+
"label": "Consumer Secret",
69+
"schema": {"type": ["string", "null"], "format": "password"},
70+
},
71+
"private_key_file_path": {
72+
"label": "Private Key File Path",
73+
"schema": {"type": ["string", "null"], "format": "password"},
74+
},
75+
"private_key": {
76+
"label": "Private Key",
77+
"schema": {"type": ["string", "null"], "format": "password"},
78+
},
79+
"organization_id": {"label": "Organization ID", "schema": {"type": ["string", "null"]}},
80+
"instance": {"label": "Instance", "schema": {"type": ["string", "null"]}},
81+
"instance_url": {"label": "Instance URL", "schema": {"type": ["string", "null"]}},
82+
"proxies": {"label": "Proxies", "schema": {"type": ["string", "null"]}},
83+
"version": {"label": "API Version", "schema": {"type": ["string", "null"]}},
84+
"client_id": {"label": "Client ID", "schema": {"type": ["string", "null"]}},
85+
},
86+
"ui-field-behaviour": {
87+
"hidden-fields": ["schema", "port", "extra", "host"],
88+
"relabeling": {"login": "Username"},
89+
},
6090
}
6191
],
6292
}

0 commit comments

Comments
 (0)