From d4751fc7604a66abf6db74a0b9a66884f6497366 Mon Sep 17 00:00:00 2001 From: Carlos Camilo Date: Mon, 9 Oct 2023 10:41:33 -0300 Subject: [PATCH 1/2] docs: add clarity and reference to JSON tags * Update docs/howto/structs.md Added a link to the configuration reference on the JSON tags session. --- docs/howto/structs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/howto/structs.md b/docs/howto/structs.md index 2070d3d234..42825e7206 100644 --- a/docs/howto/structs.md +++ b/docs/howto/structs.md @@ -31,7 +31,7 @@ CREATE TABLE authors ( ); ``` -sqlc can generate structs with JSON tags. The JSON name for a field matches +sqlc can generate structs with JSON tags by adding the `emit_json_tags` key to the configuration file as it shows on (configuration reference)[../reference/config.md], by default `false`. The JSON name for a field matches the column name in the database. ```go From 1fcd7ee1011e04de49089af73f9626851296b7d9 Mon Sep 17 00:00:00 2001 From: Carlos Camilo Date: Mon, 9 Oct 2023 10:46:56 -0300 Subject: [PATCH 2/2] fix(docs): link to configuration reference --- docs/howto/structs.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/howto/structs.md b/docs/howto/structs.md index 42825e7206..caec740830 100644 --- a/docs/howto/structs.md +++ b/docs/howto/structs.md @@ -31,7 +31,8 @@ CREATE TABLE authors ( ); ``` -sqlc can generate structs with JSON tags by adding the `emit_json_tags` key to the configuration file as it shows on (configuration reference)[../reference/config.md], by default `false`. The JSON name for a field matches +sqlc can generate structs with JSON tags by adding the `emit_json_tags` key to the configuration file as it shows on [configuration reference](../reference/config.md). +The JSON name for a field matches the column name in the database. ```go