You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that @CallbackOperationand the proposed @Webhook represent a map entry where the value is a PathItem, so these annotations could have a ref property added.
Thought about this again and I'm less sure. The mapping from annotations to model objects isn't straightforward.
@Callback represents one entry in the map inside the Callback object (a pair of callbackUrlExpression and CallbackOperation[])
@CallbackOperation represents one entry in the map inside the PathItem object (a pair of method and Operation)
@Webhook represents one entry in the webhooks map, inside the OpenAPI object (a pair of name and CallbackOperation[])
I guess @CallbackOperation[] is the part that maps well onto a PathItem object and since that's an array rather than an object, it can't have a ref property.
You could argue that @Callback could have a ref to a PathItem, but it already has a ref property used to reference a Callback. It could have a new property used to reference a PathItem.
I think a new @Webhook annotation could have a ref.
Second complication: not only is a reference to a Path Item permitted in a Callback, a Webhook and in Components.pathItems, but Path Item itself has a $ref field which can be used alongside any other fields (unlike $ref in a reference object).
In the current 3.1 dev branch, using $ref alongside other fields is deprecated but still allowed, so I guess we should allow this, at least in the model API. I've added this to the list in the first comment.
In order to support OpenAPI 3.1.0 (see #333) we need the PathItem to support
$ref
.Reference: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#componentsObject
Example (to be verified):
To be added:
Reference
.ref
can be set alongside other fields inPathItem
The text was updated successfully, but these errors were encountered: