Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(devops): define ComponentSlotItemExtra in Slot #151

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions devops/model/canvas.go
Original file line number Diff line number Diff line change
@@ -194,7 +194,10 @@ type ComponentSchema struct {
OutputType *JsonSchema `json:"output_type,omitempty"`
Method string `json:"method,omitempty"` // component initialization generates the corresponding function name (official components support cloning creation, custom components only support referencing existing components)

Slots []Slot `json:"slots,omitempty"`
Slots []*Slot `json:"slots,omitempty"`
SlotExtraDesc []*SlotExtraDesc `json:"slot_extra_desc,omitempty"`
// SlotCounter return the historical count of the slot.
SlotCounter int `json:"slot_counter,omitempty"`

Config *ConfigSchema `json:"config,omitempty"`
ExtraProperty *ExtraPropertySchema `json:"extra_property,omitempty"`
@@ -203,6 +206,10 @@ type ComponentSchema struct {
Version string `json:"version"`
}

type SlotExtraDesc struct {
Index int `json:"index"`
}

type ConfigSchema struct {
Description string `json:"description"`
Schema *JsonSchema `json:"schema"`
@@ -214,14 +221,21 @@ type ExtraPropertySchema struct {
ExtraPropertyInput string `json:"extra_property_input"`
}

type ComponentSlotItemExtra struct {
Index int `json:"index"`
}

type Slot struct {
Component string `json:"component"`

// The path of the configuration field.
// for example: if there is no nesting, it means Field, if there is a nested structure, it means Field.NestField.
FieldLocPath string `json:"field_loc_path"`
Multiple bool `json:"multiple"`
Required bool `json:"required"`
ComponentItems []ComponentSchema `json:"component_items"`
GoDefinition *GoDefinition `json:"go_definition,omitempty"`
FieldLocPath string `json:"field_loc_path"`
Multiple bool `json:"multiple"`
Required bool `json:"required"`
ComponentItems []*ComponentSchema `json:"component_items"`
ComponentSlotItemExtra []*ComponentSlotItemExtra `json:"component_slot_item_extra"`
// ItemCounter return the historical count of the item.
ItemCounter int `json:"itemCounter,omitempty"`
GoDefinition *GoDefinition `json:"go_definition,omitempty"`
}