Building web-based software is the world of creating and using APIs. The de facto standard for web-based APIs is communication by JSON via HTTP. Various standardization efforts for enabling the development of JSON-based applications are being made such as, but are not limited to JSON Schema, JSON: API, and OpenAPI. They provide vocabularies for achieving specific tasks like validating JSON documents and describing APIs. Let’s focus on JSON Schema and an extension for it that we are developing here at Itential called Binding Schema.
JSON Schema is a vocabulary to document JSON data structures and values. With it, JSON documents can be described in a human-readable, machine-comprehendible format, that enables the documentation and validation of JSON documents. JSON Hyper Schema is an extension of the JSON Schema vocabulary used to document a JSON Schema as a hypermedia format. One of its utilities is to describe a RESTful API. This could mean describing an entire API, or only the endpoints for a particular JSON document type. At this point, basic user-agents can be created to produce machine-actions, but these actions still require a developer to make decisions based on the requirements of a particular task. The real value to an automation platform like Itential’s is when user-agents can be created that can perform actions without the need of a developer so that pipelines can be performed autonomously via HTTP communication. In this sense, Binding Schema makes JSON Hyper Schema operational. A user-agent can consume a Binding Schema definition to dynamically create JSON documents between steps in a pipeline.
Here at Itential, one of the uses of JSON Schema is to create reusable forms. Binding Schema can be side-loaded with JSON Schema to dynamically alter and/or validate those forms. Specifically, this means a JSON Schema definition is used to render a form that has static validation via JSON Schema’s validation vocabulary. These forms can contain dynamically populated, or dynamically validated input values by defining a Binding Schema definition. Outside of Itential’s platform, a user would need to write both the JSON Schema and Binding Schema definitions, but using Itential’s JSON Forms tool, these highly powerful forms can be created using a simple drag-and-drop user interface. The user does not need to understand anything about JSON Schema or Binding Schema. Users can use these dynamic forms to capture and communicate data between services.
I hope you enjoyed this high-level introduction on JSON Schema and Binding Schema with simple-use cases for each and how we are using these JSON specifications to build better tools for our customers. JSON Schema can be used for more than creating forms and Binding Schema can be used for more than altering a JSON form with dynamic data. As we keep expanding on the Itential Automation Platform after our recent 2019.2 release and beyond, we continue to see the utility in JSON and the JSON specification as a means of driving future enablement.
(Notice: In its current form, Binding Schema is a work-in-progress specification meaning change to the specification is expected.)
Tags: DevOps JSON Open Source