Top Description Methods
org.eclipse.microprofile.openapi.models

public Interface Paths

extends Constructible, Extensible<Paths>
Imports
java.util.Map

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
OpenAPI Specification Paths Object

Method Summary

Modifier and TypeMethod and Description
public Paths

Returns:

the current Paths instance
addPathItem
(String
a path name in the format valid for a Paths object. The field name MUST begin with a slash.
name
,
PathItem
the path item added to the list of paths. null values will be rejected (implementation will throw an exception) or ignored.
item
)

Adds the given path item to this Paths and return this instance of Paths

public default PathItem

Returns:

the corresponding path item or null.
getPathItem
(String
a path name in the format valid for a Paths object.
name
)

Returns a path item for a given name.

public Map<String, PathItem>

Returns:

all items
getPathItems
()

Returns a copy map (potentially immutable) of the path items.

public default boolean

Returns:

a boolean to indicate if the path item is present or not.
hasPathItem
(String
a path name in the format valid for a Paths object.
name
)

Check whether a path item is present in the map.

public void
removePathItem(String
a path name that will be removed.
name
)

Removes the given path item to this Paths.

public void
setPathItems(Map<String, PathItem>
a map containing the list of paths. Keys MUST begin with a slash.
items
)

Set the path items map to this Paths

Inherited from org.eclipse.microprofile.openapi.models.Extensible:
addExtensionextensionsgetExtensionsremoveExtensionsetExtensions

Method Detail

addPathItemback to summary
public Paths addPathItem(String name, PathItem item)

Adds the given path item to this Paths and return this instance of Paths

Parameters
name:String

a path name in the format valid for a Paths object. The field name MUST begin with a slash.

item:PathItem

the path item added to the list of paths. null values will be rejected (implementation will throw an exception) or ignored.

Returns:Paths

the current Paths instance

getPathItemback to summary
public default PathItem getPathItem(String name)

Returns a path item for a given name. This is a convenience method for getPathItems().get(name)

Parameters
name:String

a path name in the format valid for a Paths object.

Returns:PathItem

the corresponding path item or null.

getPathItemsback to summary
public Map<String, PathItem> getPathItems()

Returns a copy map (potentially immutable) of the path items.

Returns:Map<String, PathItem>

all items

hasPathItemback to summary
public default boolean hasPathItem(String name)

Check whether a path item is present in the map. This is a convenience method for getPathItems().containsKey(name)

Parameters
name:String

a path name in the format valid for a Paths object.

Returns:boolean

a boolean to indicate if the path item is present or not.

removePathItemback to summary
public void removePathItem(String name)

Removes the given path item to this Paths.

Parameters
name:String

a path name that will be removed.

setPathItemsback to summary
public void setPathItems(Map<String, PathItem> items)

Set the path items map to this Paths

Parameters
items:Map<String, PathItem>

a map containing the list of paths. Keys MUST begin with a slash.