Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .claude/skills/mendix/rest-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,34 @@ Use this skill when creating, modifying, or calling Consumed REST Clients in MDL
- Calling REST service operations from microflows (`SEND REST REQUEST`)
- Listing or inspecting REST clients (`SHOW REST CLIENTS`, `DESCRIBE REST CLIENT`)

## JSON Structures

Define JSON structures from a sample snippet before creating import/export mappings.

```sql
CREATE JSON STRUCTURE Module.Name SNIPPET '{"id": 1, "name": "John"}';

-- Multi-line (use $$ quoting)
CREATE JSON STRUCTURE Module.Name SNIPPET $${ "id": 1, "items": [{"name": "A"}] }$$;

-- With documentation
CREATE JSON STRUCTURE Module.Name COMMENT 'API response' SNIPPET '...';

-- Custom name mapping for non-English keys
CREATE JSON STRUCTURE Module.Name SNIPPET $${"kvkNummer": "123"}$$
CUSTOM NAME MAP ('kvkNummer' AS 'ChamberOfCommerceNumber');

-- Idempotent update
CREATE OR REPLACE JSON STRUCTURE Module.Name SNIPPET '...';

-- Browse and delete
SHOW JSON STRUCTURES;
DESCRIBE JSON STRUCTURE Module.Name;
DROP JSON STRUCTURE Module.Name;
```

Type inference: ISO 8601 strings → DateTime, integers → Integer, decimals → Decimal, booleans → Boolean. Snippet is auto-formatted when stored.

## CREATE REST CLIENT

```sql
Expand Down
2 changes: 2 additions & 0 deletions cmd/mxcli/lsp_completions_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions docs/01-project/MDL_QUICK_REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,18 @@ CREATE OR REPLACE NAVIGATION Responsive

**Export levels:** `'Hidden'` (default, internal to module), `'Public'` (accessible from other modules).

## JSON Structures

| Statement | Syntax | Notes |
|-----------|--------|-------|
| Show structures | `SHOW JSON STRUCTURES [IN Module];` | List all or filter by module |
| Describe structure | `DESCRIBE JSON STRUCTURE Module.Name;` | Re-executable CREATE OR REPLACE + element tree |
| Create structure | `CREATE JSON STRUCTURE Module.Name [COMMENT 'text'] SNIPPET '...json...';` | Element tree auto-built from snippet |
| Create (multi-line) | `CREATE JSON STRUCTURE Module.Name SNIPPET $${ "key": "value" }$$;` | Dollar-quoted snippet for readability |
| Create or replace | `CREATE OR REPLACE JSON STRUCTURE Module.Name SNIPPET '...';` | Idempotent — preferred for AI agents |
| Create with name map | `CREATE JSON STRUCTURE Module.Name SNIPPET '...' CUSTOM NAME MAP ('jsonKey' AS 'CustomName', ...);` | Override auto-generated ExposedNames |
| Drop structure | `DROP JSON STRUCTURE Module.Name;` | |

## Java Actions

| Statement | Syntax | Notes |
Expand Down
Loading