Interface Callback
- All Superinterfaces:
Constructible
,Extensible
,Map<String,
,PathItem> Reference<Callback>
public interface Callback
extends Constructible, Extensible, Reference<Callback>, Map<String,PathItem>
Callback
A map of possible out-of-band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. 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.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddPathItem
(String name, PathItem pathItem) Adds the given PathItem to this Callback's list of PathItems using the string as its key.Methods inherited from interface org.eclipse.microprofile.openapi.models.Extensible
addExtension, getExtensions, setExtensions
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Method Details
-
addPathItem
Adds the given PathItem to this Callback's list of PathItems using the string as its key. 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. A simple example might be $request.body#/url. However, using a runtime expression the complete HTTP message can be accessed. This includes accessing any part of a body that a JSON Pointer RFC6901 can reference.- Parameters:
name
- a runtime expression that can be evaluated in the context of a runtime HTTP request/responsepathItem
- a path to add to this Callback's list of PathItems- Returns:
- the current Callback instance
-