mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-09 03:31:41 +00:00
tools: remove JSON schema validation tool
I'm now using the json_schema gem which already includes such a tool.
This commit is contained in:
parent
2c11d3f3bd
commit
c6e3ea35ea
@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env ruby
|
|
||||||
|
|
||||||
require 'json'
|
|
||||||
require 'jschema'
|
|
||||||
|
|
||||||
fail "Required parameters: <schema> <file to validate>" if ARGV.count != 2
|
|
||||||
|
|
||||||
content = JSON.parse File.read(ARGV[1])
|
|
||||||
schema_data = JSON.parse File.read(ARGV[0])
|
|
||||||
schema = JSchema.build(schema_data)
|
|
||||||
errors = schema.validate content
|
|
||||||
|
|
||||||
exit 0 if errors.empty?
|
|
||||||
|
|
||||||
puts errors.join("\n")
|
|
||||||
|
|
||||||
exit 1
|
|
Loading…
Reference in New Issue
Block a user