This repository has been archived on 2020-12-30. You can view files and clone it, but cannot push or open issues or pull requests.
NetworkProtocolDictionary/validate.py

20 lines
386 B
Python
Raw Normal View History

import Rx
import sys
def validate(argv):
rx = Rx.Factory(register_core_types=True)
schemafile = "schema.yaml"
schema = None
data = None
with open(schemafile, "r") as f:
data = f.read()
schema = rx.make_schema(data)
# get all yml files from protocols
# validate with
schema.validate(data)
if __name__ == '__main__':
validate(sys.argv)