Skip to content

credential: positional [id] is ignored — clarify or fix #36

@shreemaan-abhishek

Description

@shreemaan-abhishek

Found during Run 2 smoke testing (see docs/ga-test-report.md).

Problem

Calling

a7 credential create smoke-cred-1779521133 --consumer X --plugins-json '...' -g default

returns a credential with id = a server-generated UUID, not the positional value smoke-cred-1779521133. The help text credential create [id] is therefore misleading.

Run 1 documented this in TestCredential_CreateWithPositionalID as 'positional becomes name; id is server-generated'. That codifies the current behavior but the help text doesn't match.

Decision needed

Either:

  1. Fix the CLI to forward the positional as id (if API7 EE accepts client IDs for credentials), OR
  2. Drop the misleading [id] from the help signature and rename the positional to <name> (matching the existing test that already calls it name). Document that credential IDs are server-assigned.

Probe API7 EE's POST /apisix/admin/consumers/<user>/credentials vs PUT .../credentials/<id> to see whether (1) is even achievable.

Tests

Whichever path is chosen, update TestCredential_CreateWithPositionalID and the help text to match.

Part of #22.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions