Problem
When creating consumed OData services with CREATE ODATA CLIENT, the MetadataUrl parameter currently only supports HTTP/HTTPS URLs. This creates friction in several scenarios:
- Offline development — developers working without network access cannot create OData clients
- Testing and CI/CD — test environments often use local metadata snapshots to ensure reproducibility
- Version-pinned metadata — teams want to lock to a specific metadata version rather than fetching from a live service
- Pre-production services — metadata for services under development may only exist as files, not deployed endpoints
Proposed Solution
Allow MetadataUrl to accept file:// URLs pointing to local XML metadata files:
```mdl
-- Absolute path
CREATE ODATA CLIENT MyModule.ExternalAPI (
MetadataUrl: 'file:///Users/username/projects/metadata/service.xml'
);
-- Relative path (relative to project .mpr directory)
CREATE ODATA CLIENT MyModule.LocalService (
MetadataUrl: 'file://./metadata/local-service.xml'
);
```
Key Behavior
- Protocol detection — If
MetadataUrl starts with file://, read from local filesystem instead of HTTP
- Path resolution:
file:///absolute/path → absolute path
file://./relative/path → relative to .mpr file directory
- Hash calculation — SHA256 hash computed identically to HTTP-fetched metadata (for change detection)
- Backwards compatible — existing HTTP/HTTPS URLs work unchanged
Benefits
- Offline development — no network required to set up OData clients
- Reproducibility — metadata snapshots ensure consistent test/CI behavior
- Team collaboration — commit metadata files alongside code in version control
- Pre-production integration — test against upcoming API changes before deployment
- Firewall-friendly — works in locked-down corporate environments
Implementation Details
See full proposal: `docs/11-proposals/PROPOSAL_odata_local_metadata.md`
Estimated effort: 2-3 hours
Problem
When creating consumed OData services with
CREATE ODATA CLIENT, theMetadataUrlparameter currently only supports HTTP/HTTPS URLs. This creates friction in several scenarios:Proposed Solution
Allow
MetadataUrlto acceptfile://URLs pointing to local XML metadata files:```mdl
-- Absolute path
CREATE ODATA CLIENT MyModule.ExternalAPI (
MetadataUrl: 'file:///Users/username/projects/metadata/service.xml'
);
-- Relative path (relative to project .mpr directory)
CREATE ODATA CLIENT MyModule.LocalService (
MetadataUrl: 'file://./metadata/local-service.xml'
);
```
Key Behavior
MetadataUrlstarts withfile://, read from local filesystem instead of HTTPfile:///absolute/path→ absolute pathfile://./relative/path→ relative to.mprfile directoryBenefits
Implementation Details
See full proposal: `docs/11-proposals/PROPOSAL_odata_local_metadata.md`
Estimated effort: 2-3 hours