Object Validator

  • All Implemented Interfaces:

    
    public class Validator
    
                        

    Utility for validating JSON payloads against predefined schemas.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static Validator INSTANCE
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit validate(JsonNode jsonMessage, String schemaName) Validates a JSON message against a predefined schema.
      final Unit validateMessage(Message message) Validate a message against a predefined schema
      final Unit validateData(Data data, String messageKind) Validate message data or resource data against a predefined schema
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • validate

         final Unit validate(JsonNode jsonMessage, String schemaName)

        Validates a JSON message against a predefined schema.

        Parameters:
        jsonMessage - The JSON message to validate.
        schemaName - The name of the schema to use for validation.
      • validateMessage

         final Unit validateMessage(Message message)

        Validate a message against a predefined schema

        Parameters:
        message - The message data to validate.
      • validateData

         final Unit validateData(Data data, String messageKind)

        Validate message data or resource data against a predefined schema

        Parameters:
        data - The message or resource data to validate.
        messageKind - The message or resource kind of the data.