fix: explicitly name @RequestParam to support environments compiled without -parameters flag
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 11s

This commit is contained in:
jade
2026-09-01 16:34:07 +09:00
parent cfee4e381e
commit 1efd8617a7
10 changed files with 66 additions and 4 deletions

View File

@@ -178,7 +178,7 @@ public class ScaffoldingController {
}
@GetMapping("/usecases")
public List<String> listUseCases(@RequestParam String moduleName, @RequestParam String categoryKey, @RequestParam(required = false) String workspacePath) {
public List<String> listUseCases(@RequestParam("moduleName") String moduleName, @RequestParam("categoryKey") String categoryKey, @RequestParam(value = "workspacePath", required = false) String workspacePath) {
if (moduleName == null || !moduleName.matches("^dat-was-[a-z0-9-]+$")) {
throw new IllegalArgumentException("Invalid target module.");
}
@@ -198,7 +198,7 @@ public class ScaffoldingController {
}
@GetMapping("/categories")
public List<String> listCategories(@RequestParam String moduleName, @RequestParam(required = false) String workspacePath) {
public List<String> listCategories(@RequestParam("moduleName") String moduleName, @RequestParam(value = "workspacePath", required = false) String workspacePath) {
if (moduleName == null || !moduleName.matches("^dat-was-[a-z0-9-]+$")) {
throw new IllegalArgumentException("Invalid target module.");
}
@@ -299,7 +299,7 @@ public class ScaffoldingController {
}
@GetMapping("/modules")
public List<String> listModules(@RequestParam(required = false) String workspacePath) {
public List<String> listModules(@RequestParam(value = "workspacePath", required = false) String workspacePath) {
try {
String sourceDir = (workspacePath != null && !workspacePath.isBlank()) ? workspacePath : System.getProperty("AXHUB_SOURCE_DIR");
if (sourceDir == null) sourceDir = System.getenv("AXHUB_SOURCE_DIR");