Changed the swagger UI endpoint to /docs.

This commit is contained in:
Rik Heijmann 2025-02-15 22:39:01 +01:00
parent d5894c77c0
commit e54b589d8c
3 changed files with 3 additions and 3 deletions

View File

@ -99,7 +99,7 @@ pub async fn homepage() -> impl IntoResponse {
d8' `8b 8P' `Y8 88 `"YbbdP'Y8 88 88 88
</h1>
<ul>
<li>📖 Explore the API using <a href="/swagger">Swagger UI</a> or import the <a href="/openapi.json">OpenAPI spec</a>.</li>
<li>📖 Explore the API using <a href="/docs">Swagger UI</a> or import the <a href="/openapi.json">OpenAPI spec</a>.</li>
<li>🩺 Ensure your Docker setup is reliable, by pointing its healthcheck to <a href="/health">/health</a>.</li>
</ul>
<a href="https://github.com/Riktastic/Axium" class="github-link" target="_blank">

View File

@ -45,7 +45,7 @@ async fn shutdown_signal() {
}
fn display_additional_info(protocol: &str, ip: IpAddr, port: u16) {
println!("\n📖 Explore the API using Swagger ({0}://{1}:{2}/swagger)\n or import the OpenAPI spec ({0}://{1}:{2}/openapi.json).", protocol, ip, port);
println!("\n📖 Explore the API using Swagger ({0}://{1}:{2}/docs)\n or import the OpenAPI spec ({0}://{1}:{2}/openapi.json).", protocol, ip, port);
println!("\n🩺 Ensure your Docker setup is reliable,\n by pointing its healthcheck to {0}://{1}:{2}/health", protocol, ip, port);
println!("\nPress [CTRL] + [C] to gracefully shutdown.");
}

View File

@ -130,7 +130,7 @@ pub fn create_routes(database_connection: PgPool) -> Router {
let openapi = ApiDoc::openapi();
// Create Swagger UI
let swagger_ui = SwaggerUi::new("/swagger")
let swagger_ui = SwaggerUi::new("/docs")
.url("/openapi.json", openapi.clone());
// Combine all routes and add middleware