Skip to content

fix: strip REST path slashes and validate microflow param entity refs#170

Merged
ako merged 1 commit intomendixlabs:mainfrom
engalar:fix/doctype-test-failures
Apr 10, 2026
Merged

fix: strip REST path slashes and validate microflow param entity refs#170
ako merged 1 commit intomendixlabs:mainfrom
engalar:fix/doctype-test-failures

Conversation

@engalar
Copy link
Copy Markdown
Contributor

@engalar engalar commented Apr 10, 2026

Summary

  • Strip leading/trailing slashes from REST operation paths at parse time (CE6550/CE6551)
  • Add MDL008 validation: reject bare entity names in microflow parameters (e.g., Object without module prefix)
  • Fix test data: REST param case $Id$id, workflow params ObjectSystem.Workflow

Root causes

Failure Root cause Fix
CE6550/CE6551 path slashes visitor_rest.go stored paths as-is strings.Trim(path, "/") at parse time
CE0350/CE0352 param mismatch Test data typo $Id vs {id} Fixed to $id
entity '.Object' not found No validation for bare entity names in params Added MDL008 rule in both ValidateMicroflow and ValidateMicroflowBody

Test plan

  • mxcli check workflow-microflow-actions.mdl now catches Object → 3 MDL008 errors
  • Fixed test data passes mxcli check
  • go test ./mdl/... passes with 0 failures

@engalar engalar force-pushed the fix/doctype-test-failures branch from e35eea2 to 9c14ffc Compare April 10, 2026 01:12
Root causes of TestMxCheck_DoctypeScripts failures:

1. REST service operation paths with leading/trailing slashes were
   stored as-is in BSON (CE6550/CE6551). Now stripped at parse time
   in visitor_rest.go.

2. Microflow parameters with bare entity names like "Object" (missing
   module prefix) were not caught by mxcli check. Added MDL008
   validation in both ValidateMicroflow (linter) and
   ValidateMicroflowBody (semantic validator).

3. Test data fixes: REST param case mismatch ($Id → $id), workflow
   params (Object → System.Workflow/System.WorkflowUserTask).
@engalar engalar force-pushed the fix/doctype-test-failures branch from 9c14ffc to e1d9fd2 Compare April 10, 2026 01:58
@ako ako merged commit 50e3c10 into mendixlabs:main Apr 10, 2026
1 of 2 checks passed
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