You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had this code snipper lying around on one of my repos if that helps.
importjsonimportostested=0forroot, _, filesinos.walk("schemas", topdown=True):
fornameinfiles:
filename=os.path.join(root, name)
withopen(filename) asfp:
try:
tested+=1data=json.load(fp)
ifdata["@id"] anddata["@id"] !=name:
raiseValueError(f"{root}/{name} does not have matching @id")
exceptjson.decoder.JSONDecodeError:
print(f"{root}/{name} could not be loaded")
raiseiftested==0:
raiseValueError("Zero files tested")
From @satra @djarecka :
"@id needs to match the filename"
"if validation is passing with this, please ask dorota to add that to the validator"
The text was updated successfully, but these errors were encountered: