lib/grape-swagger/entity/parser.rb in grape-swagger-entity-0.3.0 vs lib/grape-swagger/entity/parser.rb in grape-swagger-entity-0.3.1
- old
+ new
@@ -44,10 +44,11 @@
else
attribute_parser.call(entity_options)
end
next unless documentation
+
memo[final_entity_name][:readOnly] = documentation[:read_only].to_s == 'true' if documentation[:read_only]
memo[final_entity_name][:description] = documentation[:desc] if documentation[:desc]
end
[parsed, required_params(params)]
@@ -90,9 +91,10 @@
.map(&:first)
end
def with_required(hash, required)
return hash if required.empty?
+
hash[:required] = required
hash
end
end
end