Application programming interfaces (APIs) are becoming increasingly prevalent across the industry. At its heart, an API is a means for transferring data between two systems in an interoperable way. While the data that is passed across an API is generally well structured, that structure can be arbitrarily complex. Determining whether or not a set of data is valid is often not straightforward, as there may be complex dependencies between different data items in a set. Writing custom code to perform such a validation is time consuming and prone to error. To address challenges of these types, techniques are presented herein that support a language for expressing complex constraints on YANG (e.g., see the Internet Engineering Task Force (IETF) Request for Comments (RFC) 7950) data that is closely tied to the underlying YANG data model such that the evaluation of the constraints is context-aware and has knowledge of the data model. Aspects of the presented techniques offer a number of benefits including, for example, making the writing of constraints much easier, reducing development costs by enabling checking for many more errors at compile time, increasing quality and security (e.g., by automating input validation and thus avoiding the need to write complex and bug-prone manual validation code), etc.
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.
Ball, David; Chatterjee, Simon; Furness, Richard; and Green, Matthew, "DATA VALIDATION CONSTRAINT LANGUAGES", Technical Disclosure Commons, (August 27, 2021)