diff --git a/samtranslator/model/api/api_generator.py b/samtranslator/model/api/api_generator.py index e9b12461a..6ac0e8334 100644 --- a/samtranslator/model/api/api_generator.py +++ b/samtranslator/model/api/api_generator.py @@ -41,6 +41,8 @@ LOG = logging.getLogger(__name__) +FEATURE_FLAG_NORMALIZED_OPENAPI_VERSION = "normalized_open_api_version" + _CORS_WILDCARD = "'*'" CorsProperties = namedtuple( "CorsProperties", ["AllowMethods", "AllowHeaders", "AllowOrigin", "MaxAge", "AllowCredentials"] @@ -1127,7 +1129,7 @@ def _openapi_postprocess(self, definition_body: Dict[str, Any]) -> Dict[str, Any if definition_body.get("swagger") is not None: return definition_body - if self.feature_toggle and self.feature_toggle.is_enabled("normalized_open_api_version"): + if self.feature_toggle and self.feature_toggle.is_enabled(FEATURE_FLAG_NORMALIZED_OPENAPI_VERSION): normalized_open_api_version = definition_body.get("openapi", self.open_api_version) elif definition_body.get("openapi") is not None and self.open_api_version is None: normalized_open_api_version = definition_body.get("openapi")