//! This test should fail to compile because register() is called without a response

use toolkit::api::OperationBuilder;
use axum::Router;

async fn test_handler() -> &'static str { "ok" }

struct DummyRegistry;
impl toolkit::api::OpenApiRegistry for DummyRegistry {
    fn register_operation(&self, _: &toolkit::api::OperationSpec) {}
    fn ensure_schema_raw(&self, root_name: &str, _: Vec<(String, utoipa::openapi::RefOr<utoipa::openapi::schema::Schema>)>) -> String {
        root_name.to_string()
    }
    fn as_any(&self) -> &dyn std::any::Any { self }
}

fn main() {
    let registry = DummyRegistry;
    let router = Router::new();

    // This should fail to compile - missing response
    let _ = OperationBuilder::<_, _, ()>::get("/tests/v1/test")
        .summary("Test endpoint")
        .handler(test_handler)
        .register(router, &registry);
}
