feat: add Forms management commands - #1626
Merged
Merged
Conversation
# Conflicts: # README.md # docs/index.md # internal/auth/auth.go # internal/auth0/auth0.go # internal/cli/root.go # test/integration/scripts/test-cleanup.sh
Replace the forms-specific --file/-f flag with the common --data input layer (inline JSON, @file.json, or piped stdin) that create and update validate against the OpenAPI schema, mirroring how the other resource commands work. Forms still send the body as raw JSON so STEP/ROUTER node config the v3 union types would drop is preserved. Also remove now-redundant code: forms now reuse the shared openBuilderURL and formatBuilderPageURL helpers instead of their own copies, and formRawUpdate strips server-managed fields through the shared stripFormServerManagedFields helper. Update the integration test cases and regenerate the command docs.
developerkunal
marked this pull request as ready for review
September 8, 2026 07:19
The published OpenAPI schema cannot faithfully describe a real form graph: its FormNodePointer oneOf is non-exclusive, so the reserved "$ending" pointer that every real form uses matches two branches and fails validation. This is the same lossiness that already makes Forms send raw JSON. Validating the node graph against that schema rejected valid forms, including the shipped --example body. Forms --data now checks only what is trustworthy locally (valid JSON object, and a name on create) and sends the body verbatim; the API validates the graph. Updates the integration assertions for the new messages.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1626 +/- ##
==========================================
+ Coverage 60.60% 61.31% +0.70%
==========================================
Files 135 151 +16
Lines 26385 30252 +3867
==========================================
+ Hits 15991 18548 +2557
- Misses 9407 10468 +1061
- Partials 987 1236 +249 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bkiran6398
approved these changes
Sep 9, 2026
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.
🔧 Changes
Add first-class Auth0 Forms management to the CLI:
forms list,show,create,update,delete,open,export, andimport.--dataas inline JSON, a file (@form.json), or piped stdin. Oncreateandupdatethe payload is validated against the OpenAPI schema before it is sent, and it cannot be combined with the scalar flags (--name,--language-*). Bodies are sent as raw JSON so STEP/ROUTER node config is preserved instead of being dropped by the typed request models.auth0 forms createprompts for a name and creates a minimal scaffold.auth0 forms create --editopens the complete JSON body in an editor.auth0 forms create --exampleprints an embedded example body suitable for--data.auth0 forms create --schemaandauth0 forms update --schemaprint the accepted request payload schema.forms importaccepts both a flat form graph and the Dashboard envelope (version,form,flows,connections), creating the bundled flows and mapping each#CONN-N#placeholder to a vault connection (interactively or with--connection).forms open, reusing the shared builder-URL helpers that the Flows commands use.Additional updates:
--forcefor Forms deletion in agent mode.🔬 Testing
go vet, and lint pass.make docsand verified in sync.--data. The integration suite runs against a live tenant, so those updated cases have not been re-run since the--datamigration.📝 Checklist