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

- old
+ new

@@ -36,9 +36,15 @@ { attr => load_schema(assoc_model) } end rescue next end end + def fill_in_parameters(param_obj) + name = param_obj.processed[:name] + index = self[:parameters].map { |p| p.processed[:name] if p.is_a?(ParamObj) }.index(name) + index.present? ? self[:parameters][index] = param_obj : self[:parameters] << param_obj + end + # Arrow Writing: # response :RespComponent => [ '200', 'success', :json ] # It is equivalent to: # response :RespComponent, '200', 'success', :json # But I think, in the definition of a component,