Version: hubspot 0.14.0 (build 1162, commit unknown)
Command run:
$ echo '{}' | hubspot schemas create --dry-run
$ echo '{"name":"test_object_xyz"}' | hubspot schemas create --dry-run
Expected result: given schemas create (without --dry-run) rejects both of these bodies with a 400 validation error (Some required fields were not set: [name, labels], then [labels]), the --dry-run equivalent should surface the same validation problem rather than reporting success.
Actual result: --dry-run reports ok: true for both, regardless of body content, simply echoing back whatever was piped in:
$ echo '{}' | hubspot schemas create --dry-run
{"ok":true,"executed":false,"dry_run":true,"data":{}}
$ echo '{"name":"test_object_xyz"}' | hubspot schemas create --dry-run
{"ok":true,"executed":false,"dry_run":true,"data":{"name":"test_object_xyz"}}
$ echo '{}' | hubspot schemas create
{"ok":false,"error":{"status":400,"message":"Invalid input JSON on line 1, column 2. Some required fields were not set: [name, labels]"}}
For comparison, schemas update --dry-run genuinely calls the API - it returns portal-specific data (state_snapshot, digest, the actual portal ID), so this isn't true of every --dry-run in the CLI, just schemas create (and possibly other create commands - not exhaustively tested).
Why this matters: the README's own beta warning recommends using --dry-run before mutations as the safety practice for a tool that can modify live CRM data. For schemas create, a passing dry-run gives no assurance the real call will succeed.
Version:
hubspot 0.14.0 (build 1162, commit unknown)Command run:
Expected result: given
schemas create(without--dry-run) rejects both of these bodies with a 400 validation error (Some required fields were not set: [name, labels], then[labels]), the--dry-runequivalent should surface the same validation problem rather than reporting success.Actual result:
--dry-runreportsok: truefor both, regardless of body content, simply echoing back whatever was piped in:For comparison,
schemas update --dry-rungenuinely calls the API - it returns portal-specific data (state_snapshot,digest, the actualportalID), so this isn't true of every--dry-runin the CLI, justschemas create(and possibly othercreatecommands - not exhaustively tested).Why this matters: the README's own beta warning recommends using
--dry-runbefore mutations as the safety practice for a tool that can modify live CRM data. Forschemas create, a passing dry-run gives no assurance the real call will succeed.