Skip to content

Commit

Permalink
Allow parsing Entity with no endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Lordnibbler committed Aug 1, 2016
1 parent 822d9ec commit daeccf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/grape-swagger/entity/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def parse_grape_entity_params(params)
end

if model
name = endpoint.send(:expose_params_from_model, model)
name = endpoint.nil? ? model.to_s.demodulize : endpoint.send(:expose_params_from_model, model)
memo[entity_name] = entity_model_type(name, entity_options)
else
documented_type = entity_options[:type]
Expand Down

0 comments on commit daeccf7

Please sign in to comment.