Skip to content

Commit

Permalink
allow doc without components for OpenAPI 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tuwilof committed May 13, 2024
1 parent b9bbd50 commit 94fea8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tomograph/openapi/openapi3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def responses_by_content_types(content_types, response_code)
end

def schema(sche)
defi = @documentation['components']['schemas']
defi = @documentation['components']['schemas'] if @documentation['components']
if sche.keys.include?('$ref')
sche.merge!('components' => {})
sche['components'].merge!('schemas' => {})
Expand Down

0 comments on commit 94fea8e

Please sign in to comment.