Skip to content

Commit f078407

Browse files
author
gazbert
committed
fix: Fix for un-named path params (#169)
* Spring 6.1 no longer "automagically" works out path or param names. See: https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-6.1-Release-Notes#parameter-name-retention
1 parent b83bb77 commit f078407

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

bxbot-rest-api/src/main/java/com/gazbert/bxbot/rest/api/v1/config/StrategyConfigController.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ public List<StrategyConfig> getAllStrategies(@Parameter(hidden = true) Principal
133133
content = @Content(schema = @Schema(implementation = String.class)))
134134
})
135135
public ResponseEntity<StrategyConfig> getStrategy(
136-
@Parameter(hidden = true) Principal principal, @PathVariable String strategyId) {
136+
@Parameter(hidden = true) Principal principal,
137+
@PathVariable(name = "strategyId") String strategyId) {
137138

138139
log.info(
139140
"GET " + STRATEGIES_RESOURCE_PATH + "/{} - getStrategy() - caller: {}",
@@ -175,7 +176,7 @@ public ResponseEntity<StrategyConfig> getStrategy(
175176
})
176177
public ResponseEntity<StrategyConfig> updateStrategy(
177178
@Parameter(hidden = true) Principal principal,
178-
@PathVariable String strategyId,
179+
@PathVariable(name = "strategyId") String strategyId,
179180
@RequestBody StrategyConfig config) {
180181

181182
log.info(
@@ -263,7 +264,8 @@ public ResponseEntity<StrategyConfig> createStrategy(
263264
content = @Content(schema = @Schema(implementation = String.class)))
264265
})
265266
public ResponseEntity<StrategyConfig> deleteStrategy(
266-
@Parameter(hidden = true) Principal principal, @PathVariable String strategyId) {
267+
@Parameter(hidden = true) Principal principal,
268+
@PathVariable(name = "strategyId") String strategyId) {
267269

268270
log.info(
269271
"DELETE " + STRATEGIES_RESOURCE_PATH + "/{} - deleteStrategy() - caller: {}",

0 commit comments

Comments
 (0)