Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(maint) fix desc/docs confusion #141

Merged
merged 2 commits into from
Jun 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions language/resource-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you change this text once the "next major revision of the library" is released?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I've been pretty good until now to keep this text and the library in sync. I expect to do so in the foreseeable future, too.

* `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).
Expand Down Expand Up @@ -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: [
Expand Down