From 9c89983dd2b79b96c64795cdbdb04900493a5b31 Mon Sep 17 00:00:00 2001 From: "Adam H. Leventhal" Date: Mon, 8 Jul 2024 22:15:55 -0700 Subject: [PATCH] add an `api-version` header to all requests --- progenitor-impl/src/lib.rs | 8 ++++++++ progenitor-impl/tests/output/src/buildomat_builder.rs | 8 ++++++++ .../tests/output/src/buildomat_builder_tagged.rs | 8 ++++++++ progenitor-impl/tests/output/src/buildomat_positional.rs | 8 ++++++++ progenitor-impl/tests/output/src/keeper_builder.rs | 8 ++++++++ progenitor-impl/tests/output/src/keeper_builder_tagged.rs | 8 ++++++++ progenitor-impl/tests/output/src/keeper_positional.rs | 8 ++++++++ progenitor-impl/tests/output/src/nexus_builder.rs | 8 ++++++++ progenitor-impl/tests/output/src/nexus_builder_tagged.rs | 8 ++++++++ progenitor-impl/tests/output/src/nexus_positional.rs | 8 ++++++++ .../tests/output/src/param_collision_builder.rs | 8 ++++++++ .../tests/output/src/param_collision_builder_tagged.rs | 8 ++++++++ .../tests/output/src/param_collision_positional.rs | 8 ++++++++ .../tests/output/src/param_overrides_builder.rs | 8 ++++++++ .../tests/output/src/param_overrides_builder_tagged.rs | 8 ++++++++ .../tests/output/src/param_overrides_positional.rs | 8 ++++++++ .../tests/output/src/propolis_server_builder.rs | 8 ++++++++ .../tests/output/src/propolis_server_builder_tagged.rs | 8 ++++++++ .../tests/output/src/propolis_server_positional.rs | 8 ++++++++ .../tests/output/src/test_default_params_builder.rs | 8 ++++++++ .../tests/output/src/test_default_params_positional.rs | 8 ++++++++ .../tests/output/src/test_freeform_response.rs | 8 ++++++++ .../tests/output/src/test_renamed_parameters.rs | 8 ++++++++ .../tests/output/src/test_stream_pagination_builder.rs | 8 ++++++++ .../tests/output/src/test_stream_pagination_positional.rs | 8 ++++++++ 25 files changed, 200 insertions(+) diff --git a/progenitor-impl/src/lib.rs b/progenitor-impl/src/lib.rs index 7226c528..59604a3f 100644 --- a/progenitor-impl/src/lib.rs +++ b/progenitor-impl/src/lib.rs @@ -452,6 +452,14 @@ impl Generator { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static(#version_str), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/buildomat_builder.rs b/progenitor-impl/tests/output/src/buildomat_builder.rs index 047a105c..3334c7ff 100644 --- a/progenitor-impl/tests/output/src/buildomat_builder.rs +++ b/progenitor-impl/tests/output/src/buildomat_builder.rs @@ -2111,6 +2111,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("1.0"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/buildomat_builder_tagged.rs b/progenitor-impl/tests/output/src/buildomat_builder_tagged.rs index d1407eea..cd729a89 100644 --- a/progenitor-impl/tests/output/src/buildomat_builder_tagged.rs +++ b/progenitor-impl/tests/output/src/buildomat_builder_tagged.rs @@ -2111,6 +2111,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("1.0"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/buildomat_positional.rs b/progenitor-impl/tests/output/src/buildomat_positional.rs index 1e799a12..6f416e1c 100644 --- a/progenitor-impl/tests/output/src/buildomat_positional.rs +++ b/progenitor-impl/tests/output/src/buildomat_positional.rs @@ -783,6 +783,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("1.0"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/keeper_builder.rs b/progenitor-impl/tests/output/src/keeper_builder.rs index 908298fc..b0398881 100644 --- a/progenitor-impl/tests/output/src/keeper_builder.rs +++ b/progenitor-impl/tests/output/src/keeper_builder.rs @@ -1232,6 +1232,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("1.0"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/keeper_builder_tagged.rs b/progenitor-impl/tests/output/src/keeper_builder_tagged.rs index 6e4dffec..41718337 100644 --- a/progenitor-impl/tests/output/src/keeper_builder_tagged.rs +++ b/progenitor-impl/tests/output/src/keeper_builder_tagged.rs @@ -1232,6 +1232,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("1.0"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/keeper_positional.rs b/progenitor-impl/tests/output/src/keeper_positional.rs index 9b63f81f..19906037 100644 --- a/progenitor-impl/tests/output/src/keeper_positional.rs +++ b/progenitor-impl/tests/output/src/keeper_positional.rs @@ -470,6 +470,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("1.0"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/nexus_builder.rs b/progenitor-impl/tests/output/src/nexus_builder.rs index 4bdfe989..fa9f2eb1 100644 --- a/progenitor-impl/tests/output/src/nexus_builder.rs +++ b/progenitor-impl/tests/output/src/nexus_builder.rs @@ -24991,6 +24991,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("0.0.1"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/nexus_builder_tagged.rs b/progenitor-impl/tests/output/src/nexus_builder_tagged.rs index 9ba1bd56..b90fce18 100644 --- a/progenitor-impl/tests/output/src/nexus_builder_tagged.rs +++ b/progenitor-impl/tests/output/src/nexus_builder_tagged.rs @@ -24624,6 +24624,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("0.0.1"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/nexus_positional.rs b/progenitor-impl/tests/output/src/nexus_positional.rs index 31b9a411..ae46e385 100644 --- a/progenitor-impl/tests/output/src/nexus_positional.rs +++ b/progenitor-impl/tests/output/src/nexus_positional.rs @@ -13381,6 +13381,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("0.0.1"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/param_collision_builder.rs b/progenitor-impl/tests/output/src/param_collision_builder.rs index b79b3ee7..6aaa8071 100644 --- a/progenitor-impl/tests/output/src/param_collision_builder.rs +++ b/progenitor-impl/tests/output/src/param_collision_builder.rs @@ -63,6 +63,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("v1"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/param_collision_builder_tagged.rs b/progenitor-impl/tests/output/src/param_collision_builder_tagged.rs index c32e270b..b1aac0b3 100644 --- a/progenitor-impl/tests/output/src/param_collision_builder_tagged.rs +++ b/progenitor-impl/tests/output/src/param_collision_builder_tagged.rs @@ -63,6 +63,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("v1"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/param_collision_positional.rs b/progenitor-impl/tests/output/src/param_collision_positional.rs index 3599c21c..c0778f67 100644 --- a/progenitor-impl/tests/output/src/param_collision_positional.rs +++ b/progenitor-impl/tests/output/src/param_collision_positional.rs @@ -63,6 +63,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("v1"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/param_overrides_builder.rs b/progenitor-impl/tests/output/src/param_overrides_builder.rs index 97af623f..acf3c9d9 100644 --- a/progenitor-impl/tests/output/src/param_overrides_builder.rs +++ b/progenitor-impl/tests/output/src/param_overrides_builder.rs @@ -63,6 +63,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("v1"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/param_overrides_builder_tagged.rs b/progenitor-impl/tests/output/src/param_overrides_builder_tagged.rs index b40de589..c3f0dcc9 100644 --- a/progenitor-impl/tests/output/src/param_overrides_builder_tagged.rs +++ b/progenitor-impl/tests/output/src/param_overrides_builder_tagged.rs @@ -63,6 +63,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("v1"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/param_overrides_positional.rs b/progenitor-impl/tests/output/src/param_overrides_positional.rs index 905fb7ea..6c8eb257 100644 --- a/progenitor-impl/tests/output/src/param_overrides_positional.rs +++ b/progenitor-impl/tests/output/src/param_overrides_positional.rs @@ -63,6 +63,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("v1"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/propolis_server_builder.rs b/progenitor-impl/tests/output/src/propolis_server_builder.rs index 498706cb..f059a2bf 100644 --- a/progenitor-impl/tests/output/src/propolis_server_builder.rs +++ b/progenitor-impl/tests/output/src/propolis_server_builder.rs @@ -2847,6 +2847,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("0.0.1"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/propolis_server_builder_tagged.rs b/progenitor-impl/tests/output/src/propolis_server_builder_tagged.rs index d95a91cf..783bce95 100644 --- a/progenitor-impl/tests/output/src/propolis_server_builder_tagged.rs +++ b/progenitor-impl/tests/output/src/propolis_server_builder_tagged.rs @@ -2811,6 +2811,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("0.0.1"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/propolis_server_positional.rs b/progenitor-impl/tests/output/src/propolis_server_positional.rs index 8d7f3a6d..9c104be7 100644 --- a/progenitor-impl/tests/output/src/propolis_server_positional.rs +++ b/progenitor-impl/tests/output/src/propolis_server_positional.rs @@ -1445,6 +1445,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("0.0.1"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/test_default_params_builder.rs b/progenitor-impl/tests/output/src/test_default_params_builder.rs index 5b347367..168c6f44 100644 --- a/progenitor-impl/tests/output/src/test_default_params_builder.rs +++ b/progenitor-impl/tests/output/src/test_default_params_builder.rs @@ -339,6 +339,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("9000"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/test_default_params_positional.rs b/progenitor-impl/tests/output/src/test_default_params_positional.rs index 2b8e6fe9..d653c271 100644 --- a/progenitor-impl/tests/output/src/test_default_params_positional.rs +++ b/progenitor-impl/tests/output/src/test_default_params_positional.rs @@ -168,6 +168,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("9000"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/test_freeform_response.rs b/progenitor-impl/tests/output/src/test_freeform_response.rs index d3b053b5..f3feeea8 100644 --- a/progenitor-impl/tests/output/src/test_freeform_response.rs +++ b/progenitor-impl/tests/output/src/test_freeform_response.rs @@ -101,6 +101,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("9000"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/test_renamed_parameters.rs b/progenitor-impl/tests/output/src/test_renamed_parameters.rs index feb3b081..a55e0f4d 100644 --- a/progenitor-impl/tests/output/src/test_renamed_parameters.rs +++ b/progenitor-impl/tests/output/src/test_renamed_parameters.rs @@ -101,6 +101,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("9000"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/test_stream_pagination_builder.rs b/progenitor-impl/tests/output/src/test_stream_pagination_builder.rs index 3d41c7cb..a02df093 100644 --- a/progenitor-impl/tests/output/src/test_stream_pagination_builder.rs +++ b/progenitor-impl/tests/output/src/test_stream_pagination_builder.rs @@ -292,6 +292,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("1"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) }; diff --git a/progenitor-impl/tests/output/src/test_stream_pagination_positional.rs b/progenitor-impl/tests/output/src/test_stream_pagination_positional.rs index 6cba250e..3502d85e 100644 --- a/progenitor-impl/tests/output/src/test_stream_pagination_positional.rs +++ b/progenitor-impl/tests/output/src/test_stream_pagination_positional.rs @@ -149,6 +149,14 @@ impl Client { let client = { let dur = std::time::Duration::from_secs(15); reqwest::ClientBuilder::new() + .default_headers( + [( + reqwest::header::HeaderName::from_static("api-version"), + reqwest::header::HeaderValue::from_static("1"), + )] + .into_iter() + .collect(), + ) .connect_timeout(dur) .timeout(dur) };