1111 MANIFEST_DICT_KEY ,
1212 MANIFEST_DICT_NAME ,
1313 empty_manifest ,
14- normalize_manifest ,
14+ validate_manifest ,
1515)
1616
1717
@@ -45,7 +45,7 @@ def liveness_check() -> Response:
4545 @app .get ("/readiness_check" )
4646 def readiness_check () -> Response :
4747 manifest = load_manifest ()
48- if not normalize_manifest (manifest ).get ("current" ):
48+ if not validate_manifest (manifest ).get ("current" ):
4949 return jsonify (
5050 {
5151 "status" : "error" ,
@@ -56,14 +56,14 @@ def readiness_check() -> Response:
5656
5757 @app .get ("/versions" )
5858 def versions () -> Response :
59- return jsonify (normalize_manifest (load_manifest ()))
59+ return jsonify (validate_manifest (load_manifest ()))
6060
6161 @app .get ("/versions/<country_id>" )
6262 def country_versions (country_id : str ) -> Response :
6363 if country_id not in COUNTRIES :
6464 return _json_error (f"Unsupported country `{ country_id } `" , 404 )
6565
66- manifest = normalize_manifest (load_manifest ())
66+ manifest = validate_manifest (load_manifest ())
6767 country_versions = {}
6868 for channel in ("current" , "frontier" ):
6969 app_reference = manifest .get (channel )
@@ -88,7 +88,7 @@ def route_request(path: str) -> Response:
8888 body = request .get_data ()
8989
9090 try :
91- manifest = normalize_manifest (load_manifest ())
91+ manifest = validate_manifest (load_manifest ())
9292 if country_id and endpoint in VERSIONED_ENDPOINTS :
9393 body , requested_version = _extract_requested_version (body )
9494 else :
@@ -119,7 +119,7 @@ def load_modal_manifest() -> dict[str, Any]:
119119 )
120120 except NotFoundError :
121121 return empty_manifest ()
122- return normalize_manifest (manifest_dict .get (MANIFEST_DICT_KEY ))
122+ return validate_manifest (manifest_dict .get (MANIFEST_DICT_KEY ))
123123
124124
125125def resolve_app_for_request (
0 commit comments