Skip to content

Commit b5b1c82

Browse files
committed
improved x-required
1 parent b8a069c commit b5b1c82

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/main/resources/wfc/schemas/auth.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
## to the document as it is, before the template resolution.
77
## A pragmatic compromise is to avoid "required" for fields that can be merged, and rather use "x-required".
88
## The validation of x-required constraints would then be delegated to whatever is used to resolve the templates.
9+
##
10+
## An "x-required" custom entry can be either an array of strings (with same semantic of "required") or an object (with
11+
## fields such as "allOf" and "oneOf" to express more fine-grained constraints)
912
#####################################################################################################################
1013
$schema: "https://json-schema.org/draft/2020-12/schema"
1114
$id: "https://github.com/WebFuzzing/Commons/blob/master/src/main/resources/wfc/schemas/auth.yaml"
@@ -124,7 +127,9 @@ $defs:
124127
If so, a fuzzer can use those as auth info in following requests, instead of trying to extract \
125128
an auth token from the response payload."
126129
type: boolean
127-
x-required: ["verb"]
130+
x-required:
131+
allOf: ["verb"]
132+
oneOf: ["endpoint","externalEndpointURL"]
128133
###
129134
TokenHandling:
130135
description: "Specify how to extract the token from the HTTP response, and how to use it for auth in following requests. \

0 commit comments

Comments
 (0)