Skip to content

Commit faf5c2f

Browse files
committed
HTM-1975 | HTM-1976: Remove OpenAPI export endpoint and define extract endpoint
we still need some, now obsoleted, generated code to keep the compiler happy so that is moved to a temporary schema file
1 parent affed19 commit faf5c2f

6 files changed

Lines changed: 264 additions & 136 deletions

File tree

pom.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,6 +1219,34 @@ SPDX-License-Identifier: MIT
12191219
<skipIfSpecIsUnchanged>true</skipIfSpecIsUnchanged>
12201220
</configuration>
12211221
</execution>
1222+
<execution>
1223+
<id>generate-obsolete-viewer-models</id>
1224+
<goals>
1225+
<goal>generate</goal>
1226+
</goals>
1227+
<configuration>
1228+
<inputSpec>${project.basedir}/src/main/resources/openapi/obsolete-viewer-schemas.yaml</inputSpec>
1229+
<generatorName>spring</generatorName>
1230+
<modelPackage>org.tailormap.api.viewer.model</modelPackage>
1231+
<library>spring-boot</library>
1232+
<configOptions>
1233+
<dateLibrary>java8</dateLibrary>
1234+
<hideGenerationTimestamp>true</hideGenerationTimestamp>
1235+
<openApiNullable>false</openApiNullable>
1236+
<serializableModel>true</serializableModel>
1237+
<generatedConstructorWithRequiredArgs>false</generatedConstructorWithRequiredArgs>
1238+
<useOptional>true</useOptional>
1239+
<useSpringBoot4>true</useSpringBoot4>
1240+
<useJackson3>true</useJackson3>
1241+
<additionalModelTypeAnnotations>@Deprecated</additionalModelTypeAnnotations>
1242+
</configOptions>
1243+
<generateApis>false</generateApis>
1244+
<generateModels>true</generateModels>
1245+
<generateSupportingFiles>false</generateSupportingFiles>
1246+
<generateModelTests>false</generateModelTests>
1247+
<skipIfSpecIsUnchanged>true</skipIfSpecIsUnchanged>
1248+
</configuration>
1249+
</execution>
12221250
<execution>
12231251
<id>generate-spec</id>
12241252
<goals>

src/main/java/org/tailormap/api/controller/LayerExportController.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,14 @@
5959
import org.tailormap.api.repository.FeatureSourceRepository;
6060
import org.tailormap.api.viewer.model.LayerExportCapabilities;
6161

62+
/**
63+
* @deprecated This controller is deprecated and will be removed in a future release. Use the `/extract/` endpoint
64+
* (TODO) instead, which provides more flexible data extraction capabilities and supports more data sources than
65+
* just WFS.
66+
*/
6267
@AppRestController
6368
@RequestMapping(path = "${tailormap-api.base-path}/{viewerKind}/{viewerName}/layer/{appLayerId}/export/")
69+
@Deprecated(forRemoval = true)
6470
public class LayerExportController {
6571
private static final Logger logger =
6672
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#
2+
# Copyright (C) 2026 B3Partners B.V.
3+
#
4+
# SPDX-License-Identifier: MIT
5+
#
6+
openapi: 3.0.4
7+
info:
8+
title: 'obsolete viewer models'
9+
description: 'no servers or paths, just obsolete models in this document that need to be generated for backwards
10+
compatibility, but should not be used in the API anymore.'
11+
version: '1.0'
12+
license:
13+
name: 'MIT'
14+
url: 'https://mit-license.org/'
15+
contact:
16+
name: 'B3Partners BV'
17+
url: 'https://www.b3partners.nl/'
18+
email: 'info@b3partners.nl'
19+
servers: [ ]
20+
paths: { }
21+
22+
components:
23+
schemas:
24+
LayerExportCapabilities:
25+
description: '**OBSOLETE**, since the export capabilities are now predefined and no longer need to be discovered per layer'
26+
type: object
27+
required: [exportable]
28+
properties:
29+
exportable:
30+
nullable: false
31+
type: boolean
32+
outputFormats:
33+
type: array
34+
items:
35+
type: string

src/main/resources/openapi/status-responses.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,31 @@ components:
6363
example:
6464
code: 500
6565
message: 'Internal server error'
66+
67+
ServerSentEventResponse:
68+
description: 'Server Sent Event response.
69+
The client can use the `eventType` property to determine the type of event, and the `details` property
70+
to get specific event data.'
71+
type: object
72+
required:
73+
- eventType
74+
properties:
75+
eventType:
76+
description: 'Event type'
77+
type: string
78+
details:
79+
description: 'Event data. Can be any JSON object or nothing, but should include at least a `status` property to indicate the status of the event.'
80+
type: object
81+
nullable: true
82+
id:
83+
description: 'optional event identifier, can be used for event ordering and deduplication'
84+
type: string
85+
format: uuid
86+
nullable: true
87+
example:
88+
eventType: 'extract-started'
89+
details:
90+
status: 'started'
91+
message: 'Extracting data'
92+
progress: 10
93+
id: '123e4567-e89b-12d3-a456-426614174000'

0 commit comments

Comments
 (0)