-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Description
I'm talking about the callbacks field callbacks :== Map[string, Callback Object | Reference Object]
The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.
both defined in
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#operationObject
and
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#callbackObject
This means that this is a valid callbacks map:
callbacks:
"$request.query.queryUrl": # key value used to identify the callback object
<CallbackObject>
"$url": # key value used to identify the callback object
<CallbackObject>Now, by definition of a Callback Object:
The key that identifies the Path Item Object is a runtime expression that can be evaluated in the context of a runtime HTTP request/response to identify the URL to be used for the callback request.
so we end up with some mess like this:
callbacks:
"$request.query.queryUrl": # key value used to identify the callback object
"$request.query.queryUrl": # key that identifies the Path Item Object
<PathItemObject>
"$url": # key that identifies the Path Item Object
<PathItemObject>
"$url": # key value used to identify the callback object
"$request.query.queryUrl": # key that identifies the Path Item Object
<PathItemObject>
"$url": # key that identifies the Path Item Object
<PathItemObject>This makes no sense to me and I'm assuming it's a bug. Reading through #1141, I think that the intention was to make this example valid
callbacks:
"foo":
<CallbackObject>
"bar":
<CallbackObject>but it's not, because the literals "foo", "bar" are not runtime expressions.