Enum Class HttpVerb

java.lang.Object
java.lang.Enum<HttpVerb>
com.arc_e_tect.gradle.shadow.model.HttpVerb
All Implemented Interfaces:
Serializable, Comparable<HttpVerb>, Constable

public enum HttpVerb extends Enum<HttpVerb>
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.

  • Enum Constant Details

    • GET

      public static final HttpVerb GET
    • POST

      public static final HttpVerb POST
    • PUT

      public static final HttpVerb PUT
    • PATCH

      public static final HttpVerb PATCH
    • DELETE

      public static final HttpVerb DELETE
    • OPTIONS

      public static final HttpVerb OPTIONS
    • TRACE

      public static final HttpVerb TRACE
    • ANY

      public static final HttpVerb ANY
      Matches any concrete verb; used for Spring mappings that do not restrict the verb.
  • Method Details

    • values

      public static HttpVerb[] 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

      public static HttpVerb valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • fromSpringRequestMethod

      public static HttpVerb fromSpringRequestMethod(String springRequestMethodName)
      Resolves the HttpVerb matching a Spring RequestMethod enum constant name (e.g. "GET"), as found on a @RequestMapping(method = ...) attribute.
      Parameters:
      springRequestMethodName - the simple name of the RequestMethod constant
      Returns:
      the matching verb
      Throws:
      IllegalArgumentException - if the name is not a recognised HTTP verb