Skip to content

OS 3.8 broke json-schema validation #5208

@shorowit

Description

@shorowit

Issue overview

OpenStudio 3.7 works (validation error returned):

openstudio -e 'require "json-schema"; require "stringio"; schema = { "type" => "object", "required" => ["a"], "properties" => { "a" => {"type" => "integer"} } }; begin; JSON::Validator.validate!(schema, { "a" => "taco" }); rescue JSON::Schema::ValidationError => e; puts e.message; end'
The property '#/a' of type String did not match the following type: integer

OpenStudio 3.8 fails (ruby exception):

openstudio -e 'require "json-schema"; require "stringio"; schema = { "type" => "object", "required" => ["a"], "properties" => { "a" => {"type" => "integer"} } }; begin; JSON::Validator.validate!(schema, { "a" => "taco" }); rescue JSON::Schema::ValidationError => e; puts e.message; end'
terminate called after throwing an instance of 'RubyException'
  what():  NameError: uninitialized constant IO::StringIO
Aborted (core dumped)

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions