org.eclipse.microprofile.openapi.models

## Interface Paths

All Superinterfaces:
  Constructible, Extensible<Paths>, Map<String,PathItem>

    public interface Paths
    extends 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:
  OpenAPI Specification Paths Object

### Nested Class Summary

### Nested classes/interfaces inherited from interface java.util.Map

`Map.Entry<K,V>`

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
`Paths` `addPathItem(String name, PathItem item)` Adds the given path item to this Paths and return this instance of Paths
`boolean` `containsKey(Object key)` Deprecated. since 1.1
`PathItem` `get(Object key)` Deprecated. since 1.1
`default PathItem` `getPathItem(String name)` Returns a path item for a given name.
`Map<String,PathItem>` `getPathItems()` 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.
`PathItem` `put(String key, PathItem value)` Deprecated. since 1.1
`void` `putAll(Map<? extends String,? extends PathItem> m)` Deprecated. since 1.1
`PathItem` `remove(Object key)` Deprecated. since 1.1
`void` `removePathItem(String name)` Removes the given path item to this Paths.
`void` `setPathItems(Map<String,PathItem> items)` Set the path items map to this Paths

### Methods 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 Detail

#### addPathItem

    Paths addPathItem(String name,
                      PathItem item)

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

    void removePathItem(String name)

Removes the given path item to this Paths.

Parameters:
  `name` - a path name that will be removed.

#### getPathItems

    Map<String,PathItem> getPathItems()

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

Returns:
  all items

#### setPathItems

    void setPathItems(Map<String,PathItem> items)

Set the path items map to this Paths

Parameters:
  `items` - a map containing the list of paths. Keys MUST begin with a slash.

#### hasPathItem

    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` - 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

    default PathItem getPathItem(String name)

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

Parameters:
  `name` - a path name in the format valid for a Paths object.
Returns:
  the corresponding path item or null.

#### get

    @Deprecated
    PathItem get(Object key)

Deprecated. since 1.1
In the next version, `Paths` will no longer extends `Map`, this method will no longer be present. Use `getPathItem(String)` instead.

Specified by:
  `get` in interface `Map<String,PathItem>`

#### containsKey

    @Deprecated
    boolean containsKey(Object key)

Deprecated. since 1.1
In the next version, `Paths` will no longer extends `Map`, this method will no longer be present. Use `hasPathItem(String)` instead.

Specified by:
  `containsKey` in interface `Map<String,PathItem>`

#### put

    @Deprecated
    PathItem put(String key,
                             PathItem value)

Deprecated. since 1.1
In the next version, `Paths` will no longer extends `Map`, this method will no longer be present. Use `addPathItem(String, PathItem)` instead.

Specified by:
  `put` in interface `Map<String,PathItem>`

#### putAll

    @Deprecated
    void putAll(Map<? extends String,? extends PathItem> m)

Deprecated. since 1.1
In the next version, `Paths` will no longer extends `Map`, this method will no longer be present. Use `setPathItems(Map)` instead.

Specified by:
  `putAll` in interface `Map<String,PathItem>`

#### remove

    @Deprecated
    PathItem remove(Object key)

Deprecated. since 1.1
In the next version, `Paths` will no longer extends `Map`, this method will no longer be present. Use `removePathItem(String)` instead.

Specified by:
  `remove` in interface `Map<String,PathItem>`