lib/grape-swagger/entity/parser.rb in grape-swagger-entity-0.3.1 vs lib/grape-swagger/entity/parser.rb in grape-swagger-entity-0.3.2
- old
+ new
@@ -32,10 +32,13 @@
def parse_grape_entity_params(params, parent_model = nil)
return unless params
parsed = params.each_with_object({}) do |(entity_name, entity_options), memo|
- next if entity_options.fetch(:documentation, {}).fetch(:in, nil).to_s == 'header'
+ documentation_options = entity_options.fetch(:documentation, {})
+ in_option = documentation_options.fetch(:in, nil).to_s
+ hidden_option = documentation_options.fetch(:hidden, nil)
+ next if in_option == 'header' || hidden_option == true
final_entity_name = entity_options.fetch(:as, entity_name)
documentation = entity_options[:documentation]
memo[final_entity_name] = if entity_options[:nesting]