PAN-52 Fixed a typo in the parameter arguments
This commit is contained in:
+1
-1
@@ -38,5 +38,5 @@ jobs:
|
||||
script: ./gradlew test
|
||||
- stage: Integration Tests
|
||||
script: ./gradlew integrationTest
|
||||
- stage: Sonar analysis
|
||||
- stage: Sonar Analysis
|
||||
script: ./gradlew sonar
|
||||
|
||||
+6
-6
@@ -26,7 +26,7 @@ import java.util.Optional;
|
||||
public class AccountController {
|
||||
private final AccountsRepository accountsRepository;
|
||||
|
||||
@GetMapping("/")
|
||||
@GetMapping({"","/"})
|
||||
public @ResponseBody
|
||||
ResponseEntity<Iterable<AccountDto>> getListOfAccounts() {
|
||||
LOG.info("Received request to list all accounts");
|
||||
@@ -46,9 +46,9 @@ public class AccountController {
|
||||
return new ResponseEntity<>(listOfAccounts, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@GetMapping("/id")
|
||||
public @ResponseBody
|
||||
ResponseEntity<AccountDto> getAccountById(@PathVariable("id") final Integer id) {
|
||||
ResponseEntity<AccountDto> getAccountById(@RequestParam("id") final Integer id) {
|
||||
LOG.info("Received request to query for account with id {}", id);
|
||||
if (id == null) {
|
||||
LOG.error("ERROR: ID was null");
|
||||
@@ -75,9 +75,9 @@ public class AccountController {
|
||||
);
|
||||
}
|
||||
|
||||
@GetMapping("/{username}")
|
||||
@GetMapping("/username")
|
||||
public @ResponseBody
|
||||
ResponseEntity<AccountDto> getAccountByUsername(@PathVariable("username") final String username) {
|
||||
ResponseEntity<AccountDto> getAccountByUsername(@RequestParam("username") final String username) {
|
||||
LOG.info("Received request to query for account with username {}", username);
|
||||
if (username == null) {
|
||||
LOG.error("ERROR: username was null");
|
||||
@@ -104,7 +104,7 @@ public class AccountController {
|
||||
);
|
||||
}
|
||||
|
||||
@PostMapping("/")
|
||||
@PostMapping({"","/"})
|
||||
@Validated({AccountDto.Insert.class, Default.class})
|
||||
public @ResponseBody ResponseEntity<AccountDto> insertAccount(
|
||||
@Valid @RequestBody final AccountDto accountDto, final BindingResult bindingResult) {
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ import java.util.Optional;
|
||||
public class DefinitionController {
|
||||
private final DefinitionRepository definitionRepository;
|
||||
|
||||
@GetMapping("/")
|
||||
@GetMapping({"","/"})
|
||||
public @ResponseBody
|
||||
ResponseEntity<Iterable<DefinitionDto>> getAllDefinitions() {
|
||||
LOG.info("Received request to list all definitions");
|
||||
@@ -73,7 +73,7 @@ public class DefinitionController {
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/")
|
||||
@PostMapping({"","/"})
|
||||
@Validated({DefinitionDto.Insert.class, Default.class})
|
||||
public @ResponseBody ResponseEntity<DefinitionDto> insertDefinition(
|
||||
@Valid @RequestBody final DefinitionDto definitionDto,
|
||||
|
||||
+7
-7
@@ -24,7 +24,7 @@ import java.util.Optional;
|
||||
public class ProofController {
|
||||
private final ProofRepository proofRepository;
|
||||
|
||||
@GetMapping("/")
|
||||
@GetMapping({"","/"})
|
||||
public @ResponseBody
|
||||
ResponseEntity<Iterable<ProofDto>> getAllProofs() {
|
||||
LOG.info("Received request to list all theorems");
|
||||
@@ -43,9 +43,9 @@ public class ProofController {
|
||||
return new ResponseEntity<>(listOfProofs, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@GetMapping("/id")
|
||||
public @ResponseBody
|
||||
ResponseEntity<ProofDto> getProofById(@PathVariable("id") final Integer id) {
|
||||
ResponseEntity<ProofDto> getProofById(@RequestParam("id") final Integer id) {
|
||||
LOG.info("Received request to query for proof with id {}", id);
|
||||
if (id == null) {
|
||||
LOG.error("ERROR: ID was null");
|
||||
@@ -73,9 +73,9 @@ public class ProofController {
|
||||
|
||||
}
|
||||
|
||||
@GetMapping("/{branch}")
|
||||
@GetMapping("/branch")
|
||||
public @ResponseBody
|
||||
ResponseEntity<List<ProofDto>> getAllProofsByBranch(@PathVariable("branch") final String branch) {
|
||||
ResponseEntity<List<ProofDto>> getAllProofsByBranch(@RequestParam("branch") final String branch) {
|
||||
LOG.info("Received request to query for proofs related to the {} branch of mathematics", branch);
|
||||
if (branch == null) {
|
||||
LOG.error("ERROR: branch was null");
|
||||
@@ -103,7 +103,7 @@ public class ProofController {
|
||||
return new ResponseEntity<>(listOfProofs, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{theorem_name}")
|
||||
@GetMapping("/theorem_name")
|
||||
public @ResponseBody
|
||||
ResponseEntity<List<ProofDto>> getAllProofsByTheoremName(@PathVariable("theorem_name") final String theoremName) {
|
||||
LOG.info("Received request to query for proofs of the theorem {}", theoremName);
|
||||
@@ -133,7 +133,7 @@ public class ProofController {
|
||||
return new ResponseEntity<>(listOfProofs, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/")
|
||||
@PostMapping({"","/"})
|
||||
@Validated({ProofDto.Insert.class, Default.class})
|
||||
public @ResponseBody ResponseEntity<ProofDto> insertProof(
|
||||
@Valid @RequestBody final ProofDto proofDto,
|
||||
|
||||
+7
-7
@@ -24,7 +24,7 @@ import java.util.Optional;
|
||||
public class TheoremController {
|
||||
private final TheoremRepository theoremRepository;
|
||||
|
||||
@GetMapping("/")
|
||||
@GetMapping({"","/"})
|
||||
public @ResponseBody
|
||||
ResponseEntity<Iterable<TheoremDto>> getAllTheorems() {
|
||||
LOG.info("Received request to list all theorems");
|
||||
@@ -43,9 +43,9 @@ public class TheoremController {
|
||||
return new ResponseEntity<>(listOfTheorems, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{branch}")
|
||||
@GetMapping("/branch")
|
||||
public @ResponseBody
|
||||
ResponseEntity<List<TheoremDto>> getAllTheoremsByBranch(@PathVariable("branch") final String branch) {
|
||||
ResponseEntity<List<TheoremDto>> getAllTheoremsByBranch(@RequestParam("branch") final String branch) {
|
||||
LOG.info("Received request to query for theorems related to the {} branch of mathematics", branch);
|
||||
if (branch == null) {
|
||||
LOG.error("ERROR: branch was null");
|
||||
@@ -73,7 +73,7 @@ public class TheoremController {
|
||||
return new ResponseEntity<>(listOfTheorems, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{proven_status}")
|
||||
@GetMapping("/proven_status")
|
||||
public @ResponseBody
|
||||
ResponseEntity<List<TheoremDto>> getAllTheoremsByProvenStatus(@PathVariable("proven_status") final Boolean provenStatus) {
|
||||
LOG.info("Received request to query for theorems whose proven status is {}", provenStatus);
|
||||
@@ -103,7 +103,7 @@ public class TheoremController {
|
||||
return new ResponseEntity<>(listOfTheorems, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{name}")
|
||||
@GetMapping("/name")
|
||||
public @ResponseBody
|
||||
ResponseEntity<List<TheoremDto>> getAllTheoremsByName(@PathVariable("name") final String name) {
|
||||
LOG.info("Received request to query for theorems whose name is {}", name);
|
||||
@@ -133,7 +133,7 @@ public class TheoremController {
|
||||
return new ResponseEntity<>(listOfTheorems, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@GetMapping("/id")
|
||||
public @ResponseBody
|
||||
ResponseEntity<TheoremDto> getTheoremById(@PathVariable("id") final Integer id) {
|
||||
LOG.info("Received request to query for theorem with id {}", id);
|
||||
@@ -163,7 +163,7 @@ public class TheoremController {
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/")
|
||||
@PostMapping({"","/"})
|
||||
@Validated({TheoremDto.Insert.class, Default.class})
|
||||
public @ResponseBody ResponseEntity<TheoremDto> insertTheorem(
|
||||
@Valid @RequestBody final TheoremDto theoremDto,
|
||||
|
||||
Reference in New Issue
Block a user