Skip to content

Commit 7d880bf

Browse files
author
Tom Reitz
committed
bugfix
1 parent fb5ecab commit 7d880bf

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lightbeam/validate.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@ class Validator:
3030
def __init__(self, lightbeam=None):
3131
self.lightbeam = lightbeam
3232
self.logger = self.lightbeam.logger
33+
34+
# Validates (selected) endpoints
35+
def validate(self):
36+
# The below should go in __init__(), but rely on lightbeam.config which is not yet available there.
3337
self.fail_fast_threshold = self.lightbeam.config.get("validate",{}).get("references",{}).get("max_failures", DEFAULT_FAIL_FAST_THRESHOLD)
3438
self.validation_methods = self.lightbeam.config.get("validate",{}).get("methods",self.DEFAULT_VALIDATION_METHODS)
3539
if type(validation_methods)==str and (validation_methods=="*" or validation_methods.lower()=='all'):
3640
validation_methods = self.DEFAULT_VALIDATION_METHODS
3741
validation_methods.append("references")
3842

39-
# Validates (selected) endpoints
40-
def validate(self):
4143
self.lightbeam.api.load_swagger_docs()
4244
self.logger.info(f"validating by methods {self.validation_methods}...")
4345
if "descriptors" in self.validation_methods:

0 commit comments

Comments
 (0)