Skip to content

Commit

Permalink
minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
AdheipSingh committed Dec 16, 2024
1 parent d4aa73a commit e370625
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ import (
"github.com/spf13/cobra"
)

const (
generateStaticSchemaPath = "/logstream/schema/detect"
)

var GenerateSchemaCmd = &cobra.Command{
Use: "schema",
Short: "Generate Schema for JSON",
Expand All @@ -37,7 +41,7 @@ var GenerateSchemaCmd = &cobra.Command{
client := internalHTTP.DefaultClient(&DefaultProfile)

// Create the HTTP request
req, err := client.NewRequest("POST", "/logstream/schema/detect", bytes.NewBuffer(fileContent))
req, err := client.NewRequest(http.MethodPost, generateStaticSchemaPath, bytes.NewBuffer(fileContent))
if err != nil {
return fmt.Errorf("failed to create new request: %w", err)
}
Expand Down

0 comments on commit e370625

Please sign in to comment.