Class OpenapiValidationProperties.Direction

java.lang.Object
ch.nexsol.gateway.validation.OpenapiValidationProperties.Direction
Enclosing class:
OpenapiValidationProperties

public static class OpenapiValidationProperties.Direction extends Object
Settings of one direction of the exchange.

Deliberately a plain java bean with no parameterised constructor: a single constructor taking the mode would make Spring Boot, and its configuration metadata processor, read this as a value object bound through that constructor — and every other setting here would silently stop being bindable and stop being offered for completion.

  • Constructor Details

    • Direction

      public Direction()
  • Method Details

    • getMode

      public ValidationMode getMode()
      Returns:
      what to do with a message that breaks the contract
    • setMode

      public void setMode(ValidationMode mode)
      Parameters:
      mode - what to do with a message that breaks the contract
    • isValidateBody

      public boolean isValidateBody()
      Returns:
      whether the body is validated
    • setValidateBody

      public void setValidateBody(boolean validateBody)
      Parameters:
      validateBody - whether the body is validated
    • getMaxBodySize

      public org.springframework.util.unit.DataSize getMaxBodySize()
      Returns:
      the largest body that is buffered to be validated
    • setMaxBodySize

      public void setMaxBodySize(org.springframework.util.unit.DataSize maxBodySize)
      Parameters:
      maxBodySize - the largest body that is buffered to be validated
    • isActive

      public boolean isActive()
      Returns whether this direction is validated at all.
      Returns:
      true unless the mode is ValidationMode.OFF
    • isEnforced

      public boolean isEnforced()
      Returns whether a message breaking the contract is rejected.
      Returns:
      true when the mode is ValidationMode.ENFORCE