mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 17:47:54 +08:00
refactor(openapi): move openapi to separate crate to decrease compile times (#3110)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Sai Harsha Vardhan <56996463+sai-harsha-vardhan@users.noreply.github.com> Co-authored-by: Sahkal Poddar <sahkalplanet@gmail.com> Co-authored-by: Amisha Prabhat <55580080+Aprabhat19@users.noreply.github.com> Co-authored-by: Sarthak Soni <76486416+Sarthak1799@users.noreply.github.com> Co-authored-by: shashank_attarde <shashank.attarde@juspay.in> Co-authored-by: Aprabhat19 <amishaprabhat@gmail.com> Co-authored-by: sai-harsha-vardhan <harsha111hero@gmail.com> Co-authored-by: Sahkal Poddar <sahkal.poddar@juspay.in> Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
@ -12,6 +12,7 @@ pub mod cors;
|
||||
pub mod db;
|
||||
pub mod env;
|
||||
pub(crate) mod macros;
|
||||
|
||||
pub mod routes;
|
||||
pub mod workflows;
|
||||
|
||||
@ -19,7 +20,6 @@ pub mod workflows;
|
||||
pub mod analytics;
|
||||
pub mod events;
|
||||
pub mod middleware;
|
||||
pub mod openapi;
|
||||
pub mod services;
|
||||
pub mod types;
|
||||
pub mod utils;
|
||||
@ -93,15 +93,6 @@ pub fn mk_app(
|
||||
> {
|
||||
let mut server_app = get_application_builder(request_body_limit);
|
||||
|
||||
#[cfg(feature = "openapi")]
|
||||
{
|
||||
use utoipa::OpenApi;
|
||||
server_app = server_app.service(
|
||||
utoipa_swagger_ui::SwaggerUi::new("/docs/{_:.*}")
|
||||
.url("/docs/openapi.json", openapi::ApiDoc::openapi()),
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(feature = "dummy_connector")]
|
||||
{
|
||||
use routes::DummyConnector;
|
||||
|
||||
Reference in New Issue
Block a user