Skip to content

Commit 5c1084b

Browse files
authored
Merge pull request #1 from subbarao/master
display includes in alphabetically with newline to improve readability
2 parents 1b67386 + ed9e34a commit 5c1084b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/jsonapi_swagger_helpers.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@ def jsonapi_includes(controller, action)
106106

107107
if includes && includes[action]
108108
directive = includes[action]
109-
includes = directive.to_string
109+
includes = directive.to_string.split(",").sort.join(",<br/>")
110110

111111
parameter do
112112
key :name, :include
113113
key :in, :query
114114
key :type, :string
115115
key :required, false
116-
key :description, "<a href='http://jsonapi.org/format/#fetching-includes'>JSONAPI includes</a>: \"#{includes}\""
116+
key :description, "<a href='http://jsonapi.org/format/#fetching-includes'>JSONAPI includes</a>: #{includes}"
117117
end
118118
end
119119
end

0 commit comments

Comments
 (0)