Add schemas code

Unlike all the other functions this function depends on the syntaxes defined in the parent object. Can we either change it to take in the set of all syntaxes or improve the comment to differentiate it a bit more.