bloom-web 0.1.4

A lightweight backend framework combining Actix-Web, SQLx, and declarative macros for rapid API development
// Test file to verify all dependencies are accessible through bloom_web
use bloom_web::prelude::*;

// Test that all major crates are accessible
fn test_crate_accessibility() {
    // Test serde accessibility
    let _serialize_test: fn(&str) -> Result<String, serde_json::Error> = serde_json::to_string;

    // Test actix_web accessibility
    let _web_test = web::Path::<i32>::extract;
    let _response_test = HttpResponse::Ok();

    // Test sqlx accessibility
    let _pool_test: Option<MySqlPool> = None;
    let _from_row_test: fn() = || { let _: Box<dyn FromRow<'_, sqlx::mysql::MySqlRow>> = todo!(); };

    // Test anyhow accessibility
    let _result_test: anyhow::Result<()> = Ok(());

    // Test chrono accessibility
    let _time_test = chrono::Utc::now();

    // Test utoipa accessibility
    let _schema_test: fn() = || { let _: Box<dyn ToSchema> = todo!(); };

    // Test tokio accessibility
    let _runtime_test = tokio::runtime::Runtime::new();

    // Test inventory accessibility (should be accessible but typically not used directly)
    // This is mainly for internal macro use

    println!("All crate accessibility tests passed!");
}

// Test Entity macro
#[derive(Entity, Debug, Clone, Serialize, Deserialize, FromRow)]
#[table("test_users")]
pub struct TestUser {
    #[id]
    pub id: i32,
    pub name: String,
    pub email: String,
}

// Test Repository macro
#[repository(TestUser)]
pub struct TestUserRepository;

// Test HTTP mapping macro
#[get_mapping("/test")]
async fn test_endpoint() -> HttpResponse {
    HttpResponse::Ok().json("Test successful")
}

fn main() {
    test_crate_accessibility();
    println!("All bloom_web dependencies are properly accessible!");
}