Some services expose runtime APIs and OpenAPI schemas at different URLs.
- Runtime endpoint: where requests are executed (
uxc <url> ...) - Schema URL: where operation metadata is discovered
UXC supports this with a layered strategy:
--schema-urlCLI override (highest priority)- User mapping file (
~/.uxc/schema_mappings.json) - Builtin mappings (for known services)
- Default OpenAPI probing (
/openapi.json,/swagger.json, ...)
uxc https://api.github.com -h \
--schema-url https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.jsonuxc <url> stays the execution target. --schema-url only changes schema discovery.
Path: ~/.uxc/schema_mappings.json
Example:
{
"version": 1,
"openapi": [
{
"host": "api.github.com",
"path_prefix": "/",
"schema_url": "https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json",
"priority": 100
}
]
}Field notes:
host: exact host match (required)path_prefix: optional path prefix filter (default all paths)schema_url: OpenAPI document URL (required)priority: higher wins when multiple rules match (default0)enabled: optional, defaults totrue
- Host matching is exact (case-insensitive).
- Path prefix must match the target URL path.
- If multiple rules match:
- user mapping beats builtin mapping
- higher
prioritywins - longer
path_prefixwins
For CI or testing:
UXC_SCHEMA_MAPPINGS_FILE=/tmp/schema_mappings.json uxc https://service.example.com -h