Service API Patterns, Protocols, Coupling Types, Metrics > Service API Management Patterns > Partial Validation
Partial Validation
How can unnecessary data validation be avoided?
The generic capabilities provided by agnostic services sometimes result in service APIs that impose unnecessary data and validation upon consumer programs. Agnostic services are designed with high reuse potential in mind, and therefore there is a constant emphasis on providing generic capabilities that can accommodate a wide range of possible consumers.
With the application of the Partial Validation pattern, the service consumer is intentionally designed to not fully comply with the service API. Instead, its validation logic is tuned to only look for and validate message data relevant to its needs, thereby ignoring the rest. This reduces consumer processing requirements and decreases the extent to which some consumers need to couple themselves to the service API.
Because the irrelevant data is ignored prior to validation, it is discarded earlier and avoids imposing unnecessary validation-related processing upon the consumer.