lib/json_schema/schema.rb in json_schema-0.1.9 vs lib/json_schema/schema.rb in json_schema-0.2.0

- old
+ new

@@ -259,18 +259,10 @@ def original? !clones.include?(self) end - def depth - if parent - parent.depth + 1 - else - 0 - end - end - def pointer if parent parent.pointer + "/" + fragment else fragment @@ -295,15 +287,20 @@ attr_accessor :description attr_accessor :enc_type attr_accessor :href attr_accessor :method attr_accessor :rel + attr_accessor :media_type attr_accessor :schema attr_accessor :target_schema attr_accessor :title def enc_type @enc_type || "application/json" + end + + def media_type + @media_type || "application/json" end end # Media type subobject for a hyperschema. class Media