Skip to content

Commit

Permalink
Merge pull request #7 from BRP-API/chore/sync-met-source-repo_925c27d
Browse files Browse the repository at this point in the history
sync met 'BRP-API/brp-shared-dotnet' repo
  • Loading branch information
MelvLee authored Jun 10, 2024
2 parents 2dcac18 + 707e708 commit be9dca5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
5 changes: 4 additions & 1 deletion features/step_definitions/als-stepdefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ const apiEndpointPrefixMap = new Map([
['personen', 'brp'],
['reisdocumenten', 'reisdocumenten'],
['verblijfplaatshistorie', 'brphistorie'],
['bestaat-niet', 'brp']
// niet bestaande endpoints
['ingezetenen', 'brp'],
['paspoorten', 'reisdocumenten'],
['verblijfhistorie', 'brphistorie']
]);

When(/^([a-zA-Z-]*) wordt gezocht met de volgende parameters$/, async function (endpoint, dataTable) {
Expand Down
11 changes: 7 additions & 4 deletions features/step_definitions/requestHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,21 @@ function createRequestBody(dataTable) {
return !param.naam.startsWith("header:");
})
.forEach(function(param) {
if (isArrayParameter(type, param)) {
if (param.naam === '' && param.waarde === '') {
// do nothing
}
else if (isArrayParameter(type, param)) {
requestBody[param.naam] = param.waarde === ''
? []
: param.waarde.split(',');
}
else if(param.naam === 'burgerservicenummer (als string)') {
else if (param.naam === 'burgerservicenummer (als string)') {
requestBody['burgerservicenummer'] = param.waarde;
}
else if(param.naam === 'fields (als string)') {
else if (param.naam === 'fields (als string)') {
requestBody['fields'] = param.waarde;
}
else if(param.waarde === '(131 maal aNummer)') {
else if (param.waarde === '(131 maal aNummer)') {
requestBody[param.naam] = [];
for(let count=0; count<=131; count++) {
requestBody[param.naam].push('aNummer');
Expand Down

0 comments on commit be9dca5

Please sign in to comment.