Skip to content

Commit

Permalink
Merge pull request #651 from overmindtech/remove-json-command
Browse files Browse the repository at this point in the history
Remove JSON command
  • Loading branch information
dylanratcliffe authored Oct 14, 2024
2 parents 6242e2a + 76e924a commit 12f3121
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"github.com/google/uuid"
"github.com/nats-io/jwt/v2"
"github.com/nats-io/nkeys"
"github.com/overmindtech/aws-source/adapters"
"github.com/overmindtech/aws-source/proc"
"github.com/overmindtech/aws-source/tracing"
"github.com/overmindtech/discovery"
Expand Down Expand Up @@ -273,7 +272,6 @@ func Execute() {
}

func init() {
rootCmd.AddCommand(docJSONCmd)
cobra.OnInitialize(initConfig)

// Here you will define your flags and configuration settings.
Expand Down Expand Up @@ -438,16 +436,3 @@ func (t TerminationLogHook) Fire(e *log.Entry) error {

return err
}

// documentation subcommand for generating json
var docJSONCmd = &cobra.Command{
Use: "docs",
Short: "Generate JSON documentation",
Long: `Generate JSON documentation for the source`,
Run: func(cmd *cobra.Command, args []string) {
err := discovery.AdapterMetadataToJSONFile(adapters.Metadata.AllAdapterMetadata(), "docs-data")
if err != nil {
log.WithError(err).Fatal("Could not generate JSON documentation")
}
},
}

0 comments on commit 12f3121

Please sign in to comment.