Sha256: d16248e82ad439ff51294597359698f1f0ed81bcb42348565c33b94be690114d
Contents?: true
Size: 707 Bytes
Versions: 10
Compression:
Stored size: 707 Bytes
Contents
# frozen_string_literal: true module Meta module JsonSchema class ArraySchemaBuilder def initialize(options, &block) options = options.dup items_options = options.delete(:items) || {} items_options[:ref] = options.delete(:ref) if options[:ref] items_options[:dynamic_ref] = options.delete(:dynamic_ref) if options[:dynamic_ref] @items_schema = SchemaBuilderTool.build(items_options, &block) @base_options = options end def to_schema ArraySchema.new(@items_schema, @base_options) end def object_property?(options, block) (options && !options[:properties].nil?) || !block.nil? end end end end
Version data entries
10 entries across 10 versions & 1 rubygems