REST API Compatibility Verification via REST Chart Path Analysis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Maintaining backward compatibility of REST APIs is challenging due to significant changes in new versions, requiring manual and largely manual approaches that lack automated tools to determine compatibility and necessary code changes.
Innovation Solution
An automated method using REST Charts, modeled as Colored Petri Nets, to determine compatibility between different versions of REST APIs by identifying compatible paths and sanction relations, allowing for the identification of changes required for client code to work with new API versions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Extent of automation
If manual approaches are used to determine REST API compatibility, then developers can mentally figure out compatibility, but the process is time-consuming and lacks automated tools
Solution Approach 1:
The patent replaces manual mental verification with an automated computer-based system that uses REST Charts and pathfinding algorithms to automatically determine API compatibility, eliminating the need for developers to manually analyze compatibility
Solution Approach 2:
The system performs self-verification by automatically analyzing REST Charts, identifying compatible paths, and determining compatibility without requiring human intervention in the verification process itself
2Loss of information
If automated test suites are run to determine client compatibility, then test execution is automated, but the tests cannot explain why failures occur or how to fix them
Solution Approach 1:
The patent provides feedback by analyzing why tests fail and generating specific guidance on how to fix them. The system identifies the root causes of compatibility issues and suggests concrete changes needed in client code, transforming automated testing into an informative process
Solution Approach 2:
The REST Chart serves as an intermediary model that bridges the gap between API versions. It provides a structured representation that enables both automated testing and explanatory analysis, allowing the system to reason about failures and generate fix suggestions
3Adaptability or versatility
If REST APIs evolve with new versions containing significant changes, then API functionality is enhanced, but backward compatibility becomes difficult to maintain
Solution Approach 1:
The patent segments the REST API into a graph structure with nodes representing resources and edges representing relationships. This segmentation allows the system to identify which parts of the API have changed between versions and which parts remain compatible, enabling selective adaptation
Solution Approach 2:
The system dynamically analyzes the REST Charts of different API versions to identify compatibility paths. It adapts the client code recommendations based on the specific changes detected in each version, providing dynamic guidance for maintaining compatibility during evolution
Data Source
AI summary
Various disclosed embodiments include methods and systems for determining whether representational state transfer (REST) application programming interfaces (APIs) are compatible. A method is performed by a processing system that includes a processor. The method comprises obtaining a first REST Chart describing a first version of a REST API and obtaining a second REST Chart describing a second version of a REST API. The method comprises determining whether the first version and the second version are compatible using the first REST Chart and the second REST Chart by determining whether a compatible path exists between the first REST Chart and the second REST Chart.


