Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
Readme fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanratcliffe committed Apr 22, 2024
1 parent 847cd9b commit 548f627
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# 👩‍⚕️🤖 docgen

*Documentation generation for Overmind sources*

This tool generates JSON that can then be used to generate docs for Overmind sources. The format of the comments is as follows:

```go
Expand All @@ -23,22 +21,22 @@ Produces this markdown:

```json
{
"type": "ec2-instance",
"descriptiveType": "EC2 Instance",
"getDescription": "Get an EC2 instance by ID",
"listDescription": "List all EC2 instances",
"searchDescription": "Search for EC2 instances by name",
"group": "AWS",
"links": [
"ip",
"ec2-security-group"
]
"type": "ec2-instance",
"descriptiveType": "EC2 Instance",
"getDescription": "Get an EC2 instance by ID",
"listDescription": "List all EC2 instances",
"searchDescription": "Search for EC2 instances by name",
"group": "AWS",
"links": [
"ip",
"ec2-security-group"
]
}
```

Note that the format of the `go generate` comment is:

```
```go
//go:generate docgen {destination_folder}
```

Expand Down Expand Up @@ -67,12 +65,14 @@ All tags gor a given type should exist within the same file, however they can li
These tags must include the desired documentation following the tag on a single line

* `+overmind:type`: The type that the source returns e.g. `ec2-instance`
* `+overmind:descriptiveType: The desriptive type e.g. `EC2 Instance`
* `+overmind:descriptiveType`: The desriptive type e.g. `EC2 Instance`
* `+overmind:get`: Description of the Get method for this source
* `+overmind:list`: Description of the List method for this source
* `+overmind:search`: Description of the Search method for this source
* `+overmind:group`: The group that this source belongs to e.g. "AWS"
* `+overmind:link`: Types of items that this can be linked to
* `+overmind:terraform:method`: The method the query should have when converting from a `terraform plan` to an overmind query. Defaults to `GET`. Valid values: `GET`, `LIST`, `SEARCH`
* `+overmind:terraform:queryMap`: Where the `query` data should come from when converting a `terraform plan` to an Overmind query. This is in the format `{resource_type}.{attribute_name}`. This can be specified multiple times if there are many terrafrom resources taht could affect this overmind type
* `+overmind:terraform:scope`: The scope that the query should have when converting from a `terraform plan` to an Overmind query, defaults to `*`
* `+overmind:terraform:scope`: The scope that the query should have when converting from a `terraform plan` to an Overmind query, defaults to `*`. This field supports interpolationwhich allows you to interpolate variables in the scope string. Interpolation is done using the [Terraform interpolation syntax](https://www.terraform.io/docs/configuration/interpolation.html). These variables can come from the following places:
* `outputs` - These are the outputs from the plan
* `values` - These are the values from the resource in question

0 comments on commit 548f627

Please sign in to comment.