martinweiler commented on code in PR #7243:
URL: https://github.com/apache/incubator-kie/pull/7243#discussion_r4406315494
##########
kogito-codegen-modules/kogito-codegen-processes/src/main/java/org/kie/kogito/codegen/process/ProcessResourceGenerator.java:
##########
@@ -357,7 +358,12 @@ protected void
generateSignalsEndpoints(TemplatedGenerator.Builder templateBuild
.orElseThrow(() -> new
RuntimeException("signalInstanceDeclaration doesn't have body"));
if (signalType == null) {
- signalInstanceBody.findAll(NameExpr.class,
nameExpr -> "data".equals(nameExpr.getNameAsString())).forEach(name ->
name.replace(new NullLiteralExpr()));
+ signalInstanceBody.findAll(
Review Comment:
If I understand this change here correctly, then you are trying to remove
the body parameter from the generated endpoint if there is no data output
mapping - correct?
What seems to be missing here is the removal of the `RequestBody`
annotation, eg. here in Spring Boot:
```
@PostMapping(value = "/{id}/Signal__0563791", produces =
MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
@io.swagger.v3.oas.annotations.parameters.RequestBody(content =
@io.swagger.v3.oas.annotations.media.Content(schema =
@io.swagger.v3.oas.annotations.media.Schema(type = "object")))
@org.springframework.transaction.annotation.Transactional()
@io.github.resilience4j.retry.annotation.Retry(name = "signal_0")
public HiringModelOutput signal_0(@PathVariable("id") final String id) {
return processService.signalProcessInstance(process, id, null,
"Signal__0563791").orElseThrow(() -> new
ResponseStatusException(HttpStatus.PRECONDITION_FAILED, String.format("Process
instance %s is not currently accepting signal '%s'", id, "Signal__0563791")));
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]