From eccc57b57d5c7ae2dbec362167392d6506f08710 Mon Sep 17 00:00:00 2001 From: "Mario.RuizSanchez" Date: Fri, 1 Feb 2019 13:27:35 +0000 Subject: [PATCH] added parameters in path when missing --- lib/open_api_import.rb | 12 ++++++++++++ open_api_import.gemspec | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/open_api_import.rb b/lib/open_api_import.rb index ce93aac..c181b7d 100644 --- a/lib/open_api_import.rb +++ b/lib/open_api_import.rb @@ -311,6 +311,18 @@ def self.from(swagger_file, create_method_name: :operation_id, include_responses output << description_parameters end + #for the case we still have some parameters on path that were not in 'parameters' + if path_txt.match?(/[^#]{\w+}/) + paramst = [] + prms = path_txt.scan(/[^#]{(\w+)}/) + prms.each do |p| + paramst<