diff --git a/lib/rspec_api_documentation/example.rb b/lib/rspec_api_documentation/example.rb index ba8f0ad7..fb97a1b5 100644 --- a/lib/rspec_api_documentation/example.rb +++ b/lib/rspec_api_documentation/example.rb @@ -38,6 +38,14 @@ def has_parameters? respond_to?(:parameters) && parameters.present? end + def has_enum? + respond_to?(:parameters) && parameters.present? && parameters.any? { |i| i[:enum] } + end + + def has_default? + respond_to?(:parameters) && parameters.present? && parameters.any? { |i| i[:default] } + end + def has_attributes? respond_to?(:attributes) && attributes.present? end diff --git a/templates/rspec_api_documentation/html_example.mustache b/templates/rspec_api_documentation/html_example.mustache index 518a730e..f3c7a519 100644 --- a/templates/rspec_api_documentation/html_example.mustache +++ b/templates/rspec_api_documentation/html_example.mustache @@ -31,6 +31,12 @@