From 225a68020cd6ba238041299d9bef7e1c6067d68c Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Mon, 12 Aug 2024 10:59:21 -0700 Subject: [PATCH] Generate a doc string comment for the record (#187) --- cmd/generator/scheme.go | 1 + cmd/generator/tests/data.avdl | 1 + 2 files changed, 2 insertions(+) diff --git a/cmd/generator/scheme.go b/cmd/generator/scheme.go index d87f3af..484f6e4 100644 --- a/cmd/generator/scheme.go +++ b/cmd/generator/scheme.go @@ -10,6 +10,7 @@ import ( ) const schemeTemplate = `@namespace("{{ .Namespace }}") protocol {{ .Protocol }} { + /** {{ .Record }} is the telemetry data for the product. */ @df_datatype("{{ .DataFabricDataType }}") record {{ .Record }} { /** The field that identifies what type of data this is. */ string dataType; diff --git a/cmd/generator/tests/data.avdl b/cmd/generator/tests/data.avdl index 41d8078..69e5f10 100644 --- a/cmd/generator/tests/data.avdl +++ b/cmd/generator/tests/data.avdl @@ -1,4 +1,5 @@ @namespace("gateway.nginx.org") protocol NGFProductTelemetry { + /** Data is the telemetry data for the product. */ @df_datatype("ngf-product-telemetry") record Data { /** The field that identifies what type of data this is. */ string dataType;