refactoring json-schema