HTM-1961| HTM-1962: Initial implemententation of /events and /extract endpoints with CSV output format#1677
Merged
mprins merged 4 commits intoApr 14, 2026
Conversation
Dependency ReviewThe following issues were found:
Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. License Issuespom.xml
OpenSSF Scorecard
Scanned Files
|
12 tasks
54eb6dd to
3300b1e
Compare
8c7e56f to
faf5c2f
Compare
3300b1e to
69eb8de
Compare
/extract endpoint with CSV output format/extract endpoint with CSV output format
…ith CSV output format
69eb8de to
fc288fa
Compare
/extract endpoint with CSV output format/events and /extract endpoints with CSV output format
Contributor
There was a problem hiding this comment.
Pull request overview
Implements initial Server-Sent Events (/events) and layer attribute extraction (/extract) flow, with asynchronous extract job execution and CSV output support, plus accompanying OpenAPI and integration test coverage.
Changes:
- Added
/events/{clientId}SSE subscription endpoint with scheduled keep-alives and clientId validation. - Added
/extractendpoints for listing allowed formats, starting extracts asynchronously, and downloading generated files. - Introduced UUIDv7 utility for time-sortable IDs, extract file creation/cleanup logic, and updated OpenAPI + tests.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/resources/application.properties | Adds extract-related test properties and defaults. |
| src/test/resources/application-postgresql.properties | Tunes Hikari pool size for PostgreSQL tests. |
| src/test/java/org/tailormap/api/util/UUIDv7Test.java | Adds unit tests for UUIDv7 generation/parsing/timestamps. |
| src/test/java/org/tailormap/api/controller/ServerSentEventsControllerInvalidInputIntegrationTest.java | Integration test for SSE invalid clientId handling. |
| src/test/java/org/tailormap/api/controller/ServerSentEventsControllerIntegrationTest.java | Integration test for SSE keep-alive delivery. |
| src/test/java/org/tailormap/api/controller/LayerExtractControllerRestrictedFormatsIntegrationTest.java | Integration tests for extract format restriction and invalid inputs. |
| src/test/java/org/tailormap/api/controller/LayerExtractControllerIntegrationTest.java | End-to-end extract-to-download integration tests (CSV). |
| src/main/resources/openapi/viewer-api.yaml | Adds/updates OpenAPI definitions for /events and /extract. |
| src/main/resources/openapi/status-responses.yaml | Updates SSE response schema (eventType enum/details). |
| src/main/resources/application.properties | Adds extract configuration defaults and comments. |
| src/main/java/org/tailormap/api/util/UUIDv7.java | Adds UUIDv7 generator + timestamp extraction/parsing utility. |
| src/main/java/org/tailormap/api/service/CreateLayerExtractService.java | Implements async extract creation, CSV datastore writing, SSE progress/error events, and cleanup job. |
| src/main/java/org/tailormap/api/controller/ServerSentEventsController.java | Adds SSE controller and scheduled keep-alive publisher. |
| src/main/java/org/tailormap/api/controller/LayerExtractController.java | Adds extract start/formats/download endpoints and request validation. |
| src/main/java/org/tailormap/api/configuration/base/WebMvcConfig.java | Registers enum converter for extract output format. |
| src/main/java/org/tailormap/api/configuration/AsyncConfig.java | Adds dedicated async executor for extract jobs. |
| pom.xml | Adds GeoTools CSV module dependency. |
| build/qa/PMD-ruleset_for_TM.xml | Extends PMD assertion detection to include Awaitility untilAsserted. |
| build/ci/docker-compose.yml | Adjusts CI Postgres max_connections configuration. |
Comments suppressed due to low confidence (2)
src/main/resources/openapi/viewer-api.yaml:1914
- The OpenAPI spec defines the extract request body as
application/json, but the controller uses@RequestParam(and tests sendapplication/x-www-form-urlencoded). Generated clients will send JSON and fail to bind. Align the OpenAPI requestBody content type/shape with the actual controller contract (or switch the controller to@RequestBody).
requestBody:
required: true
content:
application/json:
schema:
type: object
src/main/resources/openapi/viewer-api.yaml:1925
- The
outputFormatexample is still an old MIME type (application/geo+json), while the API (controller + allowed formats properties) expects values likecsv,geojson,xlsx,shape. Update the example (and ideally document the allowed values explicitly) to prevent client confusion.
outputFormat:
description: 'Output format.
The allowed formats are configured per instance using `tailormap-api.extract.allowed-outputformats`.
The (default) geometry is included even if not requested.'
type: string
nullable: false
example: 'application/geo+json'
attributes:
e40ee52 to
7197946
Compare
7197946 to
242037a
Compare
242037a to
36c89fa
Compare
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## HTM-1960_Custom_extract_functionality_for_layer_attributes #1677 +/- ##
==============================================================================================
+ Coverage 5% 77% +73%
- Complexity 130 136 +6
==============================================================================================
Files 157 161 +4
Lines 7799 8087 +288
Branches 715 751 +36
==============================================================================================
+ Hits 351 6220 +5869
+ Misses 7420 1427 -5993
- Partials 28 440 +412
... and 138 files with indirect coverage changes 🚀 New features to boost your workflow:
|
matthijsln
approved these changes
Apr 14, 2026
9bdc8a0
into
HTM-1960_Custom_extract_functionality_for_layer_attributes
21 checks passed
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.
/eventsendpoint/extractendpointNote: this will merge to the feature branch/PR, not the
mainbranch