fix(connector): declare operator settings in Describe
The contract has carried a settings list since the schema was added, but the SDK never filled it, so a host received an empty declaration: every setting an operator entered was refused as one the extension doesn't declare, and a connector that needs any setting could not start at all. Host, Telegram and Semaphore now declare the keys they already read.
This commit is contained in:
5 files changed
+24
-3
No files matched your search
@@ -28,6 +28,9 @@ type Description struct {
|
||||
Actions []*connectorv1.ActionType
|
||||
Lookups []*connectorv1.LookupType
|
||||
Deliveries []*connectorv1.DeliveryType
|
||||
// Settings are the operator values the connector reads, which the host
|
||||
// renders as a form and refuses anything outside.
|
||||
Settings []*connectorv1.Setting
|
||||
}
|
||||
|
||||
// NoPrivilegedEffects declares a lookup or action that changes no privileges
|
||||
|
||||
@@ -46,7 +46,7 @@ func (s *server) Describe(context.Context, *connectorv1.DescribeRequest) (*conne
|
||||
_, links := c.(Linker)
|
||||
return &connectorv1.DescribeResponse{
|
||||
Contract: Contract, Events: d.Events, Actions: d.Actions, Lookups: d.Lookups,
|
||||
Deliveries: d.Deliveries, Listens: listens, LinksAccounts: links,
|
||||
Deliveries: d.Deliveries, Settings: d.Settings, Listens: listens, LinksAccounts: links,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user