COVESA / COVESA/s2dm

🚀 Enhancement: Implement mapping file output for naming traceability

Open
#45 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
17
Forks
10
Avg merge
1d 10h
Merged PRs (30d)
2

Description

### Summary
Enhance the `s2dm export` CLI to optionally output a mapping file showing the applied naming transformations:
- Records `original_name → transformed_name` for each element exported
- Helps with traceability, debugging, and downstream tooling

### Example mapping file
```json
{
"User": { "original": "User", "transformed": "USER" },
"User.id": { "original": "id", "transformed": "id" },
"StatusEnum.ACTIVE": { "original": "ACTIVE", "transformed": "ACTIVE" }
}
```

### Example CLI
```bash
s2dm export jsonschema --output exported_schema.json --naming-config naming.yaml --mapping-output naming_map.json
```

### Acceptance criteria
✅ CLI supports `--mapping-output `
✅ Mapping file written during export when requested
✅ Works together with the naming processor

### Deliverables
- Logic to build name mapping during export
- File writer for JSON/YAML mapping output
- Example mapping file + docs

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.