Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toelichting toegevoegd aan GezagNietTeBepalen #1831

Merged
merged 26 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
455cfcc
toelichting toegevoegd aan GezagNietTeBepalen
fsamwel Sep 5, 2024
6bb5b9c
commit resolve artifacts
fsamwel Sep 5, 2024
cfbc7c4
maximale lengte toelichting verhoogd naar 400
fsamwel Sep 6, 2024
4081ebd
commit resolve artifacts
fsamwel Sep 6, 2024
9d97c4a
chore(oas): minderjarige veld toegevoegd aan GezagNietTeBepalen type
MelvLee Nov 13, 2024
1447302
chore(specs): toelichting bij gezag niet te bepalen scenarios toegevoegd
MelvLee Nov 13, 2024
e26bf26
Merge branch 'master' into api-specificaties-gezag-toelichting
MelvLee Nov 13, 2024
65bb768
commit resolve artifacts
MelvLee Nov 13, 2024
cd04eb6
Update toelichting-bij-gezag-niet-te-bepalen.feature
CathyDingemanse Nov 13, 2024
6f813df
chore(specs): duidelijkere titel toegevoegd
MelvLee Nov 14, 2024
3588254
chore(specs): minderjarige en toelichting veld toegevoegd aan Tijdeli…
MelvLee Nov 21, 2024
8611e65
chore: toelichting-bij-tijdelijk-geen-gezag.feature toegevoegd
MelvLee Nov 21, 2024
39504c4
commit resolve artifacts
MelvLee Nov 21, 2024
0575692
Merge branch 'master' into api-specificaties-gezag-toelichting
MelvLee Nov 26, 2024
322d768
chore(oas): oas specificatie refactored met behulp van brp-shared spe…
MelvLee Nov 26, 2024
fef8424
commit resolve artifacts
MelvLee Nov 26, 2024
95c96eb
chore(oas): refactoring tbv gebruik brp-shared type definities
MelvLee Nov 26, 2024
204cfba
commit resolve artifacts
MelvLee Nov 26, 2024
6a47011
Merge branch 'master' into api-specificaties-gezag-toelichting
MelvLee Nov 27, 2024
a87ef7e
chore(specs): toelichting features uitgebreid en aangepast om de req…
MelvLee Nov 27, 2024
0eb8053
chore(oas): minor version opgehoogd ivm toevoegen nieuwe functionaliteit
MelvLee Nov 27, 2024
609bb09
commit resolve artifacts
MelvLee Nov 27, 2024
d65190f
chore(specs): resolve typo
FrozenSync Dec 2, 2024
67a6c6c
chore(specs): resolve typo
FrozenSync Dec 2, 2024
0c172d6
feat(toelichting): uitwerking api specificatie gezag toelichting
nielskorporaal Dec 12, 2024
41db339
Merge branch 'master' into api-specificaties-gezag-toelichting
MelvLee Dec 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .spectral.yml

This file was deleted.

56 changes: 56 additions & 0 deletions features/step_definitions/als-stepdefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const fs = require('fs');
const { executeSqlStatements } = require('./postgresqlHelpers');
const { execute } = require('./postgresqlHelpers-2');
const { generateSqlStatementsFrom } = require('./sqlStatementsFactory');
const { arrayOfArraysToDataTable } = require('./dataTableFactory');

const { addDefaultAutorisatieSettings,
handleRequest } = require('./requestHelpers');
Expand Down Expand Up @@ -55,3 +56,58 @@ When(/^([a-zA-Z-]*) wordt gezocht met een '(\w*)' aanroep$/, async function (end

await handleRequest(this.context, relativeUrl, undefined, httpMethod);
});

When(/^gezag wordt gevraagd van '(.*)'$/, async function (aanduiding) {
if(this.context.afnemerID === undefined) {
this.context.afnemerID = this.context.oAuth.clients[0].afnemerID;
this.context.gemeenteCode = this.context.oAuth.clients[0].gemeenteCode;
}

if(this.context.gezag !== undefined) {
fs.writeFileSync(this.context.gezagDataPath, JSON.stringify(this.context.gezag, null, '\t'));
}
if(this.context.downstreamApiResponseHeaders !== undefined) {
fs.writeFileSync(this.context.downstreamApiDataPath + '/response-headers.json',
JSON.stringify(this.context.downstreamApiResponseHeaders[0], null, '\t'));
}
if(this.context.downstreamApiResponseBody !== undefined) {
fs.writeFileSync(this.context.downstreamApiDataPath + '/response-body.json',
this.context.downstreamApiResponseBody);
}

if(this.context.sqlData === undefined) {
this.context.sqlData = [{}];
}
addDefaultAutorisatieSettings(this.context, this.context.afnemerID);

if(this.context.data) {
await execute(generateSqlStatementsFrom(this.context.data));
}
else {
await executeSqlStatements(this.context.sql, this.context.sqlData, global.pool);
}

const aanduidingen = aanduiding.split(',');
let bsns = [];

aanduidingen.forEach(a => {
let burger_service_nr = this.context.data.personen.find(p => p.id === `persoon-${a}`).persoon.at(-1).burger_service_nr;
bsns.push(burger_service_nr);
});

const bsnString = bsns.filter(Boolean).join(",");

const data = [
["type", "RaadpleegMetBurgerservicenummer"],
["burgerservicenummer", bsnString],
["fields", "gezag"]
];

const relativeUrl = this.context.apiEndpointPrefixMap.has("personen")
? `${this.context.apiEndpointPrefixMap.get("personen")}/personen`
: '';

const dataTable = arrayOfArraysToDataTable(data);

await handleRequest(this.context, relativeUrl, dataTable);
})
Loading
Loading