From 66c831231a619f433c30321c7a018d9937b9c14d Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Thu, 23 Apr 2020 23:38:51 -0700 Subject: Print out strings not symbols and skip deprecated properties Signed-off-by: Tim Smith --- tasks/docs.rb | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'tasks') diff --git a/tasks/docs.rb b/tasks/docs.rb index ed091b89d0..5c00976b85 100755 --- a/tasks/docs.rb +++ b/tasks/docs.rb @@ -148,14 +148,19 @@ namespace :docs_site do # - what to do about "lazy default" for default? def properties_list(properties) properties.map do |property| - { - property: property["name"], - ruby_type: friendly_types_list(property["is"]), - required: property["required"], - default_value: property["default"], - new_in: property["introduced"], - description_list: [{ markdown: property["description"] }], - } + if property["deprecated"] # we don't want to document deprecated properties + nil + else + { + "property" => property["name"], + "ruby_type" => friendly_types_list(property["is"]), + "required" => property["required"], + "default_value" => friendly_default_value(property), + #"allowed_values" => property["equal_to"].join(', '), + "new_in" => property["introduced"], + "description_list" => [{ "markdown" => property["description"] }], + } + end end end -- cgit v1.2.1