Skip to content

Add xp form show and document URL output#12

Merged
buty4649 merged 2 commits intomainfrom
add-form-show
Apr 17, 2026
Merged

Add xp form show and document URL output#12
buty4649 merged 2 commits intomainfrom
add-form-show

Conversation

@buty4649
Copy link
Copy Markdown
Contributor

Summary

  • xp form show <form_code|form_id> を追加。GET /api/v1/forms/{fid} を叩いて書類に必要なフィールド定義 (fieldid, 型, 必須, 表明細サイズ など) を取得できる。form_code を渡した場合は内部で /api/v1/forms を呼んで form_id を解決する
  • xp document create のレスポンスに url を追加。Client.DocumentURL(docid) が subdomain と docid から https://{sub}.atledcloud.jp/xpoint/form.do?act=view&docid={docid} を組み立てる (fid 無しでもサーバ側が正しいフォームにリダイレクトする)
  • schema コマンドにも form.show エイリアスを追加

Test plan

  • go build ./...
  • go test ./...
  • golangci-lint run ./... (0 issues)
  • 実 API で xp form show TORIHIKISAKI_a が 取引先審査・登録申請 のフィールド一覧を返すことを確認
  • 実 API で xp document create --body ... が draft を作成し、レスポンスに開けるURLが含まれることを確認

🤖 Generated with Claude Code

@buty4649 buty4649 self-assigned this Apr 17, 2026
@buty4649 buty4649 enabled auto-merge (squash) April 17, 2026 05:14
buty4649 and others added 2 commits April 17, 2026 14:16
GET /api/v1/forms/{fid} を叩く `xp form show <form_code|form_id>` を
追加。引数に form_code を渡した場合は内部で /api/v1/forms を呼んで
form_id を解決する。document create に必要なフィールド定義 (fieldid,
型, 必須, 表明細サイズ など) をコマンドラインだけで取得できるように
することが狙い。schema コマンドにも form.show エイリアスを追加。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
作成した書類のブラウザ向け URL (`form.do?act=view&docid=<docid>`) を
Client.DocumentURL で組み立て、`xp document create` の JSON / table
出力どちらにも含めるようにする。`fid` は無くてもサーバ側が正しい
フォームにリダイレクトするため付けない。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@buty4649 buty4649 merged commit 53ae30d into main Apr 17, 2026
2 checks passed
@buty4649 buty4649 deleted the add-form-show branch April 17, 2026 05:17
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