Skip to content

Commit 855e233

Browse files
committed
Merge pull request Apipie#426 from febeling/render-enum-as-code
Render enum param values as CODE
2 parents 2492284 + e41b02d commit 855e233

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/apipie/validator.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ def self.build(param_description, argument, options, proc)
149149
end
150150

151151
def description
152-
"Must be one of: #{@array.join(', ')}."
152+
string = @array.map { |value| "<code>#{value}</code>" }.join(', ')
153+
"Must be one of: #{string}."
153154
end
154155
end
155156

0 commit comments

Comments
 (0)