Standardize CLI verb consistency and restructure admin commands - #281
Open
stalep wants to merge 1 commit into
Open
Standardize CLI verb consistency and restructure admin commands#281stalep wants to merge 1 commit into
stalep wants to merge 1 commit into
Conversation
Fix Hyperfoil#278: Standardize CRUD verbs across all entity groups. Change 'view create' to 'view add' (with 'create' as alias for backwards compatibility), matching folder/node/notification which all use 'add'. Fix Hyperfoil#277: Restructure admin commands from flat verb-noun naming (create-team, list-users, etc.) to nested entity groups matching the noun-verb pattern used by all other entity commands. Before: admin create-team|create-user|list-teams|list-users|add-member| create-api-key|list-api-keys|revoke-api-key After: admin team → add, list admin user → add, list admin member → add admin apikey → add, list, revoke This makes admin consistent with the entity-first pattern: folder → add, list, remove, upload, values, ... node → add, list, remove, update view → add, list, remove, show, update admin team → add, list admin apikey → add, list, revoke close Hyperfoil#277 close Hyperfoil#278
Collaborator
|
I'm away from the laptop to check the code but why are we using the 'admin' prefix for the member, apikey, and team entities? Also why does apikey use revoke instead of remove for the verb? I realize revoking a key is a common verb for keys but I thought verb inconsistency was one of the justifications for changing to noun->verb syntax |
Collaborator
I find it questionable that we are suddenly trepidatious about backward compatibility for a verb when a single PR changed the syntax of every command and broke non-REPL command invocation. I think we do not need to retain 'create' for backwards compatibility and honestly feel retaining it would lead to confusion on why there were two similar verbs. |
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.
Fix #278: Standardize CRUD verbs across all entity groups. Change 'view create' to 'view add' (with 'create' as alias for backwards compatibility), matching folder/node/notification which all use 'add'.
Fix #277: Restructure admin commands from flat verb-noun naming (create-team, list-users, etc.) to nested entity groups matching the noun-verb pattern used by all other entity commands.
Before:
admin create-team|create-user|list-teams|list-users|add-member|
create-api-key|list-api-keys|revoke-api-key
After:
admin team → add, list
admin user → add, list
admin member → add
admin apikey → add, list, revoke
This makes admin consistent with the entity-first pattern:
folder → add, list, remove, upload, values, ...
node → add, list, remove, update
view → add, list, remove, show, update
admin team → add, list
admin apikey → add, list, revoke
close #277
close #278