Sha256: 4ab40835190295089d7c969bc09403fa3982948e18d27e27ce3a238fe30f6890
Contents?: true
Size: 1003 Bytes
Versions: 20
Compression:
Stored size: 1003 Bytes
Contents
# frozen_string_literal: true module JSI module Schema::Application::ChildApplication::Properties # @private def internal_applicate_properties(property_name, &block) apply_additional = true if keyword?('properties') && schema_content['properties'].respond_to?(:to_hash) && schema_content['properties'].key?(property_name) apply_additional = false yield subschema(['properties', property_name]) end if keyword?('patternProperties') && schema_content['patternProperties'].respond_to?(:to_hash) schema_content['patternProperties'].each_key do |pattern| if pattern.respond_to?(:to_str) && property_name.to_s =~ Regexp.new(pattern) # TODO map pattern to ruby syntax apply_additional = false yield subschema(['patternProperties', pattern]) end end end if apply_additional && keyword?('additionalProperties') yield subschema(['additionalProperties']) end end end end
Version data entries
20 entries across 20 versions & 2 rubygems