By default the Jiwa REST API will serve a built-in HTML representation of responses when viewed in a browser.
These representations are generated by built-in razor views. You can override these views, however to render your own HTML.
You do this by placing a .cshtml file in the Views folder, which is located under the folder the service is running in. The file just needs to be named the same as the request name, and contain valid Razor or markdown.
As a proof of concept, we provide one view in that folder out of the box - the SalesOrderGETRequest.cshtml.
When you visit the route corresponding to that request (e.g.: http://localhost/SalesOrders/000000001X00000000GP) the browser will render the page based on that .cshtml file:
If that file was not present, then the built-in internal representation would be shown:
We aim to improve things a bit in respect to the management of Razor views - we aim to redirect the file location where views are picked up from to the ProgramData folder - and then we can store the views in the database and the REST API will be able to write them to the filesystem (writing to the program files folders is a strict no-no). We'll have a caching strategy so the views are only written when invalidated (changed in the database), and also hopefully a pleasant way of creating and editing the Razor views.