unit icon indicating copy to clipboard operation
unit copied to clipboard

OpenAPI service discovery document

Open skybert opened this issue 9 months ago • 0 comments

Hi there,

accessing the root document of Unit returns a proprietary JSON document describing the service(s):

$ curl --unix-socket /var/run/control.unit.sock http://localhost/

I would suggest adding support for OpenAPI, either as a replacement for the current format or as an additional /openapi.json endpoint.

This has some good properties, including:

  • It's a well understood and documented service discovery format
  • It lets you add documentation to the returned service discovery document.
  • It's possible to generate clients for it for many languages, even a BASH client with auto-completion.

Cheers,

-Torstein

skybert avatar Sep 22 '23 14:09 skybert