public interface Paths extends Constructible, Extensible<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.
Modifier and Type | Method and Description |
---|---|
Paths |
addPathItem(java.lang.String name,
PathItem item)
Adds the given path item to this Paths and return this instance of Paths
|
default PathItem |
getPathItem(java.lang.String name)
Returns a path item for a given name.
|
java.util.Map<java.lang.String,PathItem> |
getPathItems()
Returns a copy map (potentially immutable) of the path items.
|
default boolean |
hasPathItem(java.lang.String name)
Check whether a path item is present in the map.
|
void |
removePathItem(java.lang.String name)
Removes the given path item to this Paths.
|
void |
setPathItems(java.util.Map<java.lang.String,PathItem> items)
Set the path items map to this Paths
|
addExtension, extensions, getExtensions, removeExtension, setExtensions
Paths addPathItem(java.lang.String name, PathItem item)
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.void removePathItem(java.lang.String name)
name
- a path name that will be removed.java.util.Map<java.lang.String,PathItem> getPathItems()
void setPathItems(java.util.Map<java.lang.String,PathItem> items)
items
- a map containing the list of paths. Keys MUST begin with a slash.default boolean hasPathItem(java.lang.String name)
getPathItems().containsKey(name)
name
- a path name in the format valid for a Paths object.default PathItem getPathItem(java.lang.String name)
getPathItems().get(name)
name
- a path name in the format valid for a Paths object.