From 9d0856e3c8ea23f1bf9f5677a5b2d82db6697f6c Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 1 Sep 2021 10:19:34 +0000 Subject: [PATCH] Auto Generate Syntax Docs + JSONSchema [Wed Sep 1 10:19:34 UTC 2021] :robot: --- SYNTAX-REFERENCE.md | 3 +-- v2/pkg/templates/templates_doc.go | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/SYNTAX-REFERENCE.md b/SYNTAX-REFERENCE.md index 006885fb..8c3f0800 100755 --- a/SYNTAX-REFERENCE.md +++ b/SYNTAX-REFERENCE.md @@ -18,8 +18,7 @@ Template is a YAML input file which defines all the requests and
-ID is the unique id for the template. IDs must be lowercase -and must not contain spaces in it. +ID is the unique id for the template. #### Good IDs diff --git a/v2/pkg/templates/templates_doc.go b/v2/pkg/templates/templates_doc.go index 5e65c59e..4ed4b126 100644 --- a/v2/pkg/templates/templates_doc.go +++ b/v2/pkg/templates/templates_doc.go @@ -34,8 +34,8 @@ func init() { TemplateDoc.Fields[0].Name = "id" TemplateDoc.Fields[0].Type = "string" TemplateDoc.Fields[0].Note = "" - TemplateDoc.Fields[0].Description = "ID is the unique id for the template. IDs must be lowercase\nand must not contain spaces in it.\n\n#### Good IDs\n\nA good ID uniquely identifies what the requests in the template\nare doing. Let's say you have a template that identifies a git-config\nfile on the webservers, a good name would be `git-config-exposure`. Another\nexample name is `azure-apps-nxdomain-takeover`." - TemplateDoc.Fields[0].Comments[encoder.LineComment] = "ID is the unique id for the template. IDs must be lowercase" + TemplateDoc.Fields[0].Description = "ID is the unique id for the template.\n\n#### Good IDs\n\nA good ID uniquely identifies what the requests in the template\nare doing. Let's say you have a template that identifies a git-config\nfile on the webservers, a good name would be `git-config-exposure`. Another\nexample name is `azure-apps-nxdomain-takeover`." + TemplateDoc.Fields[0].Comments[encoder.LineComment] = "ID is the unique id for the template." TemplateDoc.Fields[0].AddExample("ID Example", "cve-2021-19520") TemplateDoc.Fields[1].Name = "info"