Skip to content

Commit 009abc9

Browse files
akoclaude
andcommitted
docs: add integration help topic, OData reference page, browse-integrations skill
- cmd/mxcli/help_topics/integration.txt — unified help for all service types, contract browsing, and catalog queries (mxcli syntax integration) - cmd/mxcli/help.go — register integration, rest, contract syntax topics - docs-site/src/reference/odata/README.md — OData reference page with all SHOW/DESCRIBE/CREATE/CONTRACT commands and catalog tables - docs-site/src/SUMMARY.md — add OData and Integration entry - .claude/skills/mendix/browse-integrations.md — skill for browsing service contracts and catalog queries with import workflow Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 32802d8 commit 009abc9

File tree

5 files changed

+305
-0
lines changed

5 files changed

+305
-0
lines changed
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# Browse Integration Services and Contracts
2+
3+
This skill covers discovering external services, browsing cached contracts, and querying integration assets via the catalog.
4+
5+
## When to Use This Skill
6+
7+
- User asks what external services are configured in the project
8+
- User wants to see available entities or actions from an OData service
9+
- User wants to browse a business event contract (AsyncAPI)
10+
- User asks about integration catalog tables
11+
- User wants to find entities available in a contract but not yet imported
12+
13+
## Discovery: List All Services
14+
15+
```sql
16+
-- All OData clients (consumed services)
17+
SHOW ODATA CLIENTS;
18+
19+
-- All published OData services
20+
SHOW ODATA SERVICES;
21+
22+
-- All consumed REST services
23+
SHOW REST CLIENTS;
24+
25+
-- All published REST services
26+
SHOW PUBLISHED REST SERVICES;
27+
28+
-- All business event services
29+
SHOW BUSINESS EVENT SERVICES;
30+
31+
-- All database connections
32+
SHOW DATABASE CONNECTIONS;
33+
34+
-- All external entities (imported from OData)
35+
SHOW EXTERNAL ENTITIES;
36+
37+
-- All external actions used in microflows
38+
SHOW EXTERNAL ACTIONS;
39+
```
40+
41+
## Contract Browsing: OData $metadata
42+
43+
`CREATE ODATA CLIENT` auto-fetches and caches the `$metadata` XML. Browse it without network access:
44+
45+
```sql
46+
-- List all entity types from the contract
47+
SHOW CONTRACT ENTITIES FROM MyModule.SalesforceAPI;
48+
49+
-- List actions/functions
50+
SHOW CONTRACT ACTIONS FROM MyModule.SalesforceAPI;
51+
52+
-- Inspect a specific entity (properties, keys, navigation)
53+
DESCRIBE CONTRACT ENTITY MyModule.SalesforceAPI.PurchaseOrder;
54+
55+
-- Generate a CREATE EXTERNAL ENTITY statement from the contract
56+
DESCRIBE CONTRACT ENTITY MyModule.SalesforceAPI.PurchaseOrder FORMAT mdl;
57+
58+
-- Inspect an action's signature
59+
DESCRIBE CONTRACT ACTION MyModule.SalesforceAPI.CreateOrder;
60+
```
61+
62+
## Contract Browsing: AsyncAPI (Business Events)
63+
64+
Business event client services cache the AsyncAPI YAML:
65+
66+
```sql
67+
-- List channels
68+
SHOW CONTRACT CHANNELS FROM MyModule.ShopEventsClient;
69+
70+
-- List messages with payload info
71+
SHOW CONTRACT MESSAGES FROM MyModule.ShopEventsClient;
72+
73+
-- Inspect a message's payload properties
74+
DESCRIBE CONTRACT MESSAGE MyModule.ShopEventsClient.OrderChangedEvent;
75+
```
76+
77+
## Catalog Queries (requires REFRESH CATALOG)
78+
79+
```sql
80+
REFRESH CATALOG;
81+
82+
-- All contract entities across all OData clients
83+
SELECT ServiceQualifiedName, EntityName, EntitySetName, PropertyCount, Summary
84+
FROM CATALOG.CONTRACT_ENTITIES;
85+
86+
-- All contract actions
87+
SELECT ServiceQualifiedName, ActionName, ParameterCount, ReturnType
88+
FROM CATALOG.CONTRACT_ACTIONS;
89+
90+
-- All contract messages
91+
SELECT ServiceQualifiedName, MessageName, ChannelName, OperationType, PropertyCount
92+
FROM CATALOG.CONTRACT_MESSAGES;
93+
94+
-- Find available entities NOT YET imported
95+
SELECT ce.EntityName, ce.ServiceQualifiedName, ce.PropertyCount
96+
FROM CATALOG.CONTRACT_ENTITIES ce
97+
LEFT JOIN CATALOG.EXTERNAL_ENTITIES ee
98+
ON ce.ServiceQualifiedName = ee.ServiceName AND ce.EntityName = ee.RemoteName
99+
WHERE ee.Id IS NULL;
100+
101+
-- All REST operations across all consumed services
102+
SELECT ServiceQualifiedName, HttpMethod, Path, Name
103+
FROM CATALOG.REST_OPERATIONS
104+
ORDER BY ServiceQualifiedName, Path;
105+
106+
-- Cross-cutting: all integration services in a module
107+
SELECT ObjectType, QualifiedName
108+
FROM CATALOG.OBJECTS
109+
WHERE ObjectType IN ('ODATA_CLIENT', 'REST_CLIENT', 'ODATA_SERVICE',
110+
'PUBLISHED_REST_SERVICE', 'BUSINESS_EVENT_SERVICE', 'DATABASE_CONNECTION')
111+
AND ModuleName = 'Integration';
112+
```
113+
114+
## Workflow: Import an Entity from a Contract
115+
116+
1. Browse available entities:
117+
```sql
118+
SHOW CONTRACT ENTITIES FROM MyModule.SalesforceAPI;
119+
```
120+
121+
2. Inspect the entity you want:
122+
```sql
123+
DESCRIBE CONTRACT ENTITY MyModule.SalesforceAPI.PurchaseOrder;
124+
```
125+
126+
3. Generate the CREATE statement:
127+
```sql
128+
DESCRIBE CONTRACT ENTITY MyModule.SalesforceAPI.PurchaseOrder FORMAT mdl;
129+
```
130+
131+
4. Copy, customize (remove unwanted attributes), and execute:
132+
```sql
133+
CREATE EXTERNAL ENTITY MyModule.PurchaseOrder
134+
FROM ODATA CLIENT MyModule.SalesforceAPI (
135+
EntitySet: 'PurchaseOrders',
136+
RemoteName: 'PurchaseOrder',
137+
Countable: Yes
138+
)
139+
(
140+
Number: Long,
141+
Status: String(200),
142+
SupplierName: String(200),
143+
GrossAmount: Decimal
144+
);
145+
```

cmd/mxcli/help.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ Available topics:
166166
move - Show MOVE command syntax for relocating documents
167167
security - Show security management syntax (roles, access, GRANT/REVOKE)
168168
odata - Show OData client/service/external entity syntax
169+
rest - Show consumed and published REST service syntax
170+
integration - Show all integration services, contract browsing, catalog tables
169171
workflow - Show workflow commands syntax
170172
navigation - Show navigation profile management syntax
171173
structure - Show SHOW STRUCTURE command syntax
@@ -220,6 +222,12 @@ Example:
220222
showTopicHelp("security")
221223
case "odata":
222224
showTopicHelp("odata")
225+
case "rest", "rest-client", "rest-clients":
226+
showTopicHelp("rest")
227+
case "integration", "integrations", "services":
228+
showTopicHelp("integration")
229+
case "contract", "contracts":
230+
showTopicHelp("integration")
223231
case "workflow", "workflows":
224232
showTopicHelp("workflow")
225233
case "navigation", "nav":
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
Integration Services — Unified Discovery
2+
=========================================
3+
4+
mxcli provides a unified integration pane for discovering all external
5+
services and their available assets, similar to Studio Pro's Integration Pane.
6+
7+
SERVICE TYPES
8+
-------------
9+
10+
OData Clients: SHOW ODATA CLIENTS [IN Module];
11+
OData Services: SHOW ODATA SERVICES [IN Module];
12+
REST Clients: SHOW REST CLIENTS [IN Module];
13+
Published REST: SHOW PUBLISHED REST SERVICES [IN Module];
14+
Business Events: SHOW BUSINESS EVENT SERVICES [IN Module];
15+
DB Connections: SHOW DATABASE CONNECTIONS [IN Module];
16+
External Entities: SHOW EXTERNAL ENTITIES [IN Module];
17+
External Actions: SHOW EXTERNAL ACTIONS [IN Module];
18+
19+
CONTRACT BROWSING (cached contracts, no network needed)
20+
-------------------------------------------------------
21+
22+
OData — browse cached $metadata XML:
23+
SHOW CONTRACT ENTITIES FROM Module.Service;
24+
SHOW CONTRACT ACTIONS FROM Module.Service;
25+
DESCRIBE CONTRACT ENTITY Module.Service.EntityName;
26+
DESCRIBE CONTRACT ENTITY Module.Service.EntityName FORMAT mdl;
27+
DESCRIBE CONTRACT ACTION Module.Service.ActionName;
28+
29+
AsyncAPI — browse cached business event contracts:
30+
SHOW CONTRACT CHANNELS FROM Module.Service;
31+
SHOW CONTRACT MESSAGES FROM Module.Service;
32+
DESCRIBE CONTRACT MESSAGE Module.Service.MessageName;
33+
34+
CREATE ODATA CLIENT auto-fetches $metadata from MetadataUrl.
35+
36+
CATALOG TABLES (requires REFRESH CATALOG)
37+
------------------------------------------
38+
39+
-- Integration services
40+
SELECT * FROM CATALOG.ODATA_CLIENTS;
41+
SELECT * FROM CATALOG.ODATA_SERVICES;
42+
SELECT * FROM CATALOG.REST_CLIENTS;
43+
SELECT * FROM CATALOG.REST_OPERATIONS;
44+
SELECT * FROM CATALOG.PUBLISHED_REST_SERVICES;
45+
SELECT * FROM CATALOG.PUBLISHED_REST_OPERATIONS;
46+
SELECT * FROM CATALOG.BUSINESS_EVENT_SERVICES;
47+
SELECT * FROM CATALOG.BUSINESS_EVENTS;
48+
SELECT * FROM CATALOG.DATABASE_CONNECTIONS;
49+
50+
-- Imported assets
51+
SELECT * FROM CATALOG.EXTERNAL_ENTITIES;
52+
SELECT * FROM CATALOG.EXTERNAL_ACTIONS;
53+
54+
-- Contract assets (parsed from cached $metadata / AsyncAPI)
55+
SELECT * FROM CATALOG.CONTRACT_ENTITIES;
56+
SELECT * FROM CATALOG.CONTRACT_ACTIONS;
57+
SELECT * FROM CATALOG.CONTRACT_MESSAGES;
58+
59+
-- Cross-cutting: all integration touchpoints in a module
60+
SELECT ObjectType, QualifiedName FROM CATALOG.OBJECTS
61+
WHERE ObjectType IN ('ODATA_CLIENT', 'REST_CLIENT', 'ODATA_SERVICE',
62+
'PUBLISHED_REST_SERVICE', 'BUSINESS_EVENT_SERVICE', 'DATABASE_CONNECTION')
63+
AND ModuleName = 'MyModule';
64+
65+
-- Available entities not yet imported
66+
SELECT ce.EntityName, ce.ServiceQualifiedName, ce.PropertyCount
67+
FROM CATALOG.CONTRACT_ENTITIES ce
68+
LEFT JOIN CATALOG.EXTERNAL_ENTITIES ee
69+
ON ce.ServiceQualifiedName = ee.ServiceName AND ce.EntityName = ee.RemoteName
70+
WHERE ee.Id IS NULL;
71+
72+
See also: HELP ODATA, HELP REST

docs-site/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@
249249
- [Workflow Statements](reference/workflow/README.md)
250250
- [CREATE WORKFLOW](reference/workflow/create-workflow.md)
251251
- [DROP WORKFLOW](reference/workflow/drop-workflow.md)
252+
- [OData and Integration Statements](reference/odata/README.md)
252253
- [Business Event Statements](reference/business-event/README.md)
253254
- [CREATE BUSINESS EVENT SERVICE](reference/business-event/create-business-event-service.md)
254255
- [DROP BUSINESS EVENT SERVICE](reference/business-event/drop-business-event-service.md)
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# OData and Integration Statements
2+
3+
Statements for managing OData services, external entities, and browsing service contracts.
4+
5+
Mendix supports consuming and publishing OData services. Consumed services (OData clients) connect to remote OData endpoints and make external entity types available for use in your application. Published services expose your domain model entities as OData endpoints for other applications to consume.
6+
7+
## OData Client Statements
8+
9+
| Statement | Description |
10+
|-----------|-------------|
11+
| [CREATE ODATA CLIENT](create-odata-client.md) | Create a consumed OData service (auto-fetches $metadata) |
12+
| [ALTER ODATA CLIENT](alter-odata-client.md) | Modify OData client properties |
13+
| [DROP ODATA CLIENT](drop-odata-client.md) | Remove a consumed OData service |
14+
15+
## OData Service Statements (Published)
16+
17+
| Statement | Description |
18+
|-----------|-------------|
19+
| [CREATE ODATA SERVICE](create-odata-service.md) | Publish entities as an OData endpoint |
20+
| [ALTER ODATA SERVICE](alter-odata-service.md) | Modify published service properties |
21+
| [DROP ODATA SERVICE](drop-odata-service.md) | Remove a published OData service |
22+
23+
## External Entity Statements
24+
25+
| Statement | Description |
26+
|-----------|-------------|
27+
| [CREATE EXTERNAL ENTITY](create-external-entity.md) | Import an entity from a consumed OData service |
28+
29+
## Contract Browsing Statements
30+
31+
Browse available assets from cached service contracts without network access.
32+
33+
| Statement | Description |
34+
|-----------|-------------|
35+
| `SHOW CONTRACT ENTITIES FROM Module.Service` | List entity types from cached $metadata |
36+
| `SHOW CONTRACT ACTIONS FROM Module.Service` | List actions/functions from cached $metadata |
37+
| `DESCRIBE CONTRACT ENTITY Module.Service.Entity` | Show entity properties, types, keys |
38+
| `DESCRIBE CONTRACT ENTITY Module.Service.Entity FORMAT mdl` | Generate CREATE EXTERNAL ENTITY |
39+
| `DESCRIBE CONTRACT ACTION Module.Service.Action` | Show action parameters and return type |
40+
| `SHOW CONTRACT CHANNELS FROM Module.Service` | List channels from cached AsyncAPI |
41+
| `SHOW CONTRACT MESSAGES FROM Module.Service` | List messages from cached AsyncAPI |
42+
| `DESCRIBE CONTRACT MESSAGE Module.Service.Message` | Show message payload properties |
43+
44+
## Related Show/Describe Statements
45+
46+
| Statement | Syntax |
47+
|-----------|--------|
48+
| Show OData clients | `SHOW ODATA CLIENTS [IN module]` |
49+
| Show OData services | `SHOW ODATA SERVICES [IN module]` |
50+
| Show external entities | `SHOW EXTERNAL ENTITIES [IN module]` |
51+
| Show external actions | `SHOW EXTERNAL ACTIONS [IN module]` |
52+
| Describe OData client | `DESCRIBE ODATA CLIENT Module.Name` |
53+
| Describe OData service | `DESCRIBE ODATA SERVICE Module.Name` |
54+
| Describe external entity | `DESCRIBE EXTERNAL ENTITY Module.Name` |
55+
56+
## Catalog Tables
57+
58+
After `REFRESH CATALOG`, the following tables are available for SQL queries:
59+
60+
| Table | Contents |
61+
|-------|----------|
62+
| `CATALOG.ODATA_CLIENTS` | Consumed OData services |
63+
| `CATALOG.ODATA_SERVICES` | Published OData services |
64+
| `CATALOG.EXTERNAL_ENTITIES` | Imported external entities |
65+
| `CATALOG.EXTERNAL_ACTIONS` | External actions used in microflows |
66+
| `CATALOG.CONTRACT_ENTITIES` | Entity types from cached $metadata |
67+
| `CATALOG.CONTRACT_ACTIONS` | Actions/functions from cached $metadata |
68+
| `CATALOG.CONTRACT_MESSAGES` | Messages from cached AsyncAPI |
69+
70+
### Example: Find available entities not yet imported
71+
72+
```sql
73+
SELECT ce.EntityName, ce.ServiceQualifiedName, ce.PropertyCount
74+
FROM CATALOG.CONTRACT_ENTITIES ce
75+
LEFT JOIN CATALOG.EXTERNAL_ENTITIES ee
76+
ON ce.ServiceQualifiedName = ee.ServiceName
77+
AND ce.EntityName = ee.RemoteName
78+
WHERE ee.Id IS NULL;
79+
```

0 commit comments

Comments
 (0)