FUND-2458 DRC 1.7 (including DRC 1.6 with AC 1.1.0 ready) - #205
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds (partial) DRC API v1.7 support across contracts, validation, mapping, handlers, and controllers, and extends authorization behavior to optionally restrict results to “ready for publication” documents.
Changes:
- Introduces v1.7 DTOs, validators, mapping profiles, and a dedicated v1.7
EnkelvoudigInformatieObjectenController. - Adds v1.7 handler implementations for EIO create/update/get/list/lock flows, including performance-oriented paging/count caching in the list handler.
- Updates
VerzendingBusinessRuleServiceto be API-version aware (v1.7 relaxesverzenddatumrequirement) and updates unit tests accordingly.
Reviewed changes
Copilot reviewed 51 out of 52 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Tests/OneGround.ZGW.Documenten.WebApi.UnitTests/BusinessRulesTests/v1/5/VerzendingBusinessRuleTests.cs | Updates tests for new version-aware verzending validation; adds v1.7 scenario. |
| src/OneGround.ZGW.Notificaties.Web/Startup.cs | Removes unused using. |
| src/OneGround.ZGW.Documenten.Web/Validators/v1/7/Queries/EnkelvoudigInformatieObjectenQueryParametersValidator.cs | Adds v1.7 query parameter validation for list endpoint filters. |
| src/OneGround.ZGW.Documenten.Web/Validators/v1/7/EnkelvoudigInformatieObjectUpdateRequestValidator.cs | Adds v1.7 update request validator (includes base validator). |
| src/OneGround.ZGW.Documenten.Web/Validators/v1/7/EnkelvoudigInformatieObjectSearchRequestValidator.cs | Adds v1.7 search request validator for body-based search. |
| src/OneGround.ZGW.Documenten.Web/Validators/v1/7/EnkelvoudigInformatieObjectRequestValidator.cs | Adds shared v1.7 base request validation rules for EIO create/update. |
| src/OneGround.ZGW.Documenten.Web/Validators/v1/7/EnkelvoudigInformatieObjectCreateRequestValidator.cs | Adds v1.7 create request validator (includes base validator). |
| src/OneGround.ZGW.Documenten.Web/Startup.cs | Registers query+search parameter validations and wires API default version (currently still 1.5). |
| src/OneGround.ZGW.Documenten.Web/Models/v1/7/GetAllEnkelvoudigInformatieObjectenFilter.cs | Introduces v1.7 list/search filter model used by v1.7 handlers. |
| src/OneGround.ZGW.Documenten.Web/MappingProfiles/v1/RequestToDomainProfile.cs | Ensures older request mappings ignore new v1.7-only version fields. |
| src/OneGround.ZGW.Documenten.Web/MappingProfiles/v1/7/RequestToDomainProfile.cs | Adds request-to-domain mapping for v1.7 list/search and EIO create/update DTOs. |
| src/OneGround.ZGW.Documenten.Web/MappingProfiles/v1/7/MapLatestEnkelvoudigInformatieObjectVersieResponse.cs | Adds v1.7 mapping action to project latest version fields into GET response DTO. |
| src/OneGround.ZGW.Documenten.Web/MappingProfiles/v1/7/MapLatestEnkelvoudigInformatieObjectVersieRequest.cs | Adds v1.7 mapping action for PATCH merge mapping into update request DTO. |
| src/OneGround.ZGW.Documenten.Web/MappingProfiles/v1/7/MapDownloadLink.cs | Adds v1.7 mapping action to null out download link for meta-only/multipart cases. |
| src/OneGround.ZGW.Documenten.Web/MappingProfiles/v1/7/DomainToResponseProfile.cs | Adds v1.7 domain-to-response maps for EIO get/create/update responses and PATCH merge mapping. |
| src/OneGround.ZGW.Documenten.Web/Handlers/v1/7/UpdateEnkelvoudigInformatieObjectCommandHandler.cs | Adds v1.7 update (new version creation) handler with concurrency/locking strategy. |
| src/OneGround.ZGW.Documenten.Web/Handlers/v1/7/LockEnkelvoudigInformatieObjectCommandHandler.cs | Adds v1.7 lock/unlock handler with multipart cleanup on unlock. |
| src/OneGround.ZGW.Documenten.Web/Handlers/v1/7/GetEnkelvoudigInformatieObjectQueryHandler.cs | Adds v1.7 get handler supporting version/date selection and “ready for publication” filtering. |
| src/OneGround.ZGW.Documenten.Web/Handlers/v1/7/GetAllEnkelvoudigInformatieObjectenQueryHandler.cs | Adds v1.7 list handler with cached count and cursor/anchor paging optimizations. |
| src/OneGround.ZGW.Documenten.Web/Handlers/v1/7/CreateEnkelvoudigInformatieObjectCommandHandler.cs | Adds v1.7 create handler with DMS integration and unique-constraint race handling. |
| src/OneGround.ZGW.Documenten.Web/Handlers/v1/5/UpdateVerzendingCommandHandler.cs | Passes requested API version into verzending validation. |
| src/OneGround.ZGW.Documenten.Web/Handlers/v1/5/CreateVerzendingCommandHandler.cs | Passes requested API version into verzending validation. |
| src/OneGround.ZGW.Documenten.Web/Extensions/QueryAndSearchParameterValidationsExtensions.cs | Registers both query and search body validation filters, including v1.7 types. |
| src/OneGround.ZGW.Documenten.Web/Controllers/v1/EnkelvoudigInformatieObjectenController.cs | Expands Produces and marks delete endpoint as supporting v1.7. |
| src/OneGround.ZGW.Documenten.Web/Controllers/v1/7/EnkelvoudigInformatieObjectenController.cs | Adds v1.7 controller with list/get/search/create/update/patch/download/lock/unlock endpoints. |
| src/OneGround.ZGW.Documenten.Web/Controllers/v1/5/VerzendingenController.cs | Routes v1.7 to v1.5 controller and passes version into commands. |
| src/OneGround.ZGW.Documenten.Web/Controllers/v1/5/ObjectInformatieObjectenController.cs | Declares v1.7 support for existing v1.5 controller. |
| src/OneGround.ZGW.Documenten.Web/Controllers/v1/5/GebruiksRechtenController.cs | Declares v1.7 support for existing v1.5 controller. |
| src/OneGround.ZGW.Documenten.Web/Controllers/v1/5/EnkelvoudigInformatieObjectenController.cs | Expands Produces for download endpoint. |
| src/OneGround.ZGW.Documenten.Web/Controllers/v1/1/EnkelvoudigInformatieObjectenController.cs | Expands Produces for download endpoint. |
| src/OneGround.ZGW.Documenten.Web/Controllers/Api.cs | Adds v1.7 API version constants and supported versions list. |
| src/OneGround.ZGW.Documenten.Web/BusinessRules/v1/5/VerzendingBusinessRuleService.cs | Makes verzending validation version-aware (v1.7 changes required fields). |
| src/OneGround.ZGW.Documenten.DataModel/Migrations/DrcDbContextModelSnapshot.cs | Updates EF model snapshot with new columns for v1.7. |
| src/OneGround.ZGW.Documenten.DataModel/Migrations/20260804123457_add_columns_for_v1_7.Designer.cs | Adds migration designer for new EIO version columns. |
| src/OneGround.ZGW.Documenten.DataModel/Migrations/20260804123457_add_columns_for_v1_7.cs | Adds migration to introduce is_gereed_voor_publicatie and tonen_aan_initiator. |
| src/OneGround.ZGW.Documenten.DataModel/EnkelvoudigInformatieObjectVersie.cs | Adds new v1.7 columns to the EIO version entity. |
| src/OneGround.ZGW.Documenten.Contracts/v1/7/Responses/EnkelvoudigInformatieObjectUpdateResponseDto.cs | Adds v1.7 update response DTO (includes lock). |
| src/OneGround.ZGW.Documenten.Contracts/v1/7/Responses/EnkelvoudigInformatieObjectResponseDto.cs | Adds v1.7 base response DTO shape (url/versie/beginRegistratie/locked/bestandsdelen). |
| src/OneGround.ZGW.Documenten.Contracts/v1/7/Responses/EnkelvoudigInformatieObjectGetResponseDto.cs | Adds v1.7 get response DTOs incl. expanded form. |
| src/OneGround.ZGW.Documenten.Contracts/v1/7/Responses/EnkelvoudigInformatieObjectCreateResponseDto.cs | Adds v1.7 create response DTO (includes lock). |
| src/OneGround.ZGW.Documenten.Contracts/v1/7/Requests/EnkelvoudigInformatieObjectUpdateRequestDto.cs | Adds v1.7 update request DTO (includes lock). |
| src/OneGround.ZGW.Documenten.Contracts/v1/7/Requests/EnkelvoudigInformatieObjectSearchRequestDto.cs | Adds v1.7 search request DTO with common filters. |
| src/OneGround.ZGW.Documenten.Contracts/v1/7/Requests/EnkelvoudigInformatieObjectCreateRequestDto.cs | Adds v1.7 create request DTO. |
| src/OneGround.ZGW.Documenten.Contracts/v1/7/Requests/EnkelvoudigInformatieObjectBaseRequestDto.cs | Adds v1.7 base request DTO type. |
| src/OneGround.ZGW.Documenten.Contracts/v1/7/Queries/GetAllEnkelvoudiginformatieobjectenQueryParameters.cs | Adds v1.7 list query parameter contract. |
| src/OneGround.ZGW.Documenten.Contracts/v1/7/IDocumentenCommonSearchableFields.cs | Introduces shared searchable fields interface for v1.7 query/search contracts. |
| src/OneGround.ZGW.Documenten.Contracts/v1/7/EnkelvoudigInformatieObjectDto.cs | Adds v1.7 EIO DTO including publication-related fields. |
| src/OneGround.ZGW.Common.Web/Authorization/AuthorizedApplication.cs | Adds authorization flag for “alleen is gereed voor publicatie”. |
| src/OneGround.ZGW.Autorisaties.Web/Services/DbContextAuthorizationResolver.cs | Maps the new authorization flag from the DB-backed resolver. |
| src/OneGround.ZGW.Autorisaties.ServiceAgent/IAutorisatiesServiceAgent.cs | Updates response namespace to v1.1 contracts. |
| src/OneGround.ZGW.Autorisaties.ServiceAgent/AutorisatiesServiceAgentAuthorizationResolver.cs | Maps the new authorization flag from service-agent response. |
| src/OneGround.ZGW.Autorisaties.ServiceAgent/AutorisatiesServiceAgent.cs | Updates response namespace to v1.1 contracts. |
Files not reviewed (1)
- src/OneGround.ZGW.Documenten.DataModel/Migrations/20260804123457_add_columns_for_v1_7.Designer.cs: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Grabauskas
reviewed
Aug 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 52 out of 53 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- src/OneGround.ZGW.Documenten.DataModel/Migrations/20260804123457_add_columns_for_v1_7.Designer.cs: Generated file
Suppressed comments (4)
src/OneGround.ZGW.Documenten.Web/Handlers/v1/7/GetAllEnkelvoudigInformatieObjectenQueryHandler.cs:293
- This cache key omits the caller's authorization pairs and
AlleenIsGereedVoorPublicatieflag. Two applications for the same RSIN and filter can therefore share a cached count even though their queries select different rows; this also collides with the unrestricted-count key at line 337. Namespace the key and include a stable fingerprint of every predicate that affects the query.
src/OneGround.ZGW.Documenten.Web/Handlers/v1/7/GetAllEnkelvoudigInformatieObjectenQueryHandler.cs:457 - When both related-object filters are supplied, these separate
Anyclauses may be satisfied by two different relations. For example, one relation can match the requested URL while another matches the requested type, incorrectly returning the information object. Evaluate both criteria against the sameObjectInformatieObjectrow.
src/OneGround.ZGW.Documenten.Web/Handlers/v1/7/GetAllEnkelvoudigInformatieObjectenQueryHandler.cs:207 - The cursor anchor is keyed only by RSIN, page, and request filter, while the paged query also depends on the caller's type/VHA authorizations and publication-ready flag. A page-1 request from one application can seed an anchor that another application reuses, causing the latter's page 2 to skip or duplicate rows. Include the effective authorization/publication predicate in the anchor namespace.
src/OneGround.ZGW.Documenten.Web/Handlers/v1/7/GetAllEnkelvoudigInformatieObjectenQueryHandler.cs:448 - An empty
Uuid_Inis treated as no filter in the fast path at line 442, but as “match nothing” here whenever another filter is present. The same UUID input therefore changes meaning based on unrelated filters. Preserve the fast-path semantics by also accepting an empty list here.
Grabauskas
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Type of Change
Related Issues
Testing
Checklist