Skip to content

Commit

Permalink
Enhance Swagger UI Configuration on Golem-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
zelosleone committed Jan 6, 2025
1 parent 92ab25c commit 990b288
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 180 deletions.
5 changes: 4 additions & 1 deletion golem-cli/src/oss/clients/api_definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use async_trait::async_trait;
use golem_client::model::{HttpApiDefinitionRequest, HttpApiDefinitionResponseData};
use golem_worker_service_base::gateway_api_definition::http::{
openapi_export::{OpenApiExporter, OpenApiFormat},
swagger_ui::{create_api_route, SwaggerUiConfig},
swagger_ui::{create_api_route, SwaggerUiConfig, SwaggerUiAuthConfig},
};
use poem::listener::TcpListener;
use poem_openapi::{
Expand Down Expand Up @@ -268,6 +268,9 @@ impl<C: golem_client::api::ApiDefinitionClient + Sync + Send> ApiDefinitionClien
title: Some(format!("API Definition: {} ({})", id.0, version.0)),
version: Some(version.0.clone()),
server_url: Some(format!("http://localhost:{}", port)),
auth: SwaggerUiAuthConfig::default(),
worker_binding: None,
golem_extensions: std::collections::HashMap::new(),
};

// Create API route with SwaggerUI
Expand Down
2 changes: 1 addition & 1 deletion golem-cli/tests/api_definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1013,4 +1013,4 @@ fn api_definition_delete(
assert!(res_list.is_empty());

Ok(())
}
}
176 changes: 0 additions & 176 deletions golem-cli/tests/api_definition_export_ui.rs

This file was deleted.

3 changes: 1 addition & 2 deletions golem-cli/tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use tracing::info;
pub mod cli;

mod api_definition;
mod api_definition_export_ui;
mod api_deployment;
mod api_deployment_fileserver;
mod component;
Expand Down Expand Up @@ -81,4 +80,4 @@ async fn test_dependencies(_tracing: &Tracing) -> EnvBasedTestDependencies {
deps
}

test_r::enable!();
test_r::enable!();

0 comments on commit 990b288

Please sign in to comment.