vidakovic commented on code in PR #4281: URL: https://github.com/apache/fineract/pull/4281#discussion_r1939727057
########## fineract-command/src/test/java/org/apache/fineract/command/sample/web/DummyApiController.java: ########## @@ -0,0 +1,74 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.command.sample.web; + +import static org.apache.fineract.command.core.CommandConstants.COMMAND_REQUEST_ID; +import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; +import static org.springframework.http.MediaType.APPLICATION_PROBLEM_JSON_VALUE; + +import java.util.UUID; +import java.util.concurrent.CompletableFuture; +import java.util.function.Supplier; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.apache.fineract.command.core.CommandPipeline; +import org.apache.fineract.command.sample.command.DummyCommand; +import org.apache.fineract.command.sample.model.DummyRequest; +import org.apache.fineract.command.sample.model.DummyResponse; +import org.springframework.scheduling.annotation.Async; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@Slf4j +@RequiredArgsConstructor +@RestController +@RequestMapping(value = "/test/dummy", consumes = APPLICATION_JSON_VALUE, produces = { APPLICATION_JSON_VALUE, Review Comment: Wrong. In Spring WebMVC if you do nothing then it will default to "*/*" which by definition accepts among other formats JSON, but also Octet Stream etc. etc. This matters even more when you turn on the screws and configure Spring to be even more pedantic about these things (which would be required when you go through any kind of certification process like SOC2). So, let's leave that. -- 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]
