When receiving a Swagger definition file from the application server using https://applicationserver.yourdomain.loc/api/doc/, the output is truncated in any browser.
You can use e.g.
curl -o api.json https://applicationserver.yourdomain.loc/api/doc/
This should retrieve a valid, complete swagger definition.
At the time of writing, bug 31713 can be observed in 7.1 up to and including SP5, 8.0 up to and including SP3, and 8.1. Development will include in a future release.