Validation Abstraction


Service API Patterns, Protocols, Coupling Types, Metrics > Service API Management Patterns > Validation Abstraction

 

Validation Abstraction

How can service APIs be designed to more easily adapt to validation logic changes?

Service APIs that contain detailed validation constraints become more easily invalidated when the rules behind those constraints change. When underlying business rules or requirements (upon which some of the validation constraints may be based) change, it may not be possible to make the corresponding changes to the established API without releasing a new version. New API versions introduce governance burden, especially with agnostic services that have many consumers.

With the application of the Validation Abstraction pattern, there may be opportunities to decrease the constraint granularity of API capabilities depending on the nature of the message data being exchanged. This leads to a reduction in the quantity and restrictiveness of validation logic embedded in the service API by deferring select validation constraints elsewhere. The less validation logic in the API, the lower the risk of the API being impacted by overarching business changes. Therefore, the potential longevity of a service API is extended.

 

 

 

 

 

 

 

 

By reducing the overall quantity of constraints and especially filtering out those more prone to change, the longevity of a service API can be extended.

Module 12: Fundamental Service API Design & Management

This pattern is covered in Module 13: Advanced Service API Design & Management.

For more information regarding service API design & management courses and accreditation, visit the Service API Specialist program page.