@@ -441,7 +441,7 @@ pub enum StoredIcebergConfig {
441441 Supabase {
442442 project_ref : String ,
443443 warehouse_name : String ,
444- namespace : String ,
444+ namespace : Option < String > ,
445445 catalog_token : SerializableSecretString ,
446446 s3_access_key_id : SerializableSecretString ,
447447 s3_secret_access_key : SerializableSecretString ,
@@ -450,7 +450,7 @@ pub enum StoredIcebergConfig {
450450 Rest {
451451 catalog_uri : String ,
452452 warehouse_name : String ,
453- namespace : String ,
453+ namespace : Option < String > ,
454454 s3_access_key_id : SerializableSecretString ,
455455 s3_secret_access_key : SerializableSecretString ,
456456 s3_endpoint : String ,
@@ -466,7 +466,8 @@ pub enum FullApiIcebergConfig {
466466 #[ schema( example = "my-warehouse" ) ]
467467 warehouse_name : String ,
468468 #[ schema( example = "my-namespace" ) ]
469- namespace : String ,
469+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
470+ namespace : Option < String > ,
470471 #[ schema(
471472 example = "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6IjFkNzFjMGEyNmIxMDFjODQ5ZTkxZmQ1NjdjYjA5NTJmIn0.eyJleHAiOjIwNzA3MTcxNjAsImlhdCI6MTc1NjE0NTE1MCwiaXNzIjoic3VwYWJhc2UiLCJyZWYiOiJhYmNkZWZnaGlqbGttbm9wcXJzdCIsInJvbGUiOiJzZXJ2aWNlX3JvbGUifQ.YdTWkkIvwjSkXot3NC07xyjPjGWQMNzLq5EPzumzrdLzuHrj-zuzI-nlyQtQ5V7gZauysm-wGwmpztRXfPc3AQ"
472473 ) ]
@@ -484,7 +485,7 @@ pub enum FullApiIcebergConfig {
484485 #[ schema( example = "my-warehouse" ) ]
485486 warehouse_name : String ,
486487 #[ schema( example = "my-namespace" ) ]
487- namespace : String ,
488+ namespace : Option < String > ,
488489 #[ schema( example = "9156667efc2c70d89af6588da86d2924" ) ]
489490 s3_access_key_id : SerializableSecretString ,
490491 #[ schema( example = "ca833e890916d848c69135924bcd75e5909184814a0ebc6c988937ee094120d4" ) ]
@@ -500,7 +501,7 @@ pub enum EncryptedStoredIcebergConfig {
500501 Supabase {
501502 project_ref : String ,
502503 warehouse_name : String ,
503- namespace : String ,
504+ namespace : Option < String > ,
504505 catalog_token : EncryptedValue ,
505506 s3_access_key_id : EncryptedValue ,
506507 s3_secret_access_key : EncryptedValue ,
@@ -509,7 +510,7 @@ pub enum EncryptedStoredIcebergConfig {
509510 Rest {
510511 catalog_uri : String ,
511512 warehouse_name : String ,
512- namespace : String ,
513+ namespace : Option < String > ,
513514 s3_access_key_id : EncryptedValue ,
514515 s3_secret_access_key : EncryptedValue ,
515516 s3_endpoint : String ,
@@ -571,7 +572,7 @@ mod tests {
571572 config : StoredIcebergConfig :: Supabase {
572573 project_ref : "abcdefghijklmnopqrst" . to_string ( ) ,
573574 warehouse_name : "my-warehouse" . to_string ( ) ,
574- namespace : "my-namespace" . to_string ( ) ,
575+ namespace : Some ( "my-namespace" . to_string ( ) ) ,
575576 catalog_token : SerializableSecretString :: from ( "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6IjFkNzFjMGEyNmIxMDFjODQ5ZTkxZmQ1NjdjYjA5NTJmIn0.eyJleHAiOjIwNzA3MTcxNjAsImlhdCI6MTc1NjE0NTE1MCwiaXNzIjoic3VwYWJhc2UiLCJyZWYiOiJhYmNkZWZnaGlqbGttbm9wcXJzdCIsInJvbGUiOiJzZXJ2aWNlX3JvbGUifQ.YdTWkkIvwjSkXot3NC07xyjPjGWQMNzLq5EPzumzrdLzuHrj-zuzI-nlyQtQ5V7gZauysm-wGwmpztRXfPc3AQ" . to_string ( ) ) ,
576577 s3_access_key_id : SerializableSecretString :: from ( "9156667efc2c70d89af6588da86d2924" . to_string ( ) ) ,
577578 s3_secret_access_key : SerializableSecretString :: from ( "ca833e890916d848c69135924bcd75e5909184814a0ebc6c988937ee094120d4" . to_string ( ) ) ,
@@ -637,7 +638,7 @@ mod tests {
637638 catalog_uri : "https://abcdefghijklmnopqrst.storage.supabase.com/storage/v1/iceberg"
638639 . to_string ( ) ,
639640 warehouse_name : "my-warehouse" . to_string ( ) ,
640- namespace : "my-namespace" . to_string ( ) ,
641+ namespace : Some ( "my-namespace" . to_string ( ) ) ,
641642 s3_access_key_id : SerializableSecretString :: from ( "id" . to_string ( ) ) ,
642643 s3_secret_access_key : SerializableSecretString :: from ( "key" . to_string ( ) ) ,
643644 s3_endpoint : "http://localhost:8080" . to_string ( ) ,
@@ -741,7 +742,7 @@ mod tests {
741742 config : StoredIcebergConfig :: Supabase {
742743 project_ref : "abcdefghijklmnopqrst" . to_string ( ) ,
743744 warehouse_name : "my-warehouse" . to_string ( ) ,
744- namespace : "my-namespace" . to_string ( ) ,
745+ namespace : Some ( "my-namespace" . to_string ( ) ) ,
745746 catalog_token : SerializableSecretString :: from ( "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6IjFkNzFjMGEyNmIxMDFjODQ5ZTkxZmQ1NjdjYjA5NTJmIn0.eyJleHAiOjIwNzA3MTcxNjAsImlhdCI6MTc1NjE0NTE1MCwiaXNzIjoic3VwYWJhc2UiLCJyZWYiOiJhYmNkZWZnaGlqbGttbm9wcXJzdCIsInJvbGUiOiJzZXJ2aWNlX3JvbGUifQ.YdTWkkIvwjSkXot3NC07xyjPjGWQMNzLq5EPzumzrdLzuHrj-zuzI-nlyQtQ5V7gZauysm-wGwmpztRXfPc3AQ" . to_string ( ) ) ,
746747 s3_access_key_id : SerializableSecretString :: from ( "9156667efc2c70d89af6588da86d2924" . to_string ( ) ) ,
747748 s3_secret_access_key : SerializableSecretString :: from ( "ca833e890916d848c69135924bcd75e5909184814a0ebc6c988937ee094120d4" . to_string ( ) ) ,
@@ -813,7 +814,7 @@ mod tests {
813814 catalog_uri : "https://abcdefghijklmnopqrst.storage.supabase.com/storage/v1/iceberg"
814815 . to_string ( ) ,
815816 warehouse_name : "my-warehouse" . to_string ( ) ,
816- namespace : "my-namespace" . to_string ( ) ,
817+ namespace : Some ( "my-namespace" . to_string ( ) ) ,
817818 s3_access_key_id : SerializableSecretString :: from ( "id" . to_string ( ) ) ,
818819 s3_secret_access_key : SerializableSecretString :: from ( "key" . to_string ( ) ) ,
819820 s3_endpoint : "http://localhost:8080" . to_string ( ) ,
@@ -924,7 +925,7 @@ mod tests {
924925 config : FullApiIcebergConfig :: Supabase {
925926 project_ref : "abcdefghijklmnopqrst" . to_string ( ) ,
926927 warehouse_name : "my-warehouse" . to_string ( ) ,
927- namespace : "my-namespace" . to_string ( ) ,
928+ namespace : Some ( "my-namespace" . to_string ( ) ) ,
928929 catalog_token : SerializableSecretString :: from ( "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6IjFkNzFjMGEyNmIxMDFjODQ5ZTkxZmQ1NjdjYjA5NTJmIn0.eyJleHAiOjIwNzA3MTcxNjAsImlhdCI6MTc1NjE0NTE1MCwiaXNzIjoic3VwYWJhc2UiLCJyZWYiOiJhYmNkZWZnaGlqbGttbm9wcXJzdCIsInJvbGUiOiJzZXJ2aWNlX3JvbGUifQ.YdTWkkIvwjSkXot3NC07xyjPjGWQMNzLq5EPzumzrdLzuHrj-zuzI-nlyQtQ5V7gZauysm-wGwmpztRXfPc3AQ" . to_string ( ) ) ,
929930 s3_access_key_id : SerializableSecretString :: from ( "9156667efc2c70d89af6588da86d2924" . to_string ( ) ) ,
930931 s3_secret_access_key : SerializableSecretString :: from ( "ca833e890916d848c69135924bcd75e5909184814a0ebc6c988937ee094120d4" . to_string ( ) ) ,
@@ -990,7 +991,7 @@ mod tests {
990991 catalog_uri : "https://abcdefghijklmnopqrst.storage.supabase.com/storage/v1/iceberg"
991992 . to_string ( ) ,
992993 warehouse_name : "my-warehouse" . to_string ( ) ,
993- namespace : "my-namespace" . to_string ( ) ,
994+ namespace : Some ( "my-namespace" . to_string ( ) ) ,
994995 s3_access_key_id : SerializableSecretString :: from ( "id" . to_string ( ) ) ,
995996 s3_secret_access_key : SerializableSecretString :: from ( "key" . to_string ( ) ) ,
996997 s3_endpoint : "http://localhost:8080" . to_string ( ) ,
@@ -1048,7 +1049,7 @@ mod tests {
10481049 config : FullApiIcebergConfig :: Supabase {
10491050 project_ref : "abcdefghijklmnopqrst" . to_string ( ) ,
10501051 warehouse_name : "my-warehouse" . to_string ( ) ,
1051- namespace : "my-namespace" . to_string ( ) ,
1052+ namespace : Some ( "my-namespace" . to_string ( ) ) ,
10521053 catalog_token : SerializableSecretString :: from ( "token123" . to_string ( ) ) ,
10531054 s3_access_key_id : SerializableSecretString :: from ( "access_key_123" . to_string ( ) ) ,
10541055 s3_secret_access_key : SerializableSecretString :: from ( "secret123" . to_string ( ) ) ,
@@ -1116,7 +1117,7 @@ mod tests {
11161117 config : FullApiIcebergConfig :: Rest {
11171118 catalog_uri : "https://catalog.example.com/iceberg" . to_string ( ) ,
11181119 warehouse_name : "my-warehouse" . to_string ( ) ,
1119- namespace : "my-namespace" . to_string ( ) ,
1120+ namespace : Some ( "my-namespace" . to_string ( ) ) ,
11201121 s3_access_key_id : SerializableSecretString :: from ( "id" . to_string ( ) ) ,
11211122 s3_secret_access_key : SerializableSecretString :: from ( "key" . to_string ( ) ) ,
11221123 s3_endpoint : "http://localhost:8080" . to_string ( ) ,
0 commit comments