Skip to content

Commit 745ca86

Browse files
authored
docs: admin users create のヘルプをAPI仕様に合わせて改善 (#77)
- JSON payload example に tenantId フィールドを追加 - 有効なロール一覧(super_admin, tenant_admin, user)を記載 - tenantId の必須条件を説明に追記 - Examples から super_admin の例を削除し、tenant_admin / user の例を追加
1 parent c5b6c16 commit 745ca86

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

src/commands/admin/users.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,11 @@ export function registerUsersCommand(parent: Command): void {
6161
" {\n" +
6262
' "email": "user@example.com",\n' +
6363
' "password": "SecurePassword123!",\n' +
64-
' "role": "super_admin"\n' +
65-
" }",
64+
' "role": "tenant_admin",\n' +
65+
' "tenantId": "<tenant-id>"\n' +
66+
" }\n\n" +
67+
"Roles: super_admin, tenant_admin, user\n" +
68+
"tenantId is required for tenant_admin and user roles.",
6669
)
6770
.action(
6871
withErrorHandler(async (json: unknown, _opts: unknown, cmd: Command) => {
@@ -79,8 +82,12 @@ export function registerUsersCommand(parent: Command): void {
7982

8083
addExamples(create, [
8184
{
82-
description: "Create with inline JSON",
83-
command: `geonic admin users create '{"email":"user@example.com","password":"SecurePassword123!","role":"super_admin"}'`,
85+
description: "Create a tenant admin",
86+
command: `geonic admin users create '{"email":"admin@example.com","password":"SecurePass12345!","role":"tenant_admin","tenantId":"<tenant-id>"}'`,
87+
},
88+
{
89+
description: "Create a user for a tenant",
90+
command: `geonic admin users create '{"email":"user@example.com","password":"SecurePass12345!","role":"user","tenantId":"<tenant-id>"}'`,
8491
},
8592
{
8693
description: "Create from a JSON file",

0 commit comments

Comments
 (0)