You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: validate OData client ServiceUrl must be a constant reference
Studio Pro CE6825 requires the Service URL of a consumed OData service
to be a Mendix constant (e.g. @Module.ServiceUrlConstant), not a string
literal. Without this check mxcli silently wrote an invalid expression,
causing CE0117 + CE6825 errors on mx check.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
returnmdlerrors.NewNotFoundMsg("OData service", fmt.Sprint(stmt.Name), fmt.Sprintf("OData service not found: %s", stmt.Name))
1381
1390
}
1382
1391
1392
+
// validateServiceURL returns an error if url is not a constant reference (@Module.Name).
1393
+
// CE6825: Studio Pro requires the Service URL to be a constant, not a string literal.
1394
+
funcvalidateServiceURL(urlstring) error {
1395
+
if!strings.HasPrefix(url, "@") {
1396
+
returnmdlerrors.NewValidation("ServiceUrl must be a constant reference (e.g., @Module.ServiceUrlConstant) — Studio Pro CE6825: 'Service URL' must be a constant")
1397
+
}
1398
+
returnnil
1399
+
}
1400
+
1383
1401
// formatExprValue formats a Mendix expression value for MDL output.
1384
1402
// If the value is already a quoted string literal (starts/ends with '), it's output as-is.
1385
1403
// Otherwise, it's wrapped in single quotes for round-trip compatibility.
0 commit comments