Refactor validate and json-schema into separate namespaces