Skip to content

Commit

Permalink
tools/importer-rest-api-specs: adding a feature-flag to just parse an…
Browse files Browse the repository at this point in the history
…d not toggle the output
  • Loading branch information
tombuildsstuff committed Oct 11, 2021
1 parent faf91b6 commit ce35069
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/importer-rest-api-specs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ const (
outputDirectory = "../../data/"
swaggerDirectory = "../../swagger"
permissions = os.FileMode(0755)

// only useful for testing without outputting everything
justParse = false
)

// Use: `PANDORA_GEN_FOR_REALSIES=true go run main.go`
Expand Down Expand Up @@ -84,6 +87,11 @@ func run(input RunInput, swaggerGitSha string, debug bool) error {
return nil
}

if justParse {
log.Printf("✅ Service %q - Api Version %q - Parsed Fine but skipping generation", input.ServiceName, input.ApiVersion)
return nil
}

if debug {
log.Printf("[STAGE] Generating Swagger Definitions..")
}
Expand Down

0 comments on commit ce35069

Please sign in to comment.