Skip to content

Commit fcfaa42

Browse files
authored
feat: Add links to tables in table README.md, and list of relations (#283)
This updates the README for table docs in two ways: - links to the table (right now when you land on [this page](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/docs/tables/README.md) for example, there's no indication that there is actually more information) - adds information about relations, if any I'm happy to take suggestions about how to better present these; I just think it's important we improve the discoverability a little bit now and keep making incremental improvements afterwards.
1 parent aa7ee33 commit fcfaa42

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Source Plugin: test
22
## Tables
3-
| Name | Description |
4-
| ------------- | ------------- |
5-
|test_table|Description for test table|
3+
| Name | Relations | Description |
4+
| ------------- | --------- | ------------- |
5+
| [test_table](test_table.md)| [relation_table](relation_table.md)<br />[relation_table2](relation_table2.md)| Description for test table|

plugins/.snapshots/TestGenerateSourcePluginDocs-test_table.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The composite primary key for this table is (**id_col**, **id_col2**).
77
## Relations
88
The following tables depend on `test_table`:
99
- [`relation_table`](relation_table.md)
10+
- [`relation_table2`](relation_table2.md)
1011

1112
## Columns
1213
| Name | Type |

plugins/source_docs_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ var testTables = []*schema.Table{
4141
},
4242
},
4343
},
44+
{
45+
Name: "relation_table2",
46+
Description: "Description for second relational table",
47+
Columns: []schema.Column{
48+
{
49+
Name: "string_col",
50+
Type: schema.TypeString,
51+
},
52+
},
53+
},
4454
},
4555
},
4656
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Source Plugin: {{.Name}}
22
## Tables
3-
| Name | Description |
4-
| ------------- | ------------- |
3+
| Name | Relations | Description |
4+
| ------------- | --------- | ------------- |
55
{{- range $table := $.Tables }}
6-
|{{$table.Name}}|{{$table.Description }}|
6+
| [{{$table.Name}}]({{$table.Name}}.md)| {{range $index, $rel := $table.Relations}}{{if $index}}<br />{{end}}[{{$rel.Name}}]({{$rel.Name}}.md){{end}}| {{$table.Description }}|
77
{{- end }}

0 commit comments

Comments
 (0)