Skip to content

Commit

Permalink
Added regex replacement feature to nameMappings documentation. Issue #…
Browse files Browse the repository at this point in the history
  • Loading branch information
dmartinezgomez committed Oct 2, 2017
1 parent ee32a69 commit 493357d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES_NEXT_RELEASE
@@ -0,0 +1 @@
[cygnus-ngsi][NGSINameMappingsInterceptor] Allow regular expression replacement for EntityIds (#1456)
Expand Up @@ -171,6 +171,26 @@ $ cat /path/to/conf/name_mappings.conf
]
}
```
In addition, It's allowed to use regular expressions for EntityIds replacement. For instance, if we want to rename EntityIds maintaining each entity number:

```
{
"serviceMappings": [{
"originalService": "service",
"newService": "new_service",
"servicePathMappings": [{
"originalServicePath": "/subservice",
"newServicePath": "/new_subservice",
"entityMappings": [{
"originalEntityType": "myentitytype",
"originalEntityId": "(myentityid)([0-9]*)",
"newEntityId": "new_myentityid$2",
"attributeMappings": []
}]
}]
}]
}
```

[Top](#top)

Expand Down

0 comments on commit 493357d

Please sign in to comment.