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

(PDOC-206) support for tasks #161

Merged
merged 1 commit into from
Mar 21, 2018
Merged

(PDOC-206) support for tasks #161

merged 1 commit into from
Mar 21, 2018

Conversation

eputnam
Copy link
Contributor

@eputnam eputnam commented Feb 28, 2018

No description provided.

@eputnam eputnam changed the title (PDOC-206) WIP tasks (PDOC-206) support for tasks Mar 12, 2018
@eputnam
Copy link
Contributor Author

eputnam commented Mar 13, 2018

@jbondpdx since we've never documented tasks in markdown, i thought you might wanna have a look.

here's a sample task json:

{
  "description": "Allows you to backup your database to local file.",
  "input_method": "stdin",
  "parameters": {
    "database": {
      "description": "Database to connect to",
      "type": "Optional[String[1]]"
    },
    "user": {
      "description": "The user",
      "type": "Optional[String[1]]"
    },
    "password": {
      "description": "The password",
      "type": "Optional[String[1]]"
    },
     "file": {
      "description": "Path to file you want backup to",
      "type": "String[1]"
    }
  }

here's sample markdown output:

Tasks

export

Allows you to backup your database to local file.

Supports noop? false

Parameters

database

Data type: Optional[String[1]]

Database to connect to

user

Data type: Optional[String[1]]

The user

password

Data type: Optional[String[1]]

The password

file

Data type: String[1]

Path to file you want backup to

@jbondpdx
Copy link
Contributor

This looks great! +100

Currently, puppet-strings does not know how to generate documentation
for Puppet Tasks. This does all the work to add support for Tasks
including a new JSON parser, a task handler, task statement, and task code
object. Basically, Strings reads the JSON using the native ruby json
parser and sends values through in a way it understands. It is only
passing json key/value pairs through, nothing is happening with tags at
this time. You can now document Tasks and generate HTML, Markdown, or
JSON output.
Copy link
Contributor

@scotje scotje left a comment

Choose a reason for hiding this comment

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

🎉

@scotje scotje merged commit 76b337a into puppetlabs:master Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants