-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Although we don't need use it internally, we can export to OpenAPI (we just can't import from it). The OpenAPI people have registered media types, so we can detect when that media type is requested (just as we return an HTML document for the media type text/html). An example of an OpenAPI media types is:
application/openapi+yaml;version=3.1
The benefit of doing this is that we can include an export to OpenAPI feature for our APIs so that they can be used with third-party tooling more easily. Again, it doesn't require that we use it internally: it's merely a convenience for people building against our APIs. For example, I was playing around with the Insomnia tool for purposes of doing a demo video, and it has a button for importing an OpenAPI description. Rather than configure each endpoint I could just import the API definition.