story 2-13-importplan-re-import: implemented and reviewed via bmad-loop
This commit is contained in:
1 parent
c562d5368d
commit
f69c36fa65
66 files changed
+11366
-686
No files matched your search
@@ -575,6 +575,73 @@ pub struct OpenApiImportSkippedOperation {
|
||||
pub reason: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct OpenApiImportPlanCreatePayload {
|
||||
#[serde(default = "default_openapi_plan_selection_mode")]
|
||||
pub selection_mode: String,
|
||||
#[serde(default)]
|
||||
pub selected_operation_keys: Vec<String>,
|
||||
#[serde(default)]
|
||||
pub server_url: Option<String>,
|
||||
#[serde(default)]
|
||||
pub decisions: Vec<OpenApiImportPlanDecision>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct OpenApiImportPlanApplyPayload {
|
||||
pub plan_digest: String,
|
||||
pub idempotency_key: String,
|
||||
}
|
||||
|
||||
fn default_openapi_plan_selection_mode() -> String {
|
||||
"full".to_owned()
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct OpenApiImportPlanDecision {
|
||||
pub operation_key: String,
|
||||
pub action: String,
|
||||
#[serde(default)]
|
||||
pub target_operation_id: Option<String>,
|
||||
#[serde(default)]
|
||||
pub confirmed_name: Option<String>,
|
||||
#[serde(default)]
|
||||
pub auth_profile_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
|
||||
pub struct OpenApiImportPlanCounts {
|
||||
pub selected: usize,
|
||||
pub excluded: usize,
|
||||
pub actionable: usize,
|
||||
pub blocked: usize,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize)]
|
||||
pub struct OpenApiImportPlanCandidateView {
|
||||
pub key: String,
|
||||
pub name: String,
|
||||
pub state: String,
|
||||
pub action: Option<String>,
|
||||
pub target_operation_id: Option<String>,
|
||||
pub confirmed_name: Option<String>,
|
||||
pub auth_profile_id: Option<String>,
|
||||
pub reason: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
pub struct OpenApiImportPlanCreateResponse {
|
||||
pub plan_reference: String,
|
||||
pub plan_digest: String,
|
||||
pub expires_at: String,
|
||||
pub selection_mode: String,
|
||||
pub counts: OpenApiImportPlanCounts,
|
||||
pub candidates: Vec<OpenApiImportPlanCandidateView>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize)]
|
||||
pub struct CreatedOperationResponse {
|
||||
pub operation_id: String,
|
||||
|
||||
Reference in new issue
Block a user