Documentation ¶
Index ¶
- func RulesConfigExample1() map[string]RuleConfig
- func StandardRuleNames() []string
- func ValidateRules(rules map[string]Rule) error
- type EmptyRule
- func (rule EmptyRule) Name() string
- func (rule EmptyRule) ProcessOperation(spec *oas3.Swagger, op *oas3.Operation, opPointer, path, method string) []lintutil.PolicyViolation
- func (rule EmptyRule) ProcessSpec(spec *oas3.Swagger, pointerBase string) []lintutil.PolicyViolation
- func (rule EmptyRule) Scope() string
- func (rule EmptyRule) Severity() string
- type Policy
- type PolicyConfig
- type Rule
- type RuleConfig
- type RulesMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RulesConfigExample1 ¶ added in v1.7.0
func RulesConfigExample1() map[string]RuleConfig
func StandardRuleNames ¶ added in v1.7.0
func StandardRuleNames() []string
func ValidateRules ¶
Types ¶
type EmptyRule ¶ added in v1.7.0
type EmptyRule struct{}
func (EmptyRule) ProcessOperation ¶ added in v1.7.0
func (EmptyRule) ProcessSpec ¶ added in v1.7.0
type Policy ¶
type Policy struct {
// contains filtered or unexported fields
}
func (*Policy) ValidateSpec ¶
type PolicyConfig ¶
type PolicyConfig struct {
Rules map[string]RuleConfig `json:"rules,omitempty"`
}
func NewPolicyConfigFile ¶
func NewPolicyConfigFile(filename string) (PolicyConfig, error)
func (*PolicyConfig) StandardPolicy ¶
func (cfg *PolicyConfig) StandardPolicy() (Policy, error)
type Rule ¶
type Rule interface { Name() string Scope() string Severity() string ProcessSpec(spec *oas3.Swagger, pointerBase string) []lintutil.PolicyViolation ProcessOperation(spec *oas3.Swagger, op *oas3.Operation, opPointer, path, method string) []lintutil.PolicyViolation }
func NewStandardRule ¶ added in v1.7.0
type RuleConfig ¶
type RuleConfig struct {
Severity string `json:"severity"`
}
Click to show internal directories.
Click to hide internal directories.