Skip to content

feat: add schema and data options for user management commands - #1660

Merged
ramya18101 merged 7 commits into
mainfrom
DXCDT-2107-agent-rollout-for-users
Sep 17, 2026
Merged

ramya18101 merged 7 commits into
mainfrom
DXCDT-2107-agent-rollout-for-users

Conversation

@ramya18101

Copy link
Copy Markdown
Contributor

🔧 Changes

Adds --schema and --data flags to the auth0 users management commands, making them usable by agents and automation tooling without interactive prompts.

auth0 users search

  • --schema: prints the GET /users query-parameter schema and exits.

auth0 users create

  • --schema: prints the POST /users payload schema and exits.
  • --data <json|@file|stdin>: accepts a full JSON payload, validates it against the schema, and sends it — skipping all interactive prompts.

auth0 users update

  • --schema: prints the PATCH /users/{id} payload schema and exits.
  • --data <json|@file|stdin>: same as create, applied as a partial update.

--data is mutually exclusive with individual field flags (--name, --email, --connection-name, etc.) on both create and update. Also fixes trailing quotes on --blocked examples in the update command help text.

📚 References

🔬 Testing

# Schema discovery
auth0 users search --schema
auth0 users search --schema --json
auth0 users create --schema
auth0 users update --schema

# JSON input
auth0 users create --data '{"email":"john@example.com","password":"Test1234!","connection":"Username-Password-Authentication"}' --json
auth0 users update <user-id> --data '{"name":"John Doe"}' --json
echo '{"blocked":true}' | auth0 users update <user-id> --json

# Mutual exclusion guard
auth0 users create --data '{"email":"x@x.com"}' --email "y@y.com"  # must error

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

Base automatically changed from DXCDT-2107-agent-rollout-for-roles to main September 16, 2026 14:47
@developerkunal
developerkunal marked this pull request as ready for review September 16, 2026 15:48
@developerkunal
developerkunal requested a review from a team as a code owner September 16, 2026 15:48

@developerkunal developerkunal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ramya18101
ramya18101 merged commit 1fea071 into main Sep 17, 2026
6 checks passed
@ramya18101
ramya18101 deleted the DXCDT-2107-agent-rollout-for-users branch September 17, 2026 06:35
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.

2 participants