Record Class ParameterMapping

java.lang.Object
java.lang.Record
io.micronaut.openapi.generator.ParameterMapping
Record Components:
name - The name of the parameter as described by the name field in specification.
location - The location of parameter. Path parameters cannot be mapped, as this behavior should not be used.
mappedType - The type to which the parameter should be mapped. If multiple parameters have the same mapping, only one parameter will be present. If set to null, the original parameter will be deleted.
mappedName - The unique name of the parameter to be used as method parameter name.
isValidated - Whether the mapped parameter requires validation.

public record ParameterMapping(String name, ParameterMapping.ParameterLocation location, String mappedType, String mappedName, boolean isValidated) extends Record
A record that can be used to specify parameter mapping. Parameter mapping would map a given parameter to a specific type and name.
  • Constructor Details

    • ParameterMapping

      public ParameterMapping(String name, ParameterMapping.ParameterLocation location, String mappedType, String mappedName, boolean isValidated)
      Creates an instance of a ParameterMapping record class.
      Parameters:
      name - the value for the name record component
      location - the value for the location record component
      mappedType - the value for the mappedType record component
      mappedName - the value for the mappedName record component
      isValidated - the value for the isValidated record component
  • Method Details

    • doesMatch

      public boolean doesMatch(org.openapitools.codegen.CodegenParameter parameter)
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • location

      Returns the value of the location record component.
      Returns:
      the value of the location record component
    • mappedType

      public String mappedType()
      Returns the value of the mappedType record component.
      Returns:
      the value of the mappedType record component
    • mappedName

      public String mappedName()
      Returns the value of the mappedName record component.
      Returns:
      the value of the mappedName record component
    • isValidated

      public boolean isValidated()
      Returns the value of the isValidated record component.
      Returns:
      the value of the isValidated record component