Skip to content

document: get/edit/delete サブコマンドを追加#11

Merged
buty4649 merged 1 commit intomainfrom
document-crud
Apr 17, 2026
Merged

document: get/edit/delete サブコマンドを追加#11
buty4649 merged 1 commit intomainfrom
document-crud

Conversation

@buty4649
Copy link
Copy Markdown
Contributor

Summary

  • /api/v1/documents/{docid} の GET/PATCH/DELETE を操作する3サブコマンドを追加
    • xp document get <docid> — 書類内容取得 (レスポンスはフォーム定義に依存するため JSON で返却、--jq でフィルタ可能)
    • xp document edit <docid> — 書類更新・ワークフロー操作 (--body 必須、inline/file/stdin に対応)
    • xp document delete <docid> — 書類削除 (標準で確認プロンプト、--yes/-y でスキップ)
  • xp schemadocument.get / document.update / document.delete のエイリアスと JSON スキーマを追加
  • client 側に GetDocument / UpdateDocument / DeleteDocument を追加
  • parseDocID とエラーパス、スキーマの追加エイリアスに対するテストを追加

Test plan

  • go test ./... が通る
  • golangci-lint run ./... が通る
  • xp document --help に 3 サブコマンドが表示される
  • xp schema に 3 エイリアスが追加されている
  • 実環境で xp document get / edit / delete が API 呼び出しに成功する

🤖 Generated with Claude Code

/api/v1/documents/{docid} に対する GET/PATCH/DELETE 3つの
エンドポイントを操作するサブコマンドを追加。
  - xp document get <docid>     書類内容取得 (JSON 出力 / --jq 対応)
  - xp document edit <docid>    書類更新・ワークフロー操作 (--body 必須)
  - xp document delete <docid>  書類削除 (--yes で確認スキップ)

あわせて xp schema のエイリアスに document.get / document.update /
document.delete を追加。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@buty4649 buty4649 self-assigned this Apr 17, 2026
@buty4649 buty4649 merged commit caedc0b into main Apr 17, 2026
2 checks passed
@buty4649 buty4649 deleted the document-crud branch April 17, 2026 05:07
This was referenced Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant