-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Big thoughts for 4.0 #2925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Bear with me on this one as it is not a change to the OAS per se, but a potential change in the way the spec or what may become specs (or types of extensions) are organized. It’s groundhog day for me with this recurring lifecycle of the evolution of specs and languages from simple, to addressing more complex but needed capabilities, to “the spec is too complex and hard to understand, let’s start over”. I started in 360 assembler and 6 bit line protocols (P1024B to be specific) and everything since. Yes, some fundamental changes since then like moving away from SMP and procedural compute models to the current forms of shared nothing which has been huge value. But so many mistakes repeated again and again. I will also note that I view things more from an IT leader managing thousands of developers on hundreds of projects. The real world needs to run a successful and profitable IT shop. The need for velocity and predictability of outcome (quality, function, time to market, etc.). Specs are used by developers to solve a point problem. Standards are enforced by IT leaders when they lead to real business value. One of those concerns is watching increasing use of schema as a programming language. Embedded business logic in what was intended to be CRUD messages to a discreet business object. This has always happened before hence nothing new, however it leads to a lot of instability, complexity and cost. Note that I am not suggesting we start taking things out of the spec to avoid improper or at least unadvisable use. My suggested change is in what we can do to help the community not shoot themselves in the foot quite so easily. In programming languages we are all used to the migration to higher level languages. The benefit being providing a format where average developers can express the business functions needed and let a complier produce the runtime. There was always the ability to drop back into a lower level language for edge cases. There are tools out there doing this or at least moving towards the same for schema. I said schema instead of JSON or anything specific as hopefully the tools are not tightly bound to any one instance of a format. My change is for OAI to overtly support this trend. Attack simplification by helping any tool provider coming up with a better way for developers to describe the 90% of the business needs at the API level and get developers away from manually updating schema. Compliers and similar approaches can do a lot better at leveraging the OAS to meet business needs with a lot fewer mistakes, faster to market, less fragile, hence lower costs. What can we do that makes it easier for a tool supplier providing a simpler interface to produce OAS compliant documentation? A means that negates the need for manually updating and managing JSON schema? This would still be API first, just not at a level so error prone. As a refence point I recently ran a large development shop using SAFe coupled with model driven development. The business objects and services defined in the model. A complier produced .xsd and OAS 3.0 where there was little need or opportunity for anyone to touch the schema. One service definition in the model could begat numerous (100s even) of resource names (APIs deployed). Didn’t care about the number of APIs as wasn’t trying to manage individual schema or even crazier, snippets of schema. There was no need to make omnibus APIs to save on development work. Who needs multipath statements when I can just define another facet of the model for the unique need of each path? My point being left shifting the development work away from working at the schema level works. A simpler schema is not the answer. It’s how can average developers define business objects together with what actions are to be taken against them. Then let tooling produce the needed artifacts to deploy using a spec such as OAS 3.1. |
I 100% agree with this. The salient API-first approaches still concentrate on the primacy of the OpenAPI document as the vehicle for specification development, which is what many developers rally against from a code-first perspective. Being able to drive this from a common modelling approach, which is still API-first but removes the dependency on the OpenAPI document would be a big boost. The modelling approach would help drive the API specification, which then drives the code. That extra layer of abstraction would be really helpful for lots of folks, and allow for commonality in tooling on how to drive it. |
"Merge" with AsyncAPI in order to have one (and only one) specification language (and therefore, hopefully, ecosystem of tools) to define/document both synchronous (request-response) communication patterns and asynchronous (publish-subscribe) communication patterns for APIs. |
Remove the |
I18n |
I'm not sure adding a We have many GET/DELETE operations requiring custom headers in the Request and it's not currently possible to reuse my components/headers in these operations because a headers map doesn't exist on the operation object and we don't allow request bodies on these operations. |
|
I've raised this on slack, so I guess I should raise it here as well:
|
Which reminds me, we can apply media types to the entire query string. The one that everyone thinks is "standard" (but is not actually part of RFC 3986 at all) is Furthermore, doing so allows use of the To address some of @karenetheridge 's concerns about This could either be a hybrid thing like using JSON Schema's |
Consider flattening the responses object to an array that uses pattern matching to define the corresponding response object. /pet:
get:
responses:
- criteria:
status: '200'
mediaType: application/json
conditions:
"$/response/body#/petType": dog
"$/request.path.format": json
description: Success
schema:
type: object
properties:
name:
type: string
barkVolume:
type: number This would significantly reduce the nesting for simple API designs, provide support for more sophisticated interactions. It would allow mapping request values to specific responses, which is a common feature request. |
We would like to take an opportunity to discuss what might be some big, radical changes that could be done in a 4.0 version that would address issues with OAS that we have not been able to address with past changes.
Let us know what major changes you think would make a significant improvement to the way you describe your APIs.
The text was updated successfully, but these errors were encountered: