Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion app/cli/cmd/attached_integration_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func newAttachedIntegrationAttachCmd() *cobra.Command {
opts, err := parseAndValidateOpts(options, item.Attachment)
if err != nil {
// Show schema table if validation fails
if err := renderSchemaTable("Available options", item.Attachment.Properties); err != nil {
if err := RenderSchemaTable("Available options", item.Attachment.Properties); err != nil {
return err
}
return err
Expand Down
12 changes: 6 additions & 6 deletions app/cli/cmd/available_integration_describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,22 @@ func availableIntegrationDescribeTableOutput(items []*action.AvailableIntegratio
}

// Schema information
if err := renderSchemaTable("Registration inputs", i.Registration.Properties); err != nil {
if err := RenderSchemaTable("Registration inputs", i.Registration.Properties); err != nil {
return err
}

if full {
if err := renderSchemaRaw("Registration JSON schema", i.Registration.Raw); err != nil {
if err := RenderSchemaRaw("Registration JSON schema", i.Registration.Raw); err != nil {
return err
}
}

if err := renderSchemaTable("Attachment inputs", i.Attachment.Properties); err != nil {
if err := RenderSchemaTable("Attachment inputs", i.Attachment.Properties); err != nil {
return err
}

if full {
if err := renderSchemaRaw("Attachment JSON schema", i.Attachment.Raw); err != nil {
if err := RenderSchemaRaw("Attachment JSON schema", i.Attachment.Raw); err != nil {
return err
}
}
Expand All @@ -93,7 +93,7 @@ func availableIntegrationDescribeTableOutput(items []*action.AvailableIntegratio
}

// render de-normalized schema format
func renderSchemaTable(tableTitle string, properties sdk.SchemaPropertiesMap) error {
func RenderSchemaTable(tableTitle string, properties sdk.SchemaPropertiesMap) error {
if len(properties) == 0 {
return nil
}
Expand Down Expand Up @@ -137,7 +137,7 @@ func renderSchemaTable(tableTitle string, properties sdk.SchemaPropertiesMap) er
}

// render raw JSON schema document
func renderSchemaRaw(tableTitle string, s string) error {
func RenderSchemaRaw(tableTitle string, s string) error {
var prettyAttachmentJSON bytes.Buffer
err := json.Indent(&prettyAttachmentJSON, []byte(s), "", " ")
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion app/cli/cmd/registered_integration_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func newRegisteredIntegrationAddCmd() *cobra.Command {
opts, err := parseAndValidateOpts(options, item.Registration)
if err != nil {
// Show schema table if validation fails
if err := renderSchemaTable("Available options", item.Registration.Properties); err != nil {
if err := RenderSchemaTable("Available options", item.Registration.Properties); err != nil {
return err
}
return err
Expand Down
Loading