How do I create a route to a raw text file
There might be a clever solution for this, but a simple straight forward solution would be to:


Make a Controller and use that in your routes.
In the method on the controller, load the contents of the file (or just hardcopy it into your controller method)
Return a JSON response in your controller.


I haven't gone into details on how to code this, there are plenty of code examples and documentation on this on drupal.org