Skip to content

Commit d332cf8

Browse files
author
Dennis Labordus
committed
Using new websocket version of validation.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent 53c9884 commit d332cf8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/src/main/java/org/lfenergy/compas/scl/validator/rest/v1/SclValidatorServerEndpoint.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import javax.enterprise.context.ApplicationScoped;
2020
import javax.inject.Inject;
21+
import javax.validation.Valid;
2122
import javax.websocket.*;
2223
import javax.websocket.server.PathParam;
2324
import javax.websocket.server.ServerEndpoint;
@@ -46,7 +47,9 @@ public void onOpen(Session session, @PathParam(TYPE_PATH_PARAM) String type) {
4647
}
4748

4849
@OnMessage
49-
public void onMessage(Session session, SclValidateRequest request, @PathParam(TYPE_PATH_PARAM) String type) {
50+
public void onMessage(Session session,
51+
@Valid SclValidateRequest request,
52+
@PathParam(TYPE_PATH_PARAM) String type) {
5053
LOGGER.info("Message from session {} for type {}.", session.getId(), type);
5154
eventBus.send("validate-ws", new SclValidatorEventRequest(
5255
session, SclFileType.valueOf(type), request.getSclData()));

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SPDX-License-Identifier: Apache-2.0
2424
<sonarqube-plugin.version>3.2.0</sonarqube-plugin.version>
2525

2626
<compas.scl.xsd.version>0.0.4</compas.scl.xsd.version>
27-
<compas.core.version>0.11.0</compas.core.version>
27+
<compas.core.version>0.12.0</compas.core.version>
2828

2929
<quarkus.platform.version>2.14.1.Final</quarkus.platform.version>
3030
<log4j2.version>2.19.0</log4j2.version>

0 commit comments

Comments
 (0)