Skip to content

Add xp document create command#9

Merged
buty4649 merged 2 commits intomainfrom
add-document-create
Apr 17, 2026
Merged

Add xp document create command#9
buty4649 merged 2 commits intomainfrom
add-document-create

Conversation

@buty4649
Copy link
Copy Markdown
Contributor

Summary

  • POST /api/v1/documents を叩く xp document create サブコマンドを追加
  • --body でインラインJSON / ファイルパス / -(stdin) を受け付ける(document search と同じ loadSearchBody ヘルパを共有)
  • internal/schema/document.create.json を追加し、xp schema document.create でリクエスト/レスポンスの形を確認可能

Test plan

  • go build ./...
  • go test ./...
  • golangci-lint run ./...
  • 実 API での draft 提出動作確認(form_code=TORIHIKISAKI_a で必須フィールドエラーが返ることを確認)

🤖 Generated with Claude Code

buty4649 and others added 2 commits April 17, 2026 13:41
POST /api/v1/documents を叩く `xp document create` を追加。--body
でインラインJSON/ファイル/stdin を受け付け、document.search と同じ
loadSearchBody ヘルパを共有する。schema コマンドにも document.create
エイリアスを追加。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
mainに取り込まれたOAuth対応で newClientFromFlags が context.Context
を受け取るようになったため、runDocumentCreate も追従させる。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@buty4649 buty4649 self-assigned this Apr 17, 2026
@buty4649 buty4649 merged commit cf72376 into main Apr 17, 2026
2 checks passed
@buty4649 buty4649 deleted the add-document-create branch April 17, 2026 04:48
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