Auto Generate Syntax Docs + JSONSchema [Mon Apr 25 08:40:12 UTC 2022] 🤖

dev
GitHub Action 2022-04-25 08:40:12 +00:00
parent 51d8f80713
commit 737132bc88
3 changed files with 58 additions and 1 deletions

View File

@ -319,6 +319,19 @@ Valid values:
<hr />
<div class="dd">
<code>variables</code> <i><a href="#variablesvariable">variables.Variable</a></i>
</div>
<div class="dt">
Variables contains any variables for the current request.
</div>
<hr />
@ -4158,3 +4171,18 @@ Appears in:
## variables.Variable
Variable is a key-value pair of strings that can be used
throughout template.
Appears in:
- <code><a href="#template">Template</a>.variables</code>

View File

@ -352,6 +352,11 @@
"title": "type of the attack",
"description": "Type of the attack"
},
"variables.Variable": {
"properties": {},
"additionalProperties": false,
"type": "object"
},
"dns.DNSRequestTypeHolder": {
"enum": [
"A",
@ -1304,6 +1309,12 @@
"$ref": "#/definitions/http.SignatureTypeHolder",
"title": "signature is the http request signature method",
"description": "Signature is the HTTP Request signature Method"
},
"variables": {
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/variables.Variable",
"title": "variables for the http request",
"description": "Variables contains any variables for the current request"
}
},
"additionalProperties": false,

View File

@ -39,13 +39,14 @@ var (
WORKFLOWSWorkflowTemplateDoc encoder.Doc
WORKFLOWSMatcherDoc encoder.Doc
HTTPSignatureTypeHolderDoc encoder.Doc
VARIABLESVariableDoc encoder.Doc
)
func init() {
TemplateDoc.Type = "Template"
TemplateDoc.Comments[encoder.LineComment] = " Template is a YAML input file which defines all the requests and"
TemplateDoc.Description = "Template is a YAML input file which defines all the requests and\n other metadata for a template."
TemplateDoc.Fields = make([]encoder.Doc, 14)
TemplateDoc.Fields = make([]encoder.Doc, 15)
TemplateDoc.Fields[0].Name = "id"
TemplateDoc.Fields[0].Type = "string"
TemplateDoc.Fields[0].Note = ""
@ -131,6 +132,11 @@ func init() {
TemplateDoc.Fields[13].Values = []string{
"AWS",
}
TemplateDoc.Fields[14].Name = "variables"
TemplateDoc.Fields[14].Type = "variables.Variable"
TemplateDoc.Fields[14].Note = ""
TemplateDoc.Fields[14].Description = "Variables contains any variables for the current request."
TemplateDoc.Fields[14].Comments[encoder.LineComment] = "Variables contains any variables for the current request."
MODELInfoDoc.Type = "model.Info"
MODELInfoDoc.Comments[encoder.LineComment] = " Info contains metadata information about a template"
@ -1906,6 +1912,17 @@ func init() {
},
}
HTTPSignatureTypeHolderDoc.Fields = make([]encoder.Doc, 0)
VARIABLESVariableDoc.Type = "variables.Variable"
VARIABLESVariableDoc.Comments[encoder.LineComment] = " Variable is a key-value pair of strings that can be used"
VARIABLESVariableDoc.Description = "Variable is a key-value pair of strings that can be used\n throughout template."
VARIABLESVariableDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "Template",
FieldName: "variables",
},
}
VARIABLESVariableDoc.Fields = make([]encoder.Doc, 0)
}
// GetTemplateDoc returns documentation for the file templates_doc.go.
@ -1944,6 +1961,7 @@ func GetTemplateDoc() *encoder.FileDoc {
&WORKFLOWSWorkflowTemplateDoc,
&WORKFLOWSMatcherDoc,
&HTTPSignatureTypeHolderDoc,
&VARIABLESVariableDoc,
},
}
}