feat(esg): {param} path-template substitution with consumed-param removal — implements the spec'd /recipes/{id} form

Claude-Session: https://claude.ai/code/session_01MtdgwpEeCUn6cUA5f1LMPj
This commit is contained in:
Joseph Doherty
2026-07-10 04:14:13 -04:00
parent d0b27b8957
commit eb7a913d22
3 changed files with 134 additions and 7 deletions
@@ -40,7 +40,7 @@ Each external system definition includes:
- **Method Definitions**: List of available API methods, each with:
- Method name.
- **HTTP method**: GET, POST, PUT, PATCH, or DELETE.
- **Path**: Relative path appended to the base URL (e.g., `/recipes/{id}`).
- **Path**: Relative path appended to the base URL (e.g., `/recipes/{id}`). A path may contain `{param}` placeholders (identifier-named — letter/underscore start, then letters/digits/underscores). At invocation each placeholder is replaced with the URL-escaped value of the like-named parameter, and that parameter is **consumed**: it is removed from both the GET/DELETE query string and the POST/PUT/PATCH JSON body so it is never duplicated. A placeholder with no matching parameter, or one whose value is null, is an authoring error and raises a clear `ArgumentException` naming the placeholder.
- Parameter definitions (name, type). Supports the extended type system (Boolean, Integer, Float, String, Object, List).
- Return type definition. Supports the extended type system for complex response structures.
@@ -72,7 +72,7 @@ Each database connection definition includes:
All external system calls are **HTTP/REST** with **JSON** serialization:
- The ESG acts as an HTTP client. The external system definition provides the base URL; each method definition specifies the HTTP method and relative path.
- Request parameters are serialized as JSON in the request body (POST/PUT/PATCH) or as query parameters (GET/DELETE).
- Request parameters are serialized as JSON in the request body (POST/PUT/PATCH) or as query parameters (GET/DELETE). Parameters consumed by `{param}` path-template substitution (see Method Definitions → Path) are carried in the URL path and excluded from both the body and the query string.
- Response bodies are deserialized from JSON into the method's defined return type.
- Credentials (API key header or Basic Auth header) are attached to every request per the system's authentication configuration.