Skip to content

Commit

Permalink
correct handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
wandmagic committed Jan 31, 2025
1 parent 64e92fc commit 7d83189
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,25 +161,46 @@ class OscalVerticle : CoroutineVerticle() {

// Add direct route handlers for legacy support
router.get("/health").handler { ctx -> requestHandler.handleHealthCheck(ctx) }

// Validate routes
router.get("/validate").handler { ctx ->
launch(vertx.dispatcher()) {
requestHandler.handleValidateRequest(ctx)
}
}
router.post("/validate")
.handler(directRouteBodyHandler)
.handler { ctx ->
launch(vertx.dispatcher()) {
requestHandler.handleValidateRequest(ctx)
requestHandler.handleValidateFileUpload(ctx)
}
}

// Convert routes
router.get("/convert").handler { ctx ->
launch(vertx.dispatcher()) {
requestHandler.handleConvertRequest(ctx)
}
}
router.post("/convert")
.handler(directRouteBodyHandler)
.handler { ctx ->
launch(vertx.dispatcher()) {
requestHandler.handleConvertRequest(ctx)
requestHandler.handleConvertFileUpload(ctx)
}
}

// Resolve profile routes
router.get("/resolve-profile").handler { ctx ->
launch(vertx.dispatcher()) {
requestHandler.handleResolveRequest(ctx)
}
}
router.post("/resolve-profile")
.handler(directRouteBodyHandler)
.handler { ctx ->
launch(vertx.dispatcher()) {
requestHandler.handleResolveRequest(ctx)
requestHandler.handleResolveFileUpload(ctx)
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="DEBUG">
<Configuration status="WARNING">
<Properties>
<Property name="LOG_PATTERN">%d{HH:mm:ss.SSS} [%t] %highlight{%-5level}{FATAL=bg_red, ERROR=red, WARN=yellow, INFO=blue, DEBUG=cyan} %logger{36} - %msg%n</Property>
</Properties>
Expand All @@ -10,14 +10,14 @@
<PatternLayout pattern="${LOG_PATTERN}" disableAnsi="false"/>
<Filters>
<!-- Allow INFO level and above -->
<ThresholdFilter level="DEBUG" onMatch="ACCEPT" onMismatch="DENY"/>
<ThresholdFilter level="WARNING" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
</Console>
</Appenders>

<Loggers>
<!-- Root logger -->
<Root level="DEBUG">
<Root level="WARNING">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
Expand Down

0 comments on commit 7d83189

Please sign in to comment.