Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions endpointdsl/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ camel.main.name = MyCamel

# what to say
greeting = Hello World

management.endpoints.web.exposure.include=health,info
3 changes: 2 additions & 1 deletion openapi-contract-first/daisy.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"id": 555,
"name": "Daisy the parrot"
"name": "Daisy the parrot",
"photoUrls": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.bean.BeanConstants;
import org.apache.camel.component.bean.validator.BeanValidationException;

import org.springframework.stereotype.Component;
Expand All @@ -44,8 +43,7 @@ public void configure() throws Exception {
"&loggingFeatureEnabled=true")
.to("bean-validator:user")
.to("log:camel-cxf-log?showAll=true")
.setHeader(BeanConstants.BEAN_METHOD_NAME, simple("${header.operationName}"))
.bean(UserServiceImpl.class);
.toD("bean:userServiceImpl?method=${header.operationName}");
// @formatter:on
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@
import java.util.Map;
import java.util.TreeMap;

import org.springframework.stereotype.Component;

import jakarta.ws.rs.core.Response;

@Component
public class UserServiceImpl implements UserService {

private final Map<Integer, User> users = new TreeMap<>();
Expand Down