diff --git a/specificatie/bewoner.yaml b/specificatie/bewoner.yaml new file mode 100644 index 0000000..3de74e7 --- /dev/null +++ b/specificatie/bewoner.yaml @@ -0,0 +1,23 @@ +openapi: 3.1.0 +info: + title: Bewoner type definitie + version: 2.0.0 + contact: {} +paths: {} +components: + schemas: + GbaBewoner: + type: object + properties: + burgerservicenummer: + $ref: 'brp/identificatienummers/burgerservicenummer-v1.yaml#/components/schemas/Burgerservicenummer' + geheimhoudingPersoonsgegevens: + $ref: 'brp/geheim/indicatie-geheim-v1.yaml#/components/schemas/IndicatieGeheim' + verblijfplaatsInOnderzoek: + $ref: 'brp/in-onderzoek-v1.yaml#/components/schemas/InOnderzoek' + geslacht: + $ref: 'brp/geslacht/geslachtsaanduiding-v1.yaml#/components/schemas/Geslachtsaanduiding' + naam: + $ref: 'brp/naam/naam-basis-v1.yaml#/components/schemas/NaamBasis' + geboorte: + $ref: 'brp/geboorte/geboorte-basis-v1.yaml#/components/schemas/GeboorteBasis' diff --git a/specificatie/bewoning.yaml b/specificatie/bewoning.yaml new file mode 100644 index 0000000..ec96222 --- /dev/null +++ b/specificatie/bewoning.yaml @@ -0,0 +1,43 @@ +openapi: 3.1.0 +info: + title: Bewoning type definitie + version: 2.0.0 + contact: {} +paths: {} +components: + schemas: + GbaBewoning: + description: | + Een bewoning geeft aan welke personen in een periode (mogelijk) op een adresseerbaar object staan ingeschreven. + + Een persoon is een mogelijke bewoner als niet met zekerheid kan worden bepaald of de persoon in de bewoningperiode op het adresseerbaar object staat/stond ingeschreven. + Dit is het geval als de datum aanvang of de datum einde van de inschrijving geheel of deels onbekend is, en de onzekerheidsperiode overlapt de bewoningperiode. + + Wanneer een bewoning in totaal meer dan 100 bewoners en/of mogelijke bewoners heeft, wordt het **indicatieVeelBewoners** veld geleverd. + + type: object + properties: + adresseerbaarObjectIdentificatie: + $ref: 'brp/adres/adresseerbaar-object-identificatie-v1.yaml#/components/schemas/AdresseerbaarObjectIdentificatie' + periode: + $ref: 'brp-api/datum/periode-v1.yaml#/components/schemas/Periode' + bewoners: + type: array + description: | + De personen die in de bewoning periode staan ingeschreven op het adresseerbaar object. + minItems: 0 + maxItems: 100 + items: + $ref: 'bewoner.yaml#/components/schemas/GbaBewoner' + mogelijkeBewoners: + type: array + description: | + De personen die in de bewoning periode mogelijk staan ingeschreven op het adresseerbaar object. + minItems: 0 + maxItems: 100 + items: + $ref: 'bewoner.yaml#/components/schemas/GbaBewoner' + indicatieVeelBewoners: + type: boolean + description: | + Geeft aan dat de bewoning in totaal meer dan 100 bewoners en/of mogelijke bewoners heeft. diff --git a/specificatie/openapi.yaml b/specificatie/openapi.yaml index 4246137..04aa5f6 100644 --- a/specificatie/openapi.yaml +++ b/specificatie/openapi.yaml @@ -1,4 +1,11 @@ openapi: 3.1.0 +servers: + - description: | + Proef omgeving + url: https://proefomgeving.haalcentraal.nl/haalcentraal/api/bewoning + - description: | + Lokaal + url: http://localhost:5010/haalcentraal/api/bewoning info: title: Haal Centraal BRP bewoning description: | @@ -9,13 +16,6 @@ info: license: name: European Union Public License, version 1.2 (EUPL-1.2) url: https://eupl.eu/1.2/nl/ -servers: - - description: | - Proef omgeving - url: https://proefomgeving.haalcentraal.nl/haalcentraal/api/bewoning - - description: | - Lokaal - url: http://localhost:5010/haalcentraal/api/bewoning tags: - name: Bewoning paths: @@ -31,35 +31,35 @@ paths: operationId: Bewoningen requestBody: content: - application/json; charset=utf-8: + 'application/json; charset=utf-8': schema: - $ref: '#/components/schemas/BewoningenQuery' + $ref: "#/components/schemas/BewoningenQuery" responses: '200': description: | Zoekactie geslaagd content: - application/json; charset=utf-8: + 'application/json; charset=utf-8': schema: - $ref: '#/components/schemas/GbaBewoningenQueryResponse' + $ref: "#/components/schemas/GbaBewoningenQueryResponse" '400': - $ref: '#/components/responses/400' + $ref: 'problem-details/400-bad-request-response-v1.yaml#/components/responses/400' '401': - $ref: '#/components/responses/401' + $ref: 'problem-details/401-unauthorized-response-v1.yaml#/components/responses/401' '403': - $ref: '#/components/responses/403' + $ref: 'problem-details/403-forbidden-response-v1.yaml#/components/responses/403' '406': - $ref: '#/components/responses/406' + $ref: 'problem-details/406-not-acceptable-response-v1.yaml#/components/responses/406' '429': - $ref: '#/components/responses/429' + $ref: 'problem-details/429-too-many-requests-response-v1.yaml#/components/responses/429' '500': - $ref: '#/components/responses/500' + $ref: 'problem-details/500-internal-server-error-response-v1.yaml#/components/responses/500' '501': - $ref: '#/components/responses/501' + $ref: 'problem-details/501-not-implemented-response-v1.yaml#/components/responses/501' '503': - $ref: '#/components/responses/503' - default: - $ref: '#/components/responses/500' + $ref: 'problem-details/503-service-unavailable-response-v1.yaml#/components/responses/503' + 'default': + $ref: 'problem-details/500-internal-server-error-response-v1.yaml#/components/responses/500' tags: - Bewoning components: @@ -76,6 +76,7 @@ components: properties: type: type: string + BewoningMetPeildatum: required: - peildatum @@ -85,11 +86,12 @@ components: - type: object properties: peildatum: - $ref: '#/components/schemas/DatumFilter' + $ref: 'brp-api/query-parameters/datum-filter-v1.yaml#/components/schemas/DatumFilter' description: | de datum waarover de bewoning wordt opgevraagd. adresseerbaarObjectIdentificatie: - $ref: '#/components/schemas/AdresseerbaarObjectIdentificatieFilter' + $ref: 'brp-api/query-parameters/adresseerbaar-object-identificatie-filter-v1.yaml#/components/schemas/AdresseerbaarObjectIdentificatieFilter' + BewoningMetPeriode: required: - datumVan @@ -100,374 +102,19 @@ components: - type: object properties: datumVan: - $ref: '#/components/schemas/DatumFilter' + $ref: 'brp-api/query-parameters/datum-filter-v1.yaml#/components/schemas/DatumFilter' description: | de begindatum van de periode waarover de bewoning wordt opgevraagd. datumTot: - $ref: '#/components/schemas/DatumFilter' + $ref: 'brp-api/query-parameters/datum-filter-v1.yaml#/components/schemas/DatumFilter' description: | de einddatum van de periode waarover de bewoning wordt opgevraagd. adresseerbaarObjectIdentificatie: - $ref: '#/components/schemas/AdresseerbaarObjectIdentificatieFilter' + $ref: 'brp-api/query-parameters/adresseerbaar-object-identificatie-filter-v1.yaml#/components/schemas/AdresseerbaarObjectIdentificatieFilter' GbaBewoningenQueryResponse: type: object properties: bewoningen: type: array items: - $ref: '#/components/schemas/GbaBewoning' - DatumFilter: - type: string - format: date - example: '1964-09-24' - AdresseerbaarObjectIdentificatieFilter: - type: string - pattern: ^(?!0{16})[0-9]{16}$ - description: | - De identificatiecode van een adresseerbaar object uitgezonderd de standaardwaarde (0000000000000000) - example: '0226010000038820' - Foutbericht: - type: object - description: Terugmelding bij een fout. JSON representatie in lijn met [RFC7807](https://tools.ietf.org/html/rfc7807). - properties: - type: - description: Link naar meer informatie over deze fout - type: string - format: uri - title: - description: Beschrijving van de fout - type: string - pattern: ^[a-zA-Z0-9À-ž \.\-]{1,80}$ - status: - type: integer - minimum: 100 - maximum: 600 - description: Http status code - detail: - description: Details over de fout - type: string - pattern: ^[a-zA-Z0-9À-ž \.\-\(\),]{1,200}$ - instance: - description: Uri van de aanroep die de fout heeft veroorzaakt - type: string - format: uri - code: - description: Systeemcode die het type fout aangeeft - type: string - pattern: ^[a-zA-Z0-9]{1,25}$ - AdresseerbaarObjectIdentificatie: - type: string - pattern: ^[0-9]{16}$ - description: | - De identificatiecode van een adresseerbaar object. - example: '0226010000038820' - Datum: - type: string - format: date - example: '1964-09-24' - description: | - Datum conform ISO-8601 - Periode: - type: object - properties: - datumVan: - description: | - De begindatum van de periode. - type: string - format: date - example: '2020-01-01' - datumTot: - description: | - De einddatum van de periode. - type: string - format: date - example: '2021-01-01' - Burgerservicenummer: - type: string - pattern: ^[0-9]{9}$ - example: '555555021' - IndicatieGeheim: - description: | - Gegevens over het mogen verstrekken van persoonsgegevens aan derden / maatschappelijke instellingen. - type: integer - minimum: 0 - maximum: 7 - GbaDatum: - type: string - pattern: ^[0-9]{8}$ - example: '20180700' - InOnderzoek: - type: object - required: - - aanduidingGegevensInOnderzoek - - datumIngangOnderzoek - properties: - aanduidingGegevensInOnderzoek: - type: string - pattern: ^[0-9]{6}$ - example: '100000' - datumIngangOnderzoek: - $ref: '#/components/schemas/GbaDatum' - Waardetabel: - type: object - properties: - code: - type: string - pattern: ^[a-zA-Z0-9 \.]+$ - example: '6030' - omschrijving: - type: string - pattern: ^[a-zA-Z0-9À-ž \'\.\-\(\),]{1,200}$ - example: Nederland - Geslachtsaanduiding: - allOf: - - $ref: '#/components/schemas/Waardetabel' - - example: - code: M - omschrijving: man - Voornamen: - description: | - De verzameling namen voor de geslachtsnaam, gescheiden door spaties. - type: string - pattern: ^[a-zA-Z0-9À-ž \.\-\']{1,200}$ - maxLength: 200 - example: Pieter Jan - AdellijkeTitelPredicaatSoort: - type: string - enum: - - titel - - predicaat - AdellijkeTitelPredicaatType: - description: | - Wordt gevuld met waarden uit de landelijke tabel 'Adellijke titel/predicaat'. De property soort geeft aan of het een 'predicaat' of een 'titel' is. - allOf: - - $ref: '#/components/schemas/Waardetabel' - - properties: - soort: - $ref: '#/components/schemas/AdellijkeTitelPredicaatSoort' - example: - code: JV - omschrijving: jonkvrouw - soort: predicaat - Voorvoegsel: - type: string - pattern: ^[a-zA-Z \']{1,10}$ - maxLength: 10 - example: de - Geslachtsnaam: - type: string - pattern: ^[a-zA-Z0-9À-ž \.\-\']{1,200}$ - description: | - De achternaam van een persoon. - example: Vries - NaamBasis: - type: object - properties: - voornamen: - $ref: '#/components/schemas/Voornamen' - adellijkeTitelPredicaat: - $ref: '#/components/schemas/AdellijkeTitelPredicaatType' - voorvoegsel: - $ref: '#/components/schemas/Voorvoegsel' - geslachtsnaam: - $ref: '#/components/schemas/Geslachtsnaam' - GeboorteBasis: - type: object - properties: - datum: - $ref: '#/components/schemas/GbaDatum' - description: | - Datum waarop de persoon is geboren. - GbaBewoner: - type: object - properties: - burgerservicenummer: - $ref: '#/components/schemas/Burgerservicenummer' - geheimhoudingPersoonsgegevens: - $ref: '#/components/schemas/IndicatieGeheim' - verblijfplaatsInOnderzoek: - $ref: '#/components/schemas/InOnderzoek' - geslacht: - $ref: '#/components/schemas/Geslachtsaanduiding' - naam: - $ref: '#/components/schemas/NaamBasis' - geboorte: - $ref: '#/components/schemas/GeboorteBasis' - GbaBewoning: - description: | - Een bewoning geeft aan welke personen in een periode (mogelijk) op een adresseerbaar object staan ingeschreven. - - Een persoon is een mogelijke bewoner als niet met zekerheid kan worden bepaald of de persoon in de bewoningperiode op het adresseerbaar object staat/stond ingeschreven. - Dit is het geval als de datum aanvang of de datum einde van de inschrijving geheel of deels onbekend is, en de onzekerheidsperiode overlapt de bewoningperiode. - - Wanneer een bewoning in totaal meer dan 100 bewoners en/of mogelijke bewoners heeft, wordt het **indicatieVeelBewoners** veld geleverd. - type: object - properties: - adresseerbaarObjectIdentificatie: - $ref: '#/components/schemas/AdresseerbaarObjectIdentificatie' - periode: - $ref: '#/components/schemas/Periode' - bewoners: - type: array - description: | - De personen die in de bewoning periode staan ingeschreven op het adresseerbaar object. - minItems: 0 - maxItems: 100 - items: - $ref: '#/components/schemas/GbaBewoner' - mogelijkeBewoners: - type: array - description: | - De personen die in de bewoning periode mogelijk staan ingeschreven op het adresseerbaar object. - minItems: 0 - maxItems: 100 - items: - $ref: '#/components/schemas/GbaBewoner' - indicatieVeelBewoners: - type: boolean - description: | - Geeft aan dat de bewoning in totaal meer dan 100 bewoners en/of mogelijke bewoners heeft. - InvalidParam: - type: object - description: Details over fouten in opgegeven parameters - properties: - type: - type: string - format: uri - example: https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1 - name: - description: Naam van de parameter - type: string - pattern: ^[a-zA-Z0-9\._]{1,30}$ - example: huisnummer - code: - description: Systeemcode die het type fout aangeeft - type: string - pattern: ^[a-zA-Z0-9]{1,25}$ - example: integer - reason: - description: Beschrijving van de fout op de parameterwaarde - type: string - pattern: ^[a-zA-Z0-9\., ]{1,80}$ - example: Waarde is geen geldig getal. - BadRequestFoutbericht: - allOf: - - $ref: '#/components/schemas/Foutbericht' - - type: object - properties: - invalidParams: - description: | - Foutmelding per fout in een parameter. Alle gevonden fouten worden één keer teruggemeld. - type: array - items: - $ref: '#/components/schemas/InvalidParam' - responses: - '400': - description: Bad Request - content: - application/problem+json: - schema: - $ref: '#/components/schemas/BadRequestFoutbericht' - example: - type: https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1 - title: Ten minste één parameter moet worden opgegeven. - status: 400 - detail: The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modification. - instance: https://datapunt.voorbeeldgemeente.nl/api/v1/resourcenaam?parameter=waarde - code: paramsRequired - invalidParams: - - type: https://www.vng.nl/realisatie/api/validaties/integer - name: huisnummer - code: integer - reason: Waarde is geen geldig getal. - '401': - description: Unauthorized - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Foutbericht' - example: - type: https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2 - title: Niet correct geauthenticeerd. - status: 401 - detail: The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource. - instance: https://datapunt.voorbeeldgemeente.nl/api/v1/resourcenaam?parameter=waarde - code: authentication - '403': - description: Forbidden - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Foutbericht' - example: - type: https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4 - title: U bent niet geautoriseerd voor deze operatie. - status: 403 - detail: The server understood the request, but is refusing to fulfill it. - instance: https://datapunt.voorbeeldgemeente.nl/api/v1/resourcenaam?parameter=waarde - code: autorisation - '406': - description: Not Acceptable - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Foutbericht' - example: - type: https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7 - title: Gevraagde contenttype wordt niet ondersteund. - status: 406 - detail: The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to thr accept headers sent in the request - instance: https://datapunt.voorbeeldgemeente.nl/api/v1/resourcenaam?parameter=waarde - code: notAcceptable - '429': - description: Too Many Requests - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Foutbericht' - example: - type: https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html - title: Too many request - status: 429 - detail: The user has sent too many requests in a given amount of time (rate limiting). - instance: https://datapunt.voorbeeldgemeente.nl/api/v1/resourcenaam?parameter=waarde - code: tooManyRequests - '500': - description: Internal Server Error - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Foutbericht' - example: - type: https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1 - title: Interne server fout. - status: 500 - detail: The server encountered an unexpected condition which prevented it from fulfilling the request. - instance: https://datapunt.voorbeeldgemeente.nl/api/v1/resourcenaam?parameter=waarde - code: serverError - '501': - description: Not Implemented - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Foutbericht' - example: - type: https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2 - title: Not Implemented - status: 501 - detail: The server does not support the functionality required to fulfill the request. - instance: https://datapunt.voorbeeldgemeente.nl/api/v1/resourcenaam?parameter=waarde - code: notImplemented - '503': - description: Service Unavailable - content: - application/problem+json: - schema: - $ref: '#/components/schemas/Foutbericht' - example: - type: https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4 - title: Bronservice BRP is tijdelijk niet beschikbaar. - status: 503 - detail: The service is currently unable to handle the request due to a temporary overloading or maintenance of the server. - instance: https://datapunt.voorbeeldgemeente.nl/api/v1/resourcenaam?parameter=waarde - code: notAvailable + $ref: 'bewoning.yaml#/components/schemas/GbaBewoning'