Skip to content

Commit 6bd1811

Browse files
authored
Merge pull request #141 from DavidS/fix-desc-docs
(maint) fix desc/docs confusion
2 parents f2cdda7 + 501dc82 commit 6bd1811

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

language/resource-api/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Puppet::ResourceApi.register_type(
5656
The `Puppet::ResourceApi.register_type(options)` function takes the following keyword arguments:
5757

5858
* `name`: the name of the resource type.
59-
* `desc`: a doc string that describes the overall working of the resource type, provides examples, and explains prerequisites and known issues.
59+
* `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.
6060
* `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`.
6161
* `type`: the Puppet 4 data type allowed in this attribute.
6262
* `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:
9090
# lib/puppet/type/software.rb
9191
Puppet::ResourceApi.register_type(
9292
name: 'software',
93-
docs: <<-DOC,
93+
desc: <<-DOC,
9494
This type provides Puppet with the capabilities to manage ...
9595
DOC
9696
title_patterns: [

0 commit comments

Comments
 (0)