From f5cb23c114e65475dffa66cf25aa3c8594c84c4e Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Wed, 29 May 2019 15:26:05 +0100 Subject: [PATCH 1/2] (maint) fix desc/docs confusion The text and examples have been inconsistent with how `desc` vs `docs` has been handled. This change fixes the text and examples to all show and require `desc`, but accept `docs` in places where we showed it previously. --- language/resource-api/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/language/resource-api/README.md b/language/resource-api/README.md index de9889f..dde15ec 100644 --- a/language/resource-api/README.md +++ b/language/resource-api/README.md @@ -56,7 +56,7 @@ Puppet::ResourceApi.register_type( The `Puppet::ResourceApi.register_type(options)` function takes the following keyword arguments: * `name`: the name of the resource type. -* `desc`: a doc string that describes the overall working of the resource type, provides examples, and explains prerequisites and known issues. +* `desc`: a doc string that describes the overall working of the resource type, provides examples, and explains prerequisites and known issues. Can also be written as `docs` for backwards compatibility. This compatibility option will go away in the next major revision of the library. * `attributes`: a hash mapping attribute names to their details. Each attribute is described by a hash containing the Puppet 4 data `type`, a `desc` string, a `default` value, and the `behaviour` of the attribute: `namevar`, `read_only`, `init_only`, or a `parameter`. * `type`: the Puppet 4 data type allowed in this attribute. * `desc`: a string describing this attribute. This is used in creating the automated API docs with [puppet-strings](https://github.com/puppetlabs/puppet-strings). @@ -90,7 +90,7 @@ Example: # lib/puppet/type/software.rb Puppet::ResourceApi.register_type( name: 'software', - docs: <<-DOC, + desc: <<-DOC, This type provides Puppet with the capabilities to manage ... DOC title_patterns: [ From 501dc82e6c54b26d5ce4aafb440fb0d3de6ca851 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Thu, 30 May 2019 10:36:23 +0100 Subject: [PATCH 2/2] Fix language Co-Authored-By: clairecadman --- language/resource-api/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language/resource-api/README.md b/language/resource-api/README.md index dde15ec..33cd83a 100644 --- a/language/resource-api/README.md +++ b/language/resource-api/README.md @@ -56,7 +56,7 @@ Puppet::ResourceApi.register_type( The `Puppet::ResourceApi.register_type(options)` function takes the following keyword arguments: * `name`: the name of the resource type. -* `desc`: a doc string that describes the overall working of the resource type, provides examples, and explains prerequisites and known issues. Can also be written as `docs` for backwards compatibility. This compatibility option will go away in the next major revision of the library. +* `desc`: a doc string that describes the overall working of the resource type, provides examples, and explains prerequisites and known issues. You can also write `desc` as `docs` for backwards compatibility. This compatibility option will no longer be available in the next major revision of the library. * `attributes`: a hash mapping attribute names to their details. Each attribute is described by a hash containing the Puppet 4 data `type`, a `desc` string, a `default` value, and the `behaviour` of the attribute: `namevar`, `read_only`, `init_only`, or a `parameter`. * `type`: the Puppet 4 data type allowed in this attribute. * `desc`: a string describing this attribute. This is used in creating the automated API docs with [puppet-strings](https://github.com/puppetlabs/puppet-strings).