Providing Your Own Mapping Configuration
You can use partial mapping files to override only the mapping configuration defaults you want to change.
Default mapping files are located in the /opt/mtx/conf/mapping/3GPP_schema_version/base. A stub mapping file referencing the default file is located in /opt/mtx/conf/mapping/3GPP_schema_version. The contents of the stub file are similar to the following:
baseFile: ${current.directory}/base/ChargingDataRequest-5230-mapping.yaml
Where the value of ${current.directory}
is replaced by the location of
the file when it is loaded.
Add your changes to the stub file after the baseFile
link to override
the matching properties in the defaults. For example to add your own output parameter
that adds an HTTP header to the response, add the following in
/opt/mtx/conf/R15-2019-12/ChargingDataResponse-5230-mapping.yaml:
baseFile: ${current.directory}/base/ChargingDataResponse-5230-mapping.yaml
outputParameters:
http-response-header-CustomHeader: {from: "#params.custom-input-parameter", default: "not set"}
This adds the output parameter entry to the existing mapping by merging the two files. If the default mapping configuration file is changed to fix an issue or support new functionality, those changes are adopted without you having to rebase your custom mapping configuration file.