diff --git a/aiscript-runtime/src/lib.rs b/aiscript-runtime/src/lib.rs index 83842af..0c188db 100644 --- a/aiscript-runtime/src/lib.rs +++ b/aiscript-runtime/src/lib.rs @@ -190,10 +190,10 @@ async fn run_server( if config.apidoc.enabled { match config.apidoc.doc_type { config::ApiDocType::Swagger => { - // router = router.route( - // &config.apidoc.path, - // get(move || async { Html(include_str!("openapi/swagger.html")) }), - // ); + router = router.route( + &config.apidoc.path, + get(move || async { Html(include_str!("openapi/swagger.html")) }), + ); } config::ApiDocType::Redoc => { router = router.route( diff --git a/aiscript-runtime/src/openapi/swagger.html b/aiscript-runtime/src/openapi/swagger.html new file mode 100644 index 0000000..7e9cba5 --- /dev/null +++ b/aiscript-runtime/src/openapi/swagger.html @@ -0,0 +1,56 @@ + + +
+ +