Skip to content

Commit 3896fb0

Browse files
committed
handle case with no properties for scope
1 parent 7396c01 commit 3896fb0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/rspec_api_documentation/writers/open_api_writer.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ def inject_body_parameter(schema, parameter)
268268
scope = scope.properties[curr.to_s]
269269
end
270270

271+
return unless scope.properties
272+
271273
scope.required ||= []
272274
scope.required << parameter[:name].to_s if parameter[:required]
273275

0 commit comments

Comments
 (0)