def METHOD_NAME(path):
    SCHEMAS[path] = {}  # clear out existing specs
    rest_specs = {}
    models = {}
    for root, dirs, files in os.walk(path):
        for file in files:
            filename = os.path.join(root, file)
            if file.endswith(('.json', '.pdsc')):
                schemas = rest_specs if file.endswith('.json') else models
                f = open(filename, 'r')
                text = f.read()
                schema = json.loads(text)
                # TODO: Handle aliases
                schemas[schema['name']] = {
                    'name': schema['name'],
                    'filename': filename,
                    'schema': text
                }
                f.close()
            elif file.endswith('.avpr'):
                schemas = models
                f = open(filename, 'r')
                protocol = json.load(f)
                for schema in protocol.get('types'):
                    schemas[schema['name']] = {
                        'name': schema['name'],
                        'filename': filename,
                        'schema': json.dumps(schema, indent=1)
                    }
                f.close()
    SCHEMAS[path][MODELS] = models
    SCHEMAS[path][REST_SPECS] = rest_specs