From 548f627f4e88722f4e183cc26a39079f3b407015 Mon Sep 17 00:00:00 2001 From: Dylan Ratcliffe Date: Mon, 22 Apr 2024 17:34:47 +0100 Subject: [PATCH] Readme fixes --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index aa56ef8..a402ade 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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} ``` @@ -67,7 +65,7 @@ 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 @@ -75,4 +73,6 @@ These tags must include the desired documentation following the tag on a single * `+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