Add independent roast plan cloning from the plans table
Test and deploy / test-and-deploy (push) Successful in 1m52s
Test and deploy / test-and-deploy (push) Successful in 1m52s
This commit is contained in:
1 parent
393978195c
commit
a9358048ef
5 files changed
+46
-1
No files matched your search
@@ -95,6 +95,7 @@ export function buildOpenApiSpec({ origin = "" } = {}) {
|
||||
get: { tags: ["roast plans"], summary: "List your roast plans; view=summary returns paginated lightweight rows", parameters: ["view","q","process","level","sort","page","limit"].map(name=>({name,in:"query",schema:{type:"string"}})), responses: { 200: ok("Plans", obj({ ok: bool, plans: arr({ type: "object" }) })) } },
|
||||
post: { tags: ["roast plans"], summary: "Create a roast plan", requestBody: jsonBody(obj({ plan: { type: "object" }, name: { ...str, description: "Optional custom display name (falls back to worksheet field 0.1 when blank)" } }, ["plan"])), responses: { 201: ok("Created") } },
|
||||
},
|
||||
"/api/plans/{id}/clone": { post: { tags: ["roast plans"], summary: "Clone your plan for a new roast; clears recorded outcomes and inventory consumption", parameters: [idParam], responses: { 201: ok("Independent copy created"), 404: err("Not found") } } },
|
||||
"/api/plans/{id}": {
|
||||
get: {tags:["roast plans"],summary:"Read one of your plans",parameters:[idParam],responses:{200:ok("Plan"),404:err("Not found")}},
|
||||
put: { tags: ["roast plans"], summary: "Update a roast plan and/or rename it (send `plan`, `name`, or both — omitted fields are left unchanged)", parameters: [idParam], requestBody: jsonBody(obj({ plan: { type: "object" }, name: str })), responses: { 200: ok("Updated"), 404: err("Not found") } },
|
||||
|
||||
Reference in new issue
Block a user