From ee48b9d5bfb3bf80e19a6d58debcb0ba2a33838d Mon Sep 17 00:00:00 2001 From: yuanchao Date: Tue, 26 Sep 2023 18:19:20 +0800 Subject: [PATCH] Add v4.6 to SupportedVersion --- openshift-openapi-codegen/src/supported_version.rs | 9 +++++++++ src/lib.rs | 12 ++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/openshift-openapi-codegen/src/supported_version.rs b/openshift-openapi-codegen/src/supported_version.rs index d0fe3ca..9a164dc 100644 --- a/openshift-openapi-codegen/src/supported_version.rs +++ b/openshift-openapi-codegen/src/supported_version.rs @@ -3,6 +3,7 @@ pub(crate) const ALL: &[SupportedVersion] = &[ SupportedVersion::V4_3, SupportedVersion::V4_4, SupportedVersion::V4_5, + SupportedVersion::V4_6, ]; #[derive(Clone, Copy, Debug)] @@ -11,6 +12,7 @@ pub(crate) enum SupportedVersion { V4_3, V4_4, V4_5, + V4_6, } impl SupportedVersion { @@ -20,6 +22,7 @@ impl SupportedVersion { SupportedVersion::V4_3 => "v4_3", SupportedVersion::V4_4 => "v4_4", SupportedVersion::V4_5 => "v4_5", + SupportedVersion::V4_6 => "v4_6", } } @@ -29,6 +32,7 @@ impl SupportedVersion { SupportedVersion::V4_3 => "https://raw.githubusercontent.com/openshift/origin/release-4.3/api/swagger-spec/openshift-openapi-spec.json", SupportedVersion::V4_4 => "https://raw.githubusercontent.com/openshift/origin/release-4.4/api/swagger-spec/openshift-openapi-spec.json", SupportedVersion::V4_5 => "https://raw.githubusercontent.com/openshift/origin/release-4.5/api/swagger-spec/openshift-openapi-spec.json", + SupportedVersion::V4_6 => "https://raw.githubusercontent.com/openshift/origin/release-4.6/api/swagger-spec/openshift-openapi-spec.json", } } @@ -57,6 +61,11 @@ impl SupportedVersion { crate::fixups::openshift::fix_imagestream_secrets_list, crate::fixups::openshift::remove_legacy_gvk, ], + SupportedVersion::V4_6 => &[ + crate::fixups::openshift::connect_options_gvk, + crate::fixups::openshift::fix_imagestream_secrets_list, + crate::fixups::openshift::remove_legacy_gvk, + ], }; let special_fixups: &[fn(&mut crate::swagger20::Spec) -> Result<(), crate::Error>] = &[ diff --git a/src/lib.rs b/src/lib.rs index f9ba9b5..71e3d69 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -466,15 +466,15 @@ mod v4_4; pub use self::v4_4::*; #[cfg(feature = "v4_5")] -mod v4_5; -#[cfg(feature = "v4_5")] -pub use self::v4_5::*; - -#[cfg(feature = "v4_6")] mod v4_6; -#[cfg(feature = "v4_6")] +#[cfg(feature = "v4_5")] pub use self::v4_6::*; +//#[cfg(feature = "v4_6")] +//mod v4_6; +//#[cfg(feature = "v4_6")] +//pub use self::v4_6::*; + include!(concat!( env!("OUT_DIR"),