Skip to content
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

Support OpenAPI Media Type #5

Open
dyoder opened this issue Mar 31, 2023 · 0 comments
Open

Support OpenAPI Media Type #5

dyoder opened this issue Mar 31, 2023 · 0 comments

Comments

@dyoder
Copy link
Contributor

dyoder commented Mar 31, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant