Class OperationMap
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
,Operation> NavigableMap<String,
,Operation> SortedMap<String,
Operation>
The OperationMap is a specialized TreeMap that represents the operations available on a single path in Swagger 2.0. It forces entries to be sorted in a specific order to ensure consistent output. This map is used within PathItem objects to define the HTTP methods and their corresponding operations.
Swagger Specification:
The OperationMap represents the operations field in a Path Item Object, where each key is an HTTP method and each value is an Operation object. The supported HTTP methods are:
get (Operation
) - A definition of a GET operationput (Operation
) - A definition of a PUT operationpost (Operation
) - A definition of a POST operationdelete (Operation
) - A definition of a DELETE operationoptions (Operation
) - A definition of an OPTIONS operationhead (Operation
) - A definition of a HEAD operationpatch (Operation
) - A definition of a PATCH operation
Forces entries to be sorted in the following order:
GET PUT POST DELETE OPTIONS HEAD PATCH - Everything else.
Example:
See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.TreeMap
ceilingEntry, ceilingKey, clear, clone, comparator, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, merge, navigableKeySet, pollFirstEntry, pollLastEntry, putAll, putIfAbsent, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
-
Constructor Details
-
OperationMap
public OperationMap()Constructor.
-
-
Method Details
-
put
Override put to normalize keys to lowercase. -
append
Fluent-style put method.- Parameters:
httpMethodName
- The HTTP method name.operation
- The operation.- Returns:
- This object.
-