lib/tomograph/api_blueprint/drafter_3/yaml/action.rb in tomograph-2.5.0 vs lib/tomograph/api_blueprint/drafter_3/yaml/action.rb in tomograph-2.5.1
- old
+ new
@@ -16,11 +16,13 @@
def method
@method ||= @content.first['attributes']['method']
end
def content_type
- @content_type ||= @content.first['attributes'].has_key?('headers') ?
- @content.first['attributes']['headers']['content'][0]['content']['value']['content'] : nil
+ if @content.first['attributes'].has_key?('headers')
+ @content.first['attributes']['headers']['content'][0]['content']['key']['content'] == 'Content-Type' ?
+ @content.first['attributes']['headers']['content'][0]['content']['value']['content'] : nil
+ end
end
def request
return @request if @request