recursively create modules from the parsed schema