OpenAPI-Specification icon indicating copy to clipboard operation
OpenAPI-Specification copied to clipboard

Support UNIX domain sockets for testing APIs

Open tristan957 opened this issue 3 years ago • 0 comments

I have been working on revamping the REST support in our storage engine and have worked on drafting an OpenAPI document during the process. On initialization of our storage engine, we create a UNIX domain socket and spwan a REST server so that users can query information and make requests to the storage engine at runtime outside the normal operation of the main application (MongoDB, for instance).

An example request:

curl -i -X GET --unix-socket /tmp/hse.sock http://localhost/perfc?pretty=true

One of the best features of OpenAPI is that applications that render a document can often allow you to test an API given the servers value. Unfortunately, without a way to specify a UNIX domain socket, the testing portion of the rendered document doesn't work. Even more unfortunately, there is no standard URL scheme for denoting a UNIX domain socket. Discussion has previously taken place here.

Though I have no expectations that this issue will go anywhere, I wanted to bring it up.

tristan957 avatar Aug 30 '22 17:08 tristan957