sttp-openapi-generator
sttp-openapi-generator copied to clipboard
Support text/plain content type
Hi, would it be possible to add support for text/plain content type?
I have endpoints such as this:
/readiness:
get:
operationId: getReadiness
responses:
'200':
description: ''
content:
text/plain:
schema:
type: string
'500':
description: ''
but the generated client is trying to parse the response into json.
def getReadiness(): Request[Either[ResponseException[String, CirceError], Unit], Any] = basicRequest.get(uri"$baseUrl/readiness").response(fromMetadata(asJson[Unit]))
This is problematic if the returned string is empty which is not a valid json.
Thank you!