Fixed jsonschema for matchertype missing String()

This commit is contained in:
Ice3man543 2021-11-20 19:50:18 +05:30
parent 66dacccfb4
commit bdf1c2010b
3 changed files with 15 additions and 15 deletions

View File

@ -87,15 +87,15 @@ Examples:
```yaml
requests:
matchers:
- type: 1
- type: word
words:
- '[core]'
- type: 6
- type: dsl
condition: and
dsl:
- '!contains(tolower(body), ''<html'')'
- '!contains(tolower(body), ''<body'')'
- type: 4
- type: status
status:
- 200
matchers-condition: and
@ -194,7 +194,7 @@ network:
- data: "envi\r\nquit\r\n"
read-size: 2048
matchers:
- type: 1
- type: word
words:
- zookeeper.version
```
@ -688,15 +688,15 @@ Appears in:
```yaml
matchers:
- type: 1
- type: word
words:
- '[core]'
- type: 6
- type: dsl
condition: and
dsl:
- '!contains(tolower(body), ''<html'')'
- '!contains(tolower(body), ''<body'')'
- type: 4
- type: status
status:
- 200
matchers-condition: and
@ -2396,7 +2396,7 @@ inputs:
- data: "envi\r\nquit\r\n"
read-size: 2048
matchers:
- type: 1
- type: word
words:
- zookeeper.version
```

View File

@ -307,12 +307,12 @@
},
"matchers.MatcherTypeHolder": {
"enum": [
1,
2,
3,
4,
5,
6
"word",
"regex",
"binary",
"status",
"size",
"dsl"
],
"type": "string",
"title": "type of the matcher",

View File

@ -86,7 +86,7 @@ func (holder MatcherTypeHolder) JSONSchemaType() *jsonschema.Type {
Description: "Type of the matcher,enum=status,enum=size,enum=word,enum=regex,enum=binary,enum=dsl",
}
for _, types := range GetSupportedMatcherTypes() {
gotType.Enum = append(gotType.Enum, types)
gotType.Enum = append(gotType.Enum, types.String())
}
return gotType
}