Versions in this module Expand all Collapse all v1 v1.4.0 May 4, 2021 Changes in this version + const LocationPaths + const LocationSchemas + const PrefixPathParam + const PrefixSchemaPropertyEnum + const RuleInternalError + const RuleOpDescExist + const RuleOpIdExist + const RuleOpIdStyleCamelCase + const RuleOpParameterNameNonEmpty + const RuleOpSummaryCaseFirstCapitalized + const RuleOpSummaryExist + const RuleOpTagsCountOneOnly + const RulePathParamNameExist + const RulePathParamStyleCamelCase + const RuleSchemaObjectPropsExist + const RuleSchemaPropDescExist + const RuleSchemaPropEnumStylePascalCase + const RuleTagCaseFirstCapitalized + const SeverityDisabled + const SeverityError + const SeverityHint + const SeverityInformation + const SeverityWarning + func PointerCondense(s string) string + func PointerSubEscapeAll(format string, vars ...interface{}) string + func RuleToCaseStyle(s string) string + type Policy struct + func NewPolicySimple(rules []string) Policy + func (pol *Policy) HasPathItemRules() bool + func (pol *Policy) HasRule(rule string) bool + func (pol *Policy) HasRulePrefix(prefix string) bool + func (pol *Policy) HasSchemaEnumStyleRules() bool + func (pol *Policy) RulesWithPrefix(prefix string) []string + func (pol *Policy) Validate() error + type PolicyRule struct + Name string + StringFormat string + type PolicyViolation struct + Data map[string]string + Location string + RuleName string + RuleType string + Value string + Violation string + type PolicyViolationLocations struct + Locations []string + RuleName string + func (vl *PolicyViolationLocations) Finalize() + type PolicyViolationsSet struct + RuleName string + Violations []PolicyViolation + func NewPolicyViolationsSet(ruleName string) PolicyViolationsSet + func (set *PolicyViolationsSet) Locations() PolicyViolationLocations + type PolicyViolationsSets struct + ByRule map[string]PolicyViolationsSet + func NewPolicyViolationsSets() PolicyViolationsSets + func ParametersCheck(params oas3.Parameters, jsPointerParameters string, rules Policy) PolicyViolationsSets + func SpecCheckOperations(spec *oas3.Swagger, ruleset Policy) PolicyViolationsSets + func SpecCheckPathItems(spec *oas3.Swagger, rules Policy) PolicyViolationsSets + func SpecCheckSchemaObjectPropsExist(spec *oas3.Swagger) PolicyViolationsSets + func SpecCheckSchemaPropertyEnumCaseStyle(spec *oas3.Swagger, rule string) PolicyViolationsSets + func SpecCheckSchemas(spec *oas3.Swagger, rules Policy) PolicyViolationsSets + func SpecCheckViolations(spec *oas3.Swagger, rules Policy) (PolicyViolationsSets, error) + func (sets *PolicyViolationsSets) AddSimple(ruleName, location, value string) + func (sets *PolicyViolationsSets) LocationsByRule() ViolationLocationsByRuleSet + func (sets *PolicyViolationsSets) UpsertSet(upsertSet PolicyViolationsSet) error + func (sets *PolicyViolationsSets) UpsertSets(upsertSets PolicyViolationsSets) error + type Rule struct + Func func(spec *oas3.Swagger, ruleset Policy) PolicyViolationsSets + Name string + Severity string + type SpecCheckViolationsFunc func(spec *oas3.Swagger, rules Policy) PolicyViolationsSets + type ViolationLocationsByRuleSet struct + ViolationLocationsByRule map[string][]string + func (vlrs *ViolationLocationsByRuleSet) Condense()