Skip to content

Commit 437d19e

Browse files
akoclaude
andcommitted
docs(proposal): address issue #44 — add auto-import from OData contracts
- Fix stale note claiming actions aren't stored (they are, in Metadata XML) - Add "Auto-Import from Contract" section to Phase 2 covering: - IMPORT EXTERNAL ENTITY from $metadata - IMPORT EXTERNAL ACTION with NPE generation for request/response payloads - Link issue #44 in relevant sections Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6d98e97 commit 437d19e

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

docs/11-proposals/integration-pane-proposal.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ SHOW EXTERNAL ACTIONS IN MyModule; -- Filter by module
106106

107107
Output columns: `Service`, `Action`, `Parameters`, `UsedBy` (microflow names)
108108

109-
> **Note:** OData action definitions from `$metadata` are NOT stored in the MPR. We can only show actions that are actually *used* in microflows. Phase 2 would add `$metadata` fetching.
109+
> **Note:** Phase 1 discovers actions from microflow usage only. Phase 2 will parse the cached `$metadata` XML to list ALL available actions from the contract, including those not yet used. See also [mendixlabs/mxcli#44](https://github.com/mendixlabs/mxcli/issues/44).
110110
111111
#### Published REST Services
112112
```sql
@@ -360,7 +360,27 @@ DESCRIBE CONTRACT ENTITY MyModule.SalesforceAPI.PurchaseOrder;
360360

361361
Catalog tables:
362362
- `contract_entities` — entity types from cached `$metadata` (name, properties, key, service ref)
363-
- `contract_actions` — function imports / actions from cached `$metadata`
363+
- `contract_actions` — function imports / actions from cached `$metadata` (name, parameters, return type)
364+
365+
### Auto-Import from Contract ([mendixlabs/mxcli#44](https://github.com/mendixlabs/mxcli/issues/44))
366+
367+
Once contracts are parsed, support importing assets into the project:
368+
369+
```sql
370+
-- Import a specific entity from the OData contract as an external entity
371+
IMPORT EXTERNAL ENTITY MyModule.SalesforceAPI.PurchaseOrder;
372+
373+
-- Import an action and its request/response NPEs (non-persistent entities)
374+
IMPORT EXTERNAL ACTION MyModule.SalesforceAPI.CreateOrder;
375+
```
376+
377+
`IMPORT EXTERNAL ACTION` should:
378+
1. Parse the action's parameter and return types from the `$metadata`
379+
2. Create NPEs (non-persistent entities) for complex type parameters and return types
380+
3. Create the external action reference so `CALL EXTERNAL ACTION` can use it
381+
4. Map Edm types to Mendix attribute types (Edm.String → String, Edm.Int64 → Long, etc.)
382+
383+
This addresses the core request in issue #44: users want to browse available actions and auto-import them with their payload entities, rather than manually creating the domain model.
364384

365385
### AsyncAPI Document Parsing
366386

0 commit comments

Comments
 (0)