Skip to content

Commit 0152817

Browse files
committed
override HtmlFormat.html
1 parent fdd5009 commit 0152817

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

MyApp/_pages/auto-html-api.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,27 @@ A nice benefit of ServiceStack's API Design is that consuming APIs are fundament
6565
dependency containing a generic ServiceClient which can be used to call any ServiceStack API using the typed DTOs copied directly from the API docs page
6666
to enable an end-to-end typed API without any external tooling or build steps.
6767

68+
## Overriding Auto HTML API
69+
70+
Like most of ServiceStack's built-in UIs, the Auto HTML API can be customized the same way by providing a local
71+
[HtmlFormat.html](https://github.com/ServiceStack/ServiceStack/blob/main/ServiceStack/src/ServiceStack/Templates/HtmlFormat.html)
72+
at the same path in your AppHost Project's `/wwwroot/Templates` folder:
73+
74+
```files
75+
/wwwroot/Templates
76+
HtmlFormat.html
77+
```
78+
6879
## API Fallback HTML Page
6980

7081
The Auto HTML API is the fallback HTML page returned for APIs when calling user-defined routes from a browser (i.e. **Accept: text/html**):
7182

72-
### [https://northwind.netcore.io/customers/ALFKI](https://northwind.netcore.io/customers/ALFKI)
83+
### [/bookings/1](https://blazor-vue.web-templates.io/bookings/1)
7384

7485
When calling the [/api pre-defined route](/routing#json-api-pre-defined-route) with the `.html` extension:
7586

76-
### [https://northwind.netcore.io/api/GetCustomerDetails.html?Id=ALFKI](https://northwind.netcore.io/api/GetCustomerDetails.html?Id=ALFKI)
87+
### [/api/QueryBookings.html?Id=1](https://blazor-vue.web-templates.io/api/QueryBookings.html?Id=1)
7788

7889
When calling the [/api pre-defined route](/routing#json-api-pre-defined-route) with `?format=html`:
7990

80-
### [https://northwind.netcore.io/api/GetCustomerDetails?Id=ALFKI&format=html](https://northwind.netcore.io/api/GetCustomerDetails?Id=ALFKI&format=html)
91+
### [/api/QueryBookings?Id=1&format=html](https://blazor-vue.web-templates.io/api/QueryBookings?Id=1&format=html)

0 commit comments

Comments
 (0)