Repository navigation
Replies: 2 comments 2 replies
@smikulcik are you able to add a concrete example to this discussion of how Overlay can be improved in the "change set" guise described above? I understand the discussion above well enough, but without a concrete example of a "what if we did this" feature, its hard to understand how Overlay can morph from transformation layer to change set. |
|
Thanks for writing this up, @smikulcik. I think you're pointing at something real, and I want to add a perspective from the other side of the table, since my use of Overlays is almost entirely against OpenAPI documents I don't own. I maintain a catalog of public APIs, and Overlays are how I add to provider contracts without forking them. As of today that's 28,652 Overlay documents across 3,776 providers. 185,707 of their actions are I think the purpose of the spec is already in the name: Over-lays. You lay something over a document that stays as it is underneath. So I'd put it a third way: an overlay is a layer, not a diff and not a script. Your example shows why it beats the script. The value isn't only that it's repeatable; it's that the intent sits next to the document in a vocabulary anyone can review, without touching the source. And it's why an overlay isn't a diff: one target like On
I'd support (1) in the document, with the semantics that make it hold. I'd treat (2) as what @baywet called "the behaviour of the tool": a strict or report mode where the tool tells you an On the purpose statement, I wouldn't rewrite it, either toward "change sets" or anything else. OpenAPI got where it is by solving problems nobody listed at the start, and I suspect Overlays will too. What I'd find more useful than a new definition is naming the things Overlays will never try to do — no string interpolation, no logic, no new formats, nothing a vendor couldn't implement in an afternoon — and treating everything inside that line as fair game. That bounds it without nailing it down. Where I fully agree with you is that the community needs a way to describe API change. I just don't think Overlays should be bent into that shape. Change deserves its own specification. I'd sign on today to an OAI SIG for something like OverDiffs, or OverChange: a format for describing what changed between two OpenAPI descriptions, and why. I'd support it in my own APIs. APIs.io already compares providers side by side and reports what changed across the catalog since a given date, and a standard change format is exactly what those responses should return. Your five characteristics of a good change format would be a strong start on a charter for it: complete, well-defined, nuanced, understandable, concise. In the meantime, those same five make great authoring guidance for Overlays. I'd love to see them on the learn site, with worked examples of overlays whose descriptions explain the change. That gets people writing better overlays now without asking anything new of the tools. And the tools are the reason this works at all. Overlays are small enough that nearly every OpenAPI tool supports them, which is why I can rely on them across thousands of providers. Every new failure mode is a cost every one of those implementations has to pay, and I'd rather keep the thing that's everywhere. Happy to share real overlays from the catalog as test cases for either version of |
Uh oh!
There was an error while loading. Please reload this page.
On the overlays SIG meeting today, we had an interesting conversation w.r.t. the “add” operator (#132 (reply in thread)).
Notes from today:
jqworks. Given an input JSON document, ajqfilter can produce a variety of output formats. Though,jqcan fail at times if the input document doesn’t match up with filter expectations.I think our purpose statement is short-sighted: Section 2. Introduction
If the goal were to describe repeatable transformations, I’d say simple scripts would be better at describing and applying a change in a repeatable fashion. To me, the real value of overlays is in it’s ability to communicate a change to an OAD. Having a limited-vocabulary change descriptor helps make it easier to understand.
As far as repeatable transformations go, the script is extensible, deterministic, testable, well supported, composable, and many developers quickly understand what the logic does. To understand what the overlay does, the reader must understand the structure of OpenAPI documents, this Overlay yaml format, JSONPath semantics, and the specifics on the base OAD on which this overlay is applied.
I point this example out not to belittle the utility of the overlay document. Rather, I wish to reposition the overlay as a change set with the purpose of fostering a clearer understanding of API changes.
For a human to understand OpenAPI semantics, sure, they must appreciate the structure of the base OpenAPI document. When we start comparing specs to each other, now we have 2 documents with many difference formats to choose from: git-diffs, JSON Patch, JSON Merge-Patch, etc. To make sense of what and OpenAPI document change actually means, it takes quite some experience in understanding how
$refworks, JSON Schemas, URI ecosystems, etc.We have a real need in our community to teach people how to explain API changes.
A good change format has at least these characteristics
Frankly, the existing Overlay document meets many of these characteristics as it is.
descriptionproperties and schema extensionscopy, etc. These drastically cut down on the number of lines to understand to enable complexity to be expressed concisely.If overlays are to be limited to transformers focused on repeatability, they will only be useful as far as a lightweight automation DSL.
We still have the need in the community to express API change-sets in a way that fosters broader change understanding. I want to empower tooling vendors to automate the explanation of an API change across modalities to strengthen the foundational relationships between service providers and consumers. All of that starts at the interface description layer (OpenAPI) and how we evolve that relationship over time (Change-sets -- hopefully Overlays).
Related conversation
All reactions