Write schema parser logic and add test for that