2023-06-16 20:07:36 +02:00
|
|
|
import { Box } from "@mantine/core"
|
2023-12-29 12:11:33 +01:00
|
|
|
import { HistoryService, RedocStandalone } from "redoc"
|
|
|
|
|
|
|
|
|
|
// disable redoc url sync because it causes issues with hashrouter
|
|
|
|
|
Object.defineProperty(HistoryService.prototype, "replace", {
|
2024-02-19 20:32:20 +01:00
|
|
|
value: () => {
|
|
|
|
|
// do nothing
|
|
|
|
|
},
|
2023-12-29 12:11:33 +01:00
|
|
|
})
|
2022-08-15 15:42:56 +02:00
|
|
|
|
2022-08-22 14:49:24 +02:00
|
|
|
function ApiDocumentationPage() {
|
2023-06-16 20:07:36 +02:00
|
|
|
return (
|
2023-12-29 11:01:57 +01:00
|
|
|
// force white background because documentation does not support dark theme
|
2023-06-16 20:07:36 +02:00
|
|
|
<Box style={{ backgroundColor: "#fff" }}>
|
2023-12-29 11:21:28 +01:00
|
|
|
<RedocStandalone specUrl="openapi.json" />
|
2023-06-16 20:07:36 +02:00
|
|
|
</Box>
|
|
|
|
|
)
|
2022-08-15 15:42:56 +02:00
|
|
|
}
|
2022-08-22 14:49:24 +02:00
|
|
|
|
|
|
|
|
export default ApiDocumentationPage
|