I've added a custom connector and validated its schema in my PowerApps environment. In the connection tester it works fine, and in the header it clearly states "content-type": "text/plain".
The body returned is text/plain, again, this works in the tester, but when I add this to a button or variable assignment in my PowerApp it says (in the PowerApp) "failed: the data returned in the response is invalid".
If I check with Fiddler, I see the request coming back (/invoke) to the PowerApp in text/plain.
Relevant swagger section for the 200 return code:
responses:
'200':
description: OK
schema: {type: string}