mirror of
https://github.com/kristoferssolo/Axium.git
synced 2025-10-21 16:00:34 +00:00
Changed the swagger UI endpoint to /docs.
This commit is contained in:
parent
d5894c77c0
commit
e54b589d8c
@ -99,7 +99,7 @@ pub async fn homepage() -> impl IntoResponse {
|
|||||||
d8' `8b 8P' `Y8 88 `"YbbdP'Y8 88 88 88
|
d8' `8b 8P' `Y8 88 `"YbbdP'Y8 88 88 88
|
||||||
</h1>
|
</h1>
|
||||||
<ul>
|
<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>
|
<li>🩺 Ensure your Docker setup is reliable, by pointing its healthcheck to <a href="/health">/health</a>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a href="https://github.com/Riktastic/Axium" class="github-link" target="_blank">
|
<a href="https://github.com/Riktastic/Axium" class="github-link" target="_blank">
|
||||||
|
|||||||
@ -45,7 +45,7 @@ async fn shutdown_signal() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn display_additional_info(protocol: &str, ip: IpAddr, port: u16) {
|
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!("\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.");
|
println!("\nPress [CTRL] + [C] to gracefully shutdown.");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -130,7 +130,7 @@ pub fn create_routes(database_connection: PgPool) -> Router {
|
|||||||
let openapi = ApiDoc::openapi();
|
let openapi = ApiDoc::openapi();
|
||||||
|
|
||||||
// Create Swagger UI
|
// Create Swagger UI
|
||||||
let swagger_ui = SwaggerUi::new("/swagger")
|
let swagger_ui = SwaggerUi::new("/docs")
|
||||||
.url("/openapi.json", openapi.clone());
|
.url("/openapi.json", openapi.clone());
|
||||||
|
|
||||||
// Combine all routes and add middleware
|
// Combine all routes and add middleware
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user