Record Class OpenapiContract.Resolution.MethodNotAllowed

java.lang.Object
java.lang.Record
ch.nexsol.gateway.validation.OpenapiContract.Resolution.MethodNotAllowed
Record Components:
template - the path template that matched
allowedMethods - the methods the contract declares for that path
All Implemented Interfaces:
OpenapiContract.Resolution
Enclosing interface:
OpenapiContract.Resolution

public static record OpenapiContract.Resolution.MethodNotAllowed(String template, Set<String> allowedMethods) extends Record implements OpenapiContract.Resolution
The contract declares the path but not for this method.
  • Constructor Details

    • MethodNotAllowed

      public MethodNotAllowed(String template, Set<String> allowedMethods)
      Creates an instance of a MethodNotAllowed record class.
      Parameters:
      template - the value for the template record component
      allowedMethods - the value for the allowedMethods record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • template

      public String template()
      Returns the value of the template record component.
      Returns:
      the value of the template record component
    • allowedMethods

      public Set<String> allowedMethods()
      Returns the value of the allowedMethods record component.
      Returns:
      the value of the allowedMethods record component