lib/open_api/dsl.rb in zero-rails_openapi-1.4.2 vs lib/open_api/dsl.rb in zero-rails_openapi-1.4.3

- old
+ new

@@ -25,11 +25,11 @@ def components &block apis_tag if @_ctrl_infos.nil? current_ctrl = @_ctrl_infos[:components] = Components.new current_ctrl.instance_eval(&block) - current_ctrl._process_objs + current_ctrl.process_objs end def api action, summary = '', http: nil, skip: [ ], use: [ ], &block apis_tag if @_ctrl_infos.nil? # select the routing info (corresponding to the current method) from routing list. @@ -41,10 +41,10 @@ .merge! description: '', summary: summary, operationId: action, tags: [@_apis_tag], parameters: [ ], requestBody: '', responses: { }, security: [ ], servers: [ ] [action, :all].each { |blk_key| @_api_dry_blocks&.[](blk_key)&.each { |blk| api.instance_eval(&blk) } } api.param_use = [ ] # `skip` and `use` only affect `api_dry`'s blocks api.instance_eval(&block) if block_given? - api._process_objs + api.process_objs api.delete_if { |_, v| v.blank? } path = (@_api_infos ||= { })[routes_info[:path]] ||= { } http_verbs = (http || routes_info[:http_verb]).split('|') http_verbs.each { |verb| path[verb] = api }