Auto Generate Syntax Docs + JSONSchema [Thu Nov 18 20:12:46 UTC 2021] 🤖

dev
GitHub Action 2021-11-18 20:12:46 +00:00
parent 2856e7e247
commit 5a0f483cd3
3 changed files with 48 additions and 37 deletions

View File

@ -1658,7 +1658,7 @@ name: cookie-extractor
<div class="dd"> <div class="dd">
<code>type</code> <i>string</i> <code>type</code> <i>TypeHolder</i>
</div> </div>
<div class="dt"> <div class="dt">
@ -2879,7 +2879,7 @@ Description is the optional description of the headless action
<div class="dd"> <div class="dd">
<code>action</code> <i>string</i> <code>action</code> <i>ActionTypeHolder</i>
</div> </div>
<div class="dt"> <div class="dt">

View File

@ -130,15 +130,8 @@
"description": "Name of the extractor" "description": "Name of the extractor"
}, },
"type": { "type": {
"enum": [ "$schema": "http://json-schema.org/draft-04/schema#",
"regex", "$ref": "#/definitions/extractors.TypeHolder"
"kval",
"json",
"xpath"
],
"type": "string",
"title": "type of the extractor",
"description": "Type of the extractor"
}, },
"regex": { "regex": {
"items": { "items": {
@ -201,6 +194,17 @@
"additionalProperties": false, "additionalProperties": false,
"type": "object" "type": "object"
}, },
"extractors.TypeHolder": {
"enum": [
"regex",
"kval",
"xpath",
"json"
],
"type": "string",
"title": "type of the extractor",
"description": "Type of the extractor"
},
"matchers.Matcher": { "matchers.Matcher": {
"required": [ "required": [
"type" "type"
@ -555,30 +559,8 @@
"description": "Description of the headless action" "description": "Description of the headless action"
}, },
"action": { "action": {
"enum": [ "$schema": "http://json-schema.org/draft-04/schema#",
"navigate", "$ref": "#/definitions/engine.ActionTypeHolder",
"script",
"click",
"rightclick",
"text",
"screenshot",
"time",
"select",
"files",
"waitload",
"getresource",
"extract",
"setmethod",
"addheader",
"setheader",
"deleteheader",
"setbody",
"waitevent",
"keyboard",
"debug",
"sleep"
],
"type": "string",
"title": "action to perform", "title": "action to perform",
"description": "Type of actions to perform" "description": "Type of actions to perform"
} }
@ -586,6 +568,35 @@
"additionalProperties": false, "additionalProperties": false,
"type": "object" "type": "object"
}, },
"engine.ActionTypeHolder": {
"enum": [
"navigate",
"script",
"click",
"rightclick",
"text",
"screenshot",
"time",
"select",
"files",
"waitload",
"getresource",
"extract",
"set-method",
"addheader",
"setheader",
"deleteheader",
"setbody",
"waitevent",
"keyboard",
"debug",
"sleep",
"waitvisible"
],
"type": "string",
"title": "action to perform",
"description": "Type of actions to perform,enum=navigate,enum=script,enum=click,enum=rightclick,enum=text,enum=screenshot,enum=time,enum=select,enum=files,enum=waitload,enum=getresource,enum=extract,enum=setmethod,enum=addheader,enum=setheader,enum=deleteheader,enum=setbody,enum=waitevent,enum=keyboard,enum=debug,enum=sleep"
},
"http.HTTPMethodTypeHolder": { "http.HTTPMethodTypeHolder": {
"enum": [ "enum": [
"GET", "GET",

View File

@ -649,7 +649,7 @@ func init() {
EXTRACTORSExtractorDoc.Fields[0].AddExample("", "cookie-extractor") EXTRACTORSExtractorDoc.Fields[0].AddExample("", "cookie-extractor")
EXTRACTORSExtractorDoc.Fields[1].Name = "type" EXTRACTORSExtractorDoc.Fields[1].Name = "type"
EXTRACTORSExtractorDoc.Fields[1].Type = "string" EXTRACTORSExtractorDoc.Fields[1].Type = "TypeHolder"
EXTRACTORSExtractorDoc.Fields[1].Note = "" EXTRACTORSExtractorDoc.Fields[1].Note = ""
EXTRACTORSExtractorDoc.Fields[1].Description = "Type is the type of the extractor." EXTRACTORSExtractorDoc.Fields[1].Description = "Type is the type of the extractor."
EXTRACTORSExtractorDoc.Fields[1].Comments[encoder.LineComment] = "Type is the type of the extractor." EXTRACTORSExtractorDoc.Fields[1].Comments[encoder.LineComment] = "Type is the type of the extractor."
@ -1098,7 +1098,7 @@ func init() {
ENGINEActionDoc.Fields[2].Description = "Description is the optional description of the headless action" ENGINEActionDoc.Fields[2].Description = "Description is the optional description of the headless action"
ENGINEActionDoc.Fields[2].Comments[encoder.LineComment] = "Description is the optional description of the headless action" ENGINEActionDoc.Fields[2].Comments[encoder.LineComment] = "Description is the optional description of the headless action"
ENGINEActionDoc.Fields[3].Name = "action" ENGINEActionDoc.Fields[3].Name = "action"
ENGINEActionDoc.Fields[3].Type = "string" ENGINEActionDoc.Fields[3].Type = "ActionTypeHolder"
ENGINEActionDoc.Fields[3].Note = "" ENGINEActionDoc.Fields[3].Note = ""
ENGINEActionDoc.Fields[3].Description = "Action is the type of the action to perform." ENGINEActionDoc.Fields[3].Description = "Action is the type of the action to perform."
ENGINEActionDoc.Fields[3].Comments[encoder.LineComment] = "Action is the type of the action to perform." ENGINEActionDoc.Fields[3].Comments[encoder.LineComment] = "Action is the type of the action to perform."