diff --git a/lib/rspec_api_documentation/writers/open_api_writer.rb b/lib/rspec_api_documentation/writers/open_api_writer.rb index ed5d0420..1c55149d 100644 --- a/lib/rspec_api_documentation/writers/open_api_writer.rb +++ b/lib/rspec_api_documentation/writers/open_api_writer.rb @@ -144,7 +144,7 @@ def extract_schema(fields) opts = {enum: field[:enum], minimum: field[:minimum], maximum: field[:maximum]} if current[:properties][field[:name]][:type] == :array - current[:properties][field[:name]][:items] = field[:items] || OpenApi::Helper.extract_items(field[:value][0], opts) + current[:properties][field[:name]][:items] = field[:items] || OpenApi::Helper.extract_items(field[:value], opts) else opts.each { |k, v| current[:properties][field[:name]][k] = v if v } end