API Validation Using JSON Test Scripts

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for validating REST API calls are often obscured by programming language syntax and require cumbersome construction of test data, especially when dealing with JSON, which complicates the intent and behavior of tests.

Innovation Solution

A system and method for validating REST API calls using a computer-readable medium with instructions that parse and execute test scripts in JSON format, allowing direct expression of API inputs and outputs without cumbersome programming language boilerplate, and supporting prototype inheritance for easier reuse and concise testing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If traditional programming language syntax is used for validating REST API calls, then the validation can be performed, but the test construction becomes cumbersome and the intent is obscured

Engineering Contradiction:
Improveease of test constructionVSAvoidcomplexity of test data construction
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The patent introduces JSON as an intermediary format for expressing API inputs and outputs. Instead of using programming language syntax directly, the test data is constructed in JSON format which naturally mirrors the API data structures, making the tests more readable and easier to construct while maintaining validation capability

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent changes the parameter representation from programming language objects to JSON format. This parameter change allows direct expression of API inputs and outputs in a format that matches the actual data being validated, reducing the need for cumbersome construction and improving clarity

Inventive Principle:
Principle #35Parameter changes

2Productivity

If programming language boilerplate is used, then validation logic can be implemented, but the clarity and speed of validation processes are reduced

Engineering Contradiction:
Improvespeed of validationVSAvoidcomplexity of validation logic
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent extracts the essential validation logic from programming language boilerplate and expresses it directly in JSON format. By taking out the unnecessary syntactic overhead, the validation process becomes faster and clearer while maintaining the core validation functionality

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent uses JSON format that copies the structure and semantics of the actual API data being validated. This copying approach eliminates the need for complex mapping and transformation logic, thereby increasing validation speed and reducing complexity

Inventive Principle:
Principle #26Copying

Data Source

PatentUS9552237B2API validation system
Publication Date: 2017.01.24 SAS INSTITUTE INC
  • US9552237B2 patent drawing
  • US9552237B2 patent drawing
  • US9552237B2 patent drawing

AI summary

A system that validates an application programming interface (API) call is provided. A key and a value associated with the key are read from a test script containing a script. The key and the value are separated by a colon. The key is included in first double quotes, and the value is included in second double quotes. Whether the key matches a plurality of keys defined for an API call is determined. Based on the key matching the plurality of keys defined for the API call, the API call is configured using the key and the value without any of the colon, the first double quotes, or the second double quotes. The configured API call is executed.