From e7cc593f1be50e78913536ce0b9346cfd274182e Mon Sep 17 00:00:00 2001 From: quobix Date: Sat, 4 Nov 2023 17:38:59 -0400 Subject: [PATCH] moved check to happen after errors are thrown. Signed-off-by: quobix --- motor/rule_applicator.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/motor/rule_applicator.go b/motor/rule_applicator.go index a62327f8..277d0e1a 100644 --- a/motor/rule_applicator.go +++ b/motor/rule_applicator.go @@ -138,13 +138,14 @@ func ApplyRulesToRuleSet(execution *RuleSetExecution) *RuleSetExecutionResult { docResolved, err = libopenapi.NewDocumentWithConfiguration(execution.Spec, docConfig) docUnresolved, _ = libopenapi.NewDocumentWithConfiguration(execution.Spec, docConfig) - specInfo = docResolved.GetSpecInfo() - indexConfig.SpecInfo = specInfo - if err != nil { // Done here, we can't do anything else. return &RuleSetExecutionResult{Errors: []error{err}} } + + specInfo = docResolved.GetSpecInfo() + indexConfig.SpecInfo = specInfo + } else { suppliedDocConfig := docResolved.GetConfiguration() docConfig.BaseURL = suppliedDocConfig.BaseURL