Enum Class HttpVerb
- All Implemented Interfaces:
Serializable,Comparable<HttpVerb>,Constable
HTTP verb exposed by a Spring MVC endpoint or described by an OpenAPI operation.
ANY is a controller-only concept: it represents a Spring
@RequestMapping that does not restrict the method attribute, and is
therefore reachable through every HTTP verb. It never appears on the OpenAPI side,
since every OpenAPI operation is described under one concrete verb.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpVerbfromSpringRequestMethod(String springRequestMethodName) Resolves theHttpVerbmatching a SpringRequestMethodenum constant name (e.g.static HttpVerbReturns the enum constant of this class with the specified name.static HttpVerb[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GET
-
HEAD
-
POST
-
PUT
-
PATCH
-
DELETE
-
OPTIONS
-
TRACE
-
ANY
Matches any concrete verb; used for Spring mappings that do not restrict the verb.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
fromSpringRequestMethod
Resolves theHttpVerbmatching a SpringRequestMethodenum constant name (e.g."GET"), as found on a@RequestMapping(method = ...)attribute.- Parameters:
springRequestMethodName- the simple name of theRequestMethodconstant- Returns:
- the matching verb
- Throws:
IllegalArgumentException- if the name is not a recognised HTTP verb
-