Skip to content

Commit

Permalink
bundle remote flag
Browse files Browse the repository at this point in the history
  • Loading branch information
emilien-puget authored and daveshanley committed Feb 29, 2024
1 parent 28da3ee commit 4bacaf7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ import (
"bytes"
"errors"
"fmt"
"log/slog"
"os"

"github.com/pb33f/libopenapi/bundler"
"github.com/pb33f/libopenapi/datamodel"
"github.com/pterm/pterm"
"github.com/spf13/cobra"
"log/slog"
"os"
)

func GetBundleCommand() *cobra.Command {
Expand All @@ -39,6 +40,7 @@ func GetBundleCommand() *cobra.Command {
stdOut, _ := cmd.Flags().GetBool("stdout")
noStyleFlag, _ := cmd.Flags().GetBool("no-style")
baseFlag, _ := cmd.Flags().GetString("base")
remoteFlag, _ := cmd.Flags().GetBool("remote")

// disable color and styling, for CI/CD use.
// https://github.com/daveshanley/vacuum/issues/234
Expand Down Expand Up @@ -112,6 +114,7 @@ func GetBundleCommand() *cobra.Command {
BasePath: baseFlag,
ExtractRefsSequentially: true,
Logger: logger,
AllowRemoteReferences: remoteFlag,
}

bundled, err := bundler.BundleBytes(specBytes, docConfig)
Expand Down

0 comments on commit 4bacaf7

Please sign in to comment.