What principles can we define to help identify priorities? #13
Replies: 2 comments 9 replies
-
I see some additional principles that may be orthogonal to those @earth2marsh cited but worth considering when making decisions:
|
Beta Was this translation helpful? Give feedback.
-
@earth2marsh, thank you for raising this. I think it's a very important topic, but also an extremely challenging one. I haven't been able to track with all the conversations happening in the OpenAPI community for the past few years, but I've been working with OpenAPI every day and (thanks to @mkistler) do have a sense of some of the bigger debates (in addition to the pain points I've experienced myself). You'll have to forgive me if some of what I say is obvious or settled — I'll try to catch up. I suspect we'll have a lot of trouble coming up with a comprehensive set of personas and a simple conflict resolution litmus test. And — maybe it goes without saying — I think we'll always need wise and empathetic leadership to balance conflicting needs. But just because we can't make decisions automatically doesn't mean we can't start closing the gap between the high-level values described for OpenAPI and the way concrete decisions about 4.0 are made. I think doing so is important in order to make decisions more consistent, give us a shared compass, and frame debates as good-faith efforts to achieve shared objectives. Existing valuesA few things stand out as a starting point for this in the OAI charter. First, in the mission statement:
And then in a few of the core values:
Finally, OpenAPI itself says:
ObjectiveI propose that the overall goal should be to make as many API stakeholders as possible able and content to use OpenAPI, even if that means OpenAPI is not fit for use or ideal for the maximum number of users possible. I enjoyed an analytical framework @jgeewax describes in his book, API Design Patterns, for a similarly over-constrained problem: API versioning and compatibility. JJ looks at how a few different approaches balance a tradeoff he terms "happiness vs. ubiquity." This tradeoff, JJ explains, is about how the decisions you make distribute your users into four camps:
I think this is a useful way to frame tradeoffs for engineering decisions — in general — that have a lot of stakeholders. JJ explains if you try to optimize for the maximum number of happy users (for OpenAPI, this might be on the extreme end of "more opinionated but less expressive"), you'll end up with a large cannot use camp. Whereas if you try to eliminate cannot use (perhaps on the extreme end of "more expressive and less opinionated"), you'll probably end up with a dominant mad camp. One might use these last two examples, respectively, as a perspective on why ideologically pure REST/HATEOAS (interesting and exciting, but unsuitable for many use cases) and SOAP/XML/WSDLs (extremely powerful, but miserable to use) lost out to "pragmatic REST" and JSON/OpenAPI. (Though I know no one here is short on their own perspectives on this history — especially not Marsh.) The proposal then is to sacrifice maximum possible ubiquity and maximum possible happiness for the greatest proportion of users in the combined okay and happy camps. Possible improvementsI see a couple of potential avenues for expanding on the existing values and proposed objective. Use casesTo make decisions more consistent and hedge against a specific decision failing to consider a use case, we might want to weigh any significant decisions against a predefined set of use cases. For example, we might break down use cases as:
One possible approach to make sure major decisions are considered against impact to each use case would be to assign one or more designated representatatives to each area, and ensure one representative per area is asked to weigh in on every major decision. (Not in any way as a replacement for the TSC — I would still expect generalists on the TSC to mediate conflicting interests and make final decisions.) Because of the existing collaborative value that [all] interested parties can freely contribute ideas, we would still want to default to considering any additional use cases anyone brought to the table. OpinionsI'm sure there's been much discussion in the past on how opinionated OpenAPI should be. It seems like we could almost reverse-engineer a consensus from what's made OpenAPI successful, and make it an official position. Perhaps something like:
ScopeI think it would be beneficial to hone in the scope of what OpenAPI definitions really describe. In particular, I am not sure if all the design decisions in OpenAPI are consistent with an overall philosophy that an OpenAPI document specifies some subset of behavior a client may observe. HTTP may tie our hands with respect to OpenAPI being a comprehensive contract for status codes or headers (since HTTP itself says that clients should handle all status codes and consider unrecognized headers valid by default). But when it comes to properties and parameters, it's unclear what OpenAPI is really saying if it doesn't define a parameter or sets Practical considerationsWith all that said, I think if we must pick a persona to prioritize, it has to be the API definition author. Why not consumers? I figure all the stakeholders who show up to these discussions will be doing their best to make consumers happy in the best way they know how, whereas the pure consumer probably won't show up at all to directly guide OpenAPI's evolution. And if API definition authors don't understand what they need to communicate to consumers, OpenAPI can't fix that. My reasoning is pretty straightforward: for anyone to use OpenAPI, someone has to write OpenAPI definitions. So making authorship approachable, powerful, and moderately pleasant seems like the only way to avoid irrelevance. You could argue — as some have — that OpenAPI should be relegated to an intermediate format generated by code and annotations. To me, it seems clear this is a path to irrelevance, because whatever is the source of truth and lingua franca of APIs will eventually be used to directly generate documentation, client code, etc. Thus, I think if one priority has to be chosen over others, it must be to keep OpenAPI approachable and powerful for those writing and editing definitions. |
Beta Was this translation helpful? Give feedback.
-
With v4 we have a chance to be more specific around priorities, such as:
If we can agree on a handful of these, they may facilitate decisions in the future. If not, we can close and move on.
Beta Was this translation helpful? Give feedback.
All reactions