lib/tomograph/tomogram.rb in tomograph-3.1.2 vs lib/tomograph/tomogram.rb in tomograph-3.1.3

- old
+ new

@@ -8,11 +8,16 @@ module Tomograph class Tomogram extend Gem::Deprecate - def initialize(prefix: '', drafter_yaml_path: nil, tomogram_json_path: nil, crafter_yaml_path: nil, openapi2_json_path: nil, openapi3_yaml_path: nil) + def initialize(prefix: '', + drafter_yaml_path: nil, + tomogram_json_path: nil, + crafter_yaml_path: nil, + openapi2_json_path: nil, + openapi3_yaml_path: nil) @documentation = if tomogram_json_path Tomograph::ApiBlueprint::JsonSchema.new(prefix, tomogram_json_path) elsif crafter_yaml_path Tomograph::ApiBlueprint::Crafter::Yaml.new(prefix, crafter_yaml_path) elsif openapi2_json_path @@ -27,10 +32,10 @@ def to_a @actions ||= @documentation.to_tomogram end - def to_json + def to_json(*_args) JSON.pretty_generate(to_a.map(&:to_hash)) end def find_request(method:, path:) path = Tomograph::Path.new(path).to_s