Interface Paths
- All Superinterfaces:
Constructible
,Extensible<Paths>
,Map<String,
PathItem>
Paths
Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the Server Object in order to construct the full URL. The Paths MAY be empty, due to security constraints.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddPathItem
(String name, PathItem item) Adds the given path item to this Paths and return this instance of Pathsboolean
containsKey
(Object key) Deprecated.since 1.1Deprecated.since 1.1default PathItem
getPathItem
(String name) Returns a path item for a given name.Returns a copy map (potentially immutable) of the path items.default boolean
hasPathItem
(String name) Check whether a path item is present in the map.Deprecated.since 1.1void
Deprecated.since 1.1Deprecated.since 1.1void
removePathItem
(String name) Removes the given path item to this Paths.void
setPathItems
(Map<String, PathItem> items) Set the path items map to this PathsMethods inherited from interface org.eclipse.microprofile.openapi.models.Extensible
addExtension, extensions, getExtensions, removeExtension, setExtensions
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsValue, entrySet, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, values
-
Method Details
-
addPathItem
Adds the given path item to this Paths and return this instance of Paths- Parameters:
name
- a path name in the format valid for a Paths object. The field name MUST begin with a slash.item
- the path item added to the list of paths. null values will be rejected (implementation will throw an exception) or ignored.- Returns:
- the current Paths instance
-
removePathItem
Removes the given path item to this Paths.- Parameters:
name
- a path name that will be removed.
-
getPathItems
Returns a copy map (potentially immutable) of the path items.- Returns:
- all items
-
setPathItems
Set the path items map to this Paths- Parameters:
items
- a map containing the list of paths. Keys MUST begin with a slash.
-
hasPathItem
Check whether a path item is present in the map. This is a convenience method forgetPathItems().containsKey(name)
- Parameters:
name
- a path name in the format valid for a Paths object.- Returns:
- a boolean to indicate if the path item is present or not.
-
getPathItem
Returns a path item for a given name. This is a convenience method forgetPathItems().get(name)
- Parameters:
name
- a path name in the format valid for a Paths object.- Returns:
- the corresponding path item or null.
-
get
Deprecated.since 1.1In the next version,Paths
will no longer extendsMap
, this method will no longer be present. UsegetPathItem(String)
instead. -
containsKey
Deprecated.since 1.1In the next version,Paths
will no longer extendsMap
, this method will no longer be present. UsehasPathItem(String)
instead.- Specified by:
containsKey
in interfaceMap<String,
PathItem>
-
put
Deprecated.since 1.1In the next version,Paths
will no longer extendsMap
, this method will no longer be present. UseaddPathItem(String, PathItem)
instead. -
putAll
Deprecated.since 1.1In the next version,Paths
will no longer extendsMap
, this method will no longer be present. UsesetPathItems(Map)
instead. -
remove
Deprecated.since 1.1In the next version,Paths
will no longer extendsMap
, this method will no longer be present. UseremovePathItem(String)
instead.
-