Skip to content

Commit

Permalink
Update schema_cleaner.rb
Browse files Browse the repository at this point in the history
Apply rubocop offenses
  • Loading branch information
AlexeyMatskevich committed Jun 16, 2023
1 parent d5cfe61 commit f2d78d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rspec/openapi/schema_cleaner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def cleanup_empty_required_array!(base)
paths_to_objects.each do |path|
parent = base.dig(*path.take(path.length - 1))
# "required" array must not be present if empty
parent.delete('required') if parent['required']&.empty?
parent.delete('required') if parent['required'] && parent['required'].empty?

Check warning on line 50 in lib/rspec/openapi/schema_cleaner.rb

View check run for this annotation

Codecov / codecov/patch

lib/rspec/openapi/schema_cleaner.rb#L50

Added line #L50 was not covered by tests
end
end

Expand Down

0 comments on commit f2d78d0

Please sign in to comment.