Skip to content

Commit f9a884b

Browse files
feat(vdp): remove ResponseComponent and merge it into TriggerByRequest (#302)
Because - The `ResponseComponent` is highly coupled with `TriggerByRequest`. We should put them together This commit - Merges `ResponseComponent` into `TriggerByRequest` message. --------- Co-authored-by: droplet-bot <[email protected]>
1 parent 90ead67 commit f9a884b

File tree

2 files changed

+62
-76
lines changed

2 files changed

+62
-76
lines changed

openapiv2/vdp/service.swagger.yaml

Lines changed: 48 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -3002,6 +3002,43 @@ definitions:
30023002
$ref: '#/definitions/v1betaRole'
30033003
description: Defines the role users will have over the resource.
30043004
description: ShareCode describes a sharing configuration through a link.
3005+
TriggerByRequestRequestField:
3006+
type: object
3007+
properties:
3008+
title:
3009+
type: string
3010+
description: Title of the field.
3011+
description:
3012+
type: string
3013+
description: Description of the field.
3014+
instill_format:
3015+
type: string
3016+
description: Instill format.
3017+
instill_ui_order:
3018+
type: integer
3019+
format: int32
3020+
description: Instill UI order.
3021+
instill_ui_multiline:
3022+
type: boolean
3023+
description: Instill UI Multiline.
3024+
description: Represents a field within the reqeuest.
3025+
TriggerByRequestResponseField:
3026+
type: object
3027+
properties:
3028+
title:
3029+
type: string
3030+
description: Title of the field.
3031+
description:
3032+
type: string
3033+
description: Description of the field.
3034+
value:
3035+
type: string
3036+
description: Value of the field.
3037+
instill_ui_order:
3038+
type: integer
3039+
format: int32
3040+
description: Instill UI order.
3041+
description: Represents a field within the response.
30053042
googlelongrunningOperation:
30063043
type: object
30073044
properties:
@@ -3289,9 +3326,6 @@ definitions:
32893326
metadata:
32903327
type: object
32913328
description: Metadata of the component.
3292-
response_component:
3293-
$ref: '#/definitions/v1betaResponseComponent'
3294-
title: ResponseComponent
32953329
connector_component:
32963330
$ref: '#/definitions/v1betaConnectorComponent'
32973331
title: ConnectorComponent
@@ -4391,37 +4425,6 @@ definitions:
43914425
$ref: '#/definitions/v1betaPipeline'
43924426
description: The renamed pipeline resource.
43934427
description: RenameUserPipelineResponse contains a renamed pipeline.
4394-
v1betaResponseComponent:
4395-
type: object
4396-
properties:
4397-
fields:
4398-
type: object
4399-
additionalProperties:
4400-
$ref: '#/definitions/v1betaResponseComponentField'
4401-
description: |-
4402-
Fields configuration.
4403-
Key: Key of the output data.
4404-
Field: Field settings of the value.
4405-
description: |-
4406-
ResponseComponent
4407-
Configures the payload format of response when triggered by a request.
4408-
v1betaResponseComponentField:
4409-
type: object
4410-
properties:
4411-
title:
4412-
type: string
4413-
description: Title of the field.
4414-
description:
4415-
type: string
4416-
description: Description of the field.
4417-
value:
4418-
type: string
4419-
description: Value of the field.
4420-
instill_ui_order:
4421-
type: integer
4422-
format: int32
4423-
description: Instill UI order.
4424-
description: Represents a field within the end component.
44254428
v1betaRestoreOrganizationPipelineReleaseResponse:
44264429
type: object
44274430
properties:
@@ -4606,37 +4609,25 @@ definitions:
46064609
v1betaTriggerByRequest:
46074610
type: object
46084611
properties:
4609-
fields:
4612+
request_fields:
46104613
type: object
46114614
additionalProperties:
4612-
$ref: '#/definitions/v1betaTriggerByRequestField'
4615+
$ref: '#/definitions/TriggerByRequestRequestField'
46134616
description: |-
4614-
Fields configuration.
4617+
Fields configuration of request.
4618+
Key: Key of the input data.
4619+
Field: Field settings of the value.
4620+
response_fields:
4621+
type: object
4622+
additionalProperties:
4623+
$ref: '#/definitions/TriggerByRequestResponseField'
4624+
description: |-
4625+
Fields configuration of response.
46154626
Key: Key of the input data.
46164627
Field: Field settings of the value.
46174628
description: |-
46184629
TriggerByRequest
46194630
Configures the payload format of request when triggered by a request.
4620-
v1betaTriggerByRequestField:
4621-
type: object
4622-
properties:
4623-
title:
4624-
type: string
4625-
description: Title of the field.
4626-
description:
4627-
type: string
4628-
description: Description of the field.
4629-
instill_format:
4630-
type: string
4631-
description: Instill format.
4632-
instill_ui_order:
4633-
type: integer
4634-
format: int32
4635-
description: Instill UI order.
4636-
instill_ui_multiline:
4637-
type: boolean
4638-
description: Instill UI Multiline.
4639-
description: Represents a field within the start component.
46404631
v1betaTriggerMetadata:
46414632
type: object
46424633
properties:

vdp/pipeline/v1beta/pipeline.proto

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ message ReadinessResponse {
4646
// TriggerByRequest
4747
// Configures the payload format of request when triggered by a request.
4848
message TriggerByRequest {
49-
// Represents a field within the start component.
50-
message Field {
49+
// Represents a field within the reqeuest.
50+
message RequestField {
5151
// Title of the field.
5252
string title = 1 [(google.api.field_behavior) = OPTIONAL];
5353
// Description of the field.
@@ -59,17 +59,8 @@ message TriggerByRequest {
5959
// Instill UI Multiline.
6060
bool instill_ui_multiline = 5 [(google.api.field_behavior) = OPTIONAL];
6161
}
62-
// Fields configuration.
63-
// Key: Key of the input data.
64-
// Field: Field settings of the value.
65-
map<string, Field> fields = 1 [(google.api.field_behavior) = OPTIONAL];
66-
}
67-
68-
// ResponseComponent
69-
// Configures the payload format of response when triggered by a request.
70-
message ResponseComponent {
71-
// Represents a field within the end component.
72-
message Field {
62+
// Represents a field within the response.
63+
message ResponseField {
7364
// Title of the field.
7465
string title = 1 [(google.api.field_behavior) = OPTIONAL];
7566
// Description of the field.
@@ -79,10 +70,16 @@ message ResponseComponent {
7970
// Instill UI order.
8071
int32 instill_ui_order = 4 [(google.api.field_behavior) = OPTIONAL];
8172
}
82-
// Fields configuration.
83-
// Key: Key of the output data.
73+
74+
// Fields configuration of request.
75+
// Key: Key of the input data.
76+
// Field: Field settings of the value.
77+
map<string, RequestField> request_fields = 1 [(google.api.field_behavior) = OPTIONAL];
78+
79+
// Fields configuration of response.
80+
// Key: Key of the input data.
8481
// Field: Field settings of the value.
85-
map<string, Field> fields = 1 [(google.api.field_behavior) = OPTIONAL];
82+
map<string, ResponseField> response_fields = 2 [(google.api.field_behavior) = OPTIONAL];
8683
}
8784

8885
// ConnectorComponent
@@ -165,11 +162,9 @@ message Component {
165162
// Metadata of the component.
166163
google.protobuf.Struct metadata = 10 [(google.api.field_behavior) = OPTIONAL];
167164
// Deleted fields
168-
reserved 11;
165+
reserved 11, 12;
169166
// The component configuration.
170167
oneof component {
171-
// ResponseComponent
172-
ResponseComponent response_component = 12;
173168
// ConnectorComponent
174169
ConnectorComponent connector_component = 13;
175170
// OperatorComponent

0 commit comments

Comments
 (0)