mirror of https://github.com/daffainfo/nuclei.git
adding json schema for extractor (#3240)
* adding json schema for extractor * adding argument validationdev
parent
1e5358b1fa
commit
1fbd2c069a
|
@ -21,6 +21,11 @@ func main() {
|
|||
if err != nil {
|
||||
log.Fatalf("Could not encode docs: %s\n", err)
|
||||
}
|
||||
|
||||
if len(os.Args) < 3 {
|
||||
log.Fatalf("syntax: %s md-docs-file jsonschema-file\n", os.Args[0])
|
||||
}
|
||||
|
||||
err = os.WriteFile(os.Args[1], data, 0644)
|
||||
if err != nil {
|
||||
log.Fatalf("Could not write docs: %s\n", err)
|
||||
|
|
|
@ -90,7 +90,7 @@ type Extractor struct {
|
|||
|
||||
// description: |
|
||||
// Extracts using DSL expressions.
|
||||
DSL []string
|
||||
DSL []string `yaml:"dsl,omitempty" jsonschema:"title=dsl expressions to extract,description=Optional attribute to extract from response dsl"`
|
||||
dslCompiled []*govaluate.EvaluableExpression
|
||||
|
||||
// description: |
|
||||
|
|
Loading…
Reference in New Issue