summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-04-23 23:38:51 -0700
committerTim Smith <tsmith84@gmail.com>2020-04-23 23:38:51 -0700
commitc12d2686e79ca659dabdf9d14c00d4d4a5278823 (patch)
treee89b1f9f5007e42b7a7deac3e9875f940a127d6d
parent70ebd7b00f92cd70cea25326f6dee156ea2db765 (diff)
downloadchef-c12d2686e79ca659dabdf9d14c00d4d4a5278823.tar.gz
Print out strings not symbols and skip deprecated properties
Signed-off-by: Tim Smith <tsmith@chef.io>
-rwxr-xr-xtasks/docs.rb21
1 files changed, 13 insertions, 8 deletions
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