forked from oasdiff/oasdiff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.go
21 lines (19 loc) · 931 Bytes
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package diff
// Config includes various settings to control the diff
type Config struct {
ExcludeExamples bool // whether to exclude changes to examples (included by default)
ExcludeDescription bool // whether to exclude changes to descriptions (included by default)
IncludeExtensions StringSet // which extensions to include in the diff (default is none) - see https://swagger.io/specification/#specification-extensions
PathFilter string // diff will only include paths that match this regex (optional)
PathPrefix string // a prefix that exists in first spec paths but not in second one (optional)
BreakingOnly bool // whether to calc breaking changes only
}
// NewConfig returns a default configuration
func NewConfig() *Config {
return &Config{
ExcludeExamples: false,
ExcludeDescription: false,
IncludeExtensions: StringSet{},
BreakingOnly: false,
}
}