Over a million developers have joined DZone.

Diff Tooling For JSON, YAML, and Markdown Versions Of API Definitions

DZone's Guide to

Diff Tooling For JSON, YAML, and Markdown Versions Of API Definitions

Here are some tools for finding differences between all the major formats for API definitions.

· Integration Zone ·
Free Resource

As the number of available API definitions out there grows, I am increasingly coming across variations of APIs that I already have included in my API Stack. It can be tedious to try and sync these with existing copies, so I wanted to take a look and see if there was anything already available out there that would help provide a diff for either OpenAPI Spec, RAML, or API Blueprint.

The most common one I found referenced was a Ruby one for OpenAPI Spec from Civis Analytics. Next, I found a pretty interesting web tool, which provides its Node.js source code on GitHub, including a CLI edition. After these two solutions, I only found one more for RAML, but couldn't find anything for API Blueprint.

I wanted to think beyond just the common API definition formats and look for diff tools that would work just for JSON. I found Diff, which was pretty interesting, as well as DiffSync which provided a real-time diff for JSON. I haven't tried any of them out, I am just trying to compile a list of what is out there before I dive into what their capabilities are.

I have a master database of API definitions where I can just import API definitions that I find, and it will add any new paths, parameters, and schemas it comes across. I would much rather have the ability to just run each version through a diff tool and be able to select which elements I want to have merged. For now, I will just implement a custom layer to my API monitoring system, but I would like to see API diff move forward similar to we saw the conversation evolve with the introduction of API Transformer.

Build and deploy API integrations 7x faster. Try the Cloud Elements 100% RESTful platform for 30 days free. Access your trial here.

api ,rest ,rest api ,ruby ,nodejs ,raml

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}