I'm trying to view the cool interactive Swagger UI on my own running Magento 2.1 instance.
When I go to https://example.com/swagger it shows the swagger header, but under it is an error message:
Can't read swagger JSON from https://example.com/index.php/rest/default/schema?services=all
When I query that URI myself with
curl -X GET "https://example.com/rest/default/schema" -H "Authorization: Bearer mytoken"
I get a 404 response with message {"message":"Request does not match any route","trace":null}
Do I need to do anything to generate the swagger json? Where is the controller that's supposed to process this request so that I can debug it? Why is this not working? Any ideas?