feat(import): preserve supported HTTP contracts
This commit is contained in:
1 parent
083974c27f
commit
f8ee7c9bfe
87 files changed
+7496
-534
No files matched your search
@@ -639,7 +639,12 @@ fn import_replay_contract(
|
||||
if normalizer == NORMALIZER_VERSION && projection == PROJECTION_VERSION {
|
||||
return Ok(ImportReplayContract::Current);
|
||||
}
|
||||
if normalizer != "normalized-ir-v2" || projection != "preview-v2" {
|
||||
// Historical preview payloads are replayed as their persisted projection.
|
||||
// They must never be parsed again with the current v4 semantics.
|
||||
if !matches!(
|
||||
(normalizer, projection),
|
||||
("normalized-ir-v2", "preview-v2") | ("normalized-ir-v3", "preview-v3")
|
||||
) {
|
||||
return Err(ApiError::openapi_upload(locale, "source_integrity"));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user