move to schema-inspector; add tests