How to define a json-lines response in OpenAPI?

Viewed 189

Is there a way to describe a json-lines with OpenAPI?

Besides the fact that there seems to be no MIME type for it yet, I'm wondering if it's possible to describe such a response.

In theory my response could be an array of objects, but I received the question whether or not I could deliver as json-lines, meaning: just the objects, one per line.

Since I'm using OpenAPI to describe my API I'm puzzled as how to describe this response. I could simply define the response as being of type "string", but this is not very helpful for readers of my API spec.

0 Answers
Related