system: マスタ管理サブコマンド (list/show/data/import/upload) を追加#33
Merged
Conversation
管理者向けの system master API 一式を呼び出す `xpoint system master`
サブコマンド群を追加。
- `system master list` — GET /api/v1/system/master でマスタ一覧取得
- `system master show <master_table_name>` — GET /api/v1/system/master/
{master_table_name} でユーザ固有マスタのプロパティ (フィールド定義)
を取得する
- `system master data <master_code>` — GET /api/v1/system/master/
{master_code}/data[.json|.csv] でマスタデータを取得する。
--type (0: 簡易 / 1: ユーザ固有)・--format (json|csv)・
--rows/--offset/--file-name/--delimiter/--title/--no-title/--fields
など CSV エクスポート用のクエリも公開
- `system master import <master_code>` — PUT /api/v1/system/master/
{master_code}/data で簡易マスタへ JSON 形式のデータを投入する。
--data にインラインJSON、ファイル、-(stdin) を指定できる。
--overwrite で既存データを置き換える
- `system master upload <master_table_name>` — POST /multiapi/v1/
system/master/{master_table_name}/data でユーザ固有マスタの
インポート用 CSV をアップロードする (インポートは実行しない)。
--file に CSV パスまたは -(stdin)、--overwrite で上書き可能
ついでに downloadBytes を拡張した downloadBytesWithContentType を
追加し、レスポンスの Content-Type も返せるようにした。
refs #25
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
管理者向けの system master 5 エンドポイントをカバーする
xpoint system masterサブコマンド群を追加:system master list(GET /api/v1/system/master)system master show <master_table_name>(GET /api/v1/system/master/{master_table_name})system master data <master_code>(GET /api/v1/system/master/{master_code}/data[.json|.csv]) —--type/--format/--rows/--offset/--file-name/--delimiter/--title/--no-title/--fieldsをサポートsystem master import <master_code>(PUT /api/v1/system/master/{master_code}/data) —--dataにインライン JSON / ファイル /-(stdin) を指定可能system master upload <master_table_name>(POST /multiapi/v1/system/master/{master_table_name}/data) — CSV を multipart で送信、--overwrite対応ついでに
downloadBytesWithContentTypeを追加し、レスポンスの Content-Type も拾えるよう共通化した。refs #25
Test plan
go build ./...go test -race ./...golangci-lint run ./...🤖 Generated with Claude Code