Skip to content

Commit bcec891

Browse files
author
Tom Reitz
committed
updates per review from John
1 parent 6a66d37 commit bcec891

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,6 @@ validate:
145145
- references # checks that references resolve, either locally or in the remote API
146146
# or
147147
# methods: "*"
148-
# or
149-
# methods: ALL
150148
```
151149
Default `validate`.`methods` are `["schema", "descriptors", "uniqueness"]` (not `references`; see below). In addition to the above methods, `lighteam validate` will also (first) check that each payload is valid JSON.
152150

lightbeam/validate.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(self, lightbeam=None):
3434
def validate(self):
3535
self.lightbeam.api.load_swagger_docs()
3636
validation_methods = self.lightbeam.config.get("validate",{}).get("methods",self.DEFAULT_VALIDATION_METHODS)
37-
if type(validation_methods)==str and (validation_methods=="*" or validation_methods.lower()=='all'):
37+
if type(validation_methods)==str and validation_methods=="*":
3838
validation_methods = self.DEFAULT_VALIDATION_METHODS
3939
validation_methods.append("references")
4040
self.logger.info(f"validating by methods {validation_methods}...")
@@ -58,7 +58,7 @@ def validate(self):
5858
# might resolve references from within payloads of this endpoint.
5959
# We assume that the data fits in memory; the largest Ed-Fi endpoints
6060
# (studentSectionAssociations, studentSchoolAttendanceEvents, etc.) contain references
61-
# to comparatively datasets (sections, schools, students).
61+
# to comparatively small datasets (sections, schools, students).
6262
self.build_local_reference_cache(endpoint)
6363
asyncio.run(self.validate_endpoint(endpoint))
6464

@@ -372,7 +372,6 @@ def get_cache_key(payload):
372372

373373
def remote_reference_exists(self, endpoint, params):
374374
# check cache:
375-
if endpoint=='students' and 'studentUniqueId' in params.keys(): return True
376375
if endpoint not in self.remote_reference_cache.keys():
377376
self.remote_reference_cache[endpoint] = []
378377
cache_key = self.get_cache_key(params)

0 commit comments

Comments
 (0)