feat(import): complete OpenAPI onboarding and verify delivery
This commit is contained in:
1 parent
bb3e376767
commit
e93de7015a
244 files changed
+57020
-5139
No files matched your search
@@ -186,6 +186,19 @@ async fn run() -> Result<ExitCode, CliError> {
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
let plan = json!({ "schema_version": 1, "sequence": sequence });
|
||||
if option == Some("--target-version") {
|
||||
let target_version = plan["sequence"]
|
||||
.as_array()
|
||||
.and_then(|sequence| sequence.last())
|
||||
.and_then(|migration| migration["version"].as_i64())
|
||||
.ok_or(CliError::new(
|
||||
"migration_sequence_invalid",
|
||||
"plan.target_version",
|
||||
"contact_operator",
|
||||
))?;
|
||||
println!("{target_version}");
|
||||
return Ok(ExitCode::SUCCESS);
|
||||
}
|
||||
if option == Some("--check") {
|
||||
let bytes = std::fs::read("docs/schemas/migration-sequence.json")
|
||||
.map_err(|_| CliError::new("contract_drift", "plan.read", "contact_operator"))?;
|
||||
|
||||
Reference in new issue
Block a user