Record Class Path

java.lang.Object
java.lang.Record
org.infinispan.rest.framework.openapi.Path
Record Components:
path - A required property. The relative path (starting with `/`) to an individual endpoint.
method - A required property holding the HTTP method information.
All Implemented Interfaces:
Comparable<Path>, JsonSerialization

public record Path(String path, Method method, Operation operation) extends Record implements JsonSerialization, Comparable<Path>
Holds information about the relative paths and operations.

This class holds information about each path and parameters. Holding all the information necessary to recreate the tree of objects defined in the schema without additional objects.

See Also:
  • Constructor Details

    • Path

      public Path(String path, Method method, Operation operation)
      Creates an instance of a Path record class.
      Parameters:
      path - the value for the path record component
      method - the value for the method record component
      operation - the value for the operation record component
  • Method Details

    • toJson

      public Json toJson()
      Specified by:
      toJson in interface JsonSerialization
    • compareTo

      public int compareTo(Path o)
      Specified by:
      compareTo in interface Comparable<Path>
    • equals

      public 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.
    • hashCode

      public 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
    • 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
    • path

      public String path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • method

      public Method method()
      Returns the value of the method record component.
      Returns:
      the value of the method record component
    • operation

      public Operation operation()
      Returns the value of the operation record component.
      Returns:
      the value of the operation record component