Skip to content

Commit b3c352e

Browse files
committed
(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.
1 parent 3ae711f commit b3c352e

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. Can also be written as `docs` for backwards compatibility. This compatibility option will go away in the next major revision.
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)