Skip to content

Commit

Permalink
FAIRSPC-81: aligned all controllers with /api/ path
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreenwood committed Oct 14, 2024
1 parent d4c338b commit ac7b6e4
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import io.fairspace.saturn.config.properties.FeatureProperties;

@RestController
@RequestMapping("/api/features/")
@RequestMapping("${application.basePath}/features/")
@RequiredArgsConstructor
public class FeaturesController {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import io.fairspace.saturn.config.Services;

@RestController
@RequestMapping("/api/maintenance")
@RequestMapping("${application.basePath}/maintenance")
@RequiredArgsConstructor
public class MaintenanceController {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

@Log4j2
@RestController
@RequestMapping("/api/metadata/")
@RequestMapping("${application.basePath}/metadata/")
@RequiredArgsConstructor
@Validated
public class MetadataController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import io.fairspace.saturn.controller.dto.request.LookupSearchRequest;

@RestController
@RequestMapping("/api/search")
@RequestMapping("${application.basePath}/search")
@RequiredArgsConstructor
public class SearchController {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import io.fairspace.saturn.services.views.SparqlQueryService;

@RestController
@RequestMapping("/api/rdf")
@RequestMapping("${application.basePath}/rdf")
@Validated
@RequiredArgsConstructor
public class SparqlController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import io.fairspace.saturn.services.users.UserService;

@RestController
@RequestMapping("/api/users/")
@RequestMapping("${application.basePath}/users/")
@RequiredArgsConstructor
public class UserController {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import static io.fairspace.saturn.vocabulary.Vocabularies.VOCABULARY;

@RestController
@RequestMapping("/api/vocabulary/")
@RequestMapping("${application.basePath}/vocabulary/")
public class VocabularyController {

@GetMapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ public WorkspaceController(Services services) {
@PutMapping(value = "/")
public ResponseEntity<Workspace> createWorkspace(@RequestBody Workspace workspace) {
var createdWorkspace = services.getWorkspaceService().createWorkspace(workspace);
return ResponseEntity.ok(
createdWorkspace); // it should return HTTP 201 CREATED - tobe analyzed across the codebase
return ResponseEntity.ok(createdWorkspace);
}

@GetMapping(value = "/", produces = MediaType.APPLICATION_JSON_VALUE)
Expand Down

0 comments on commit ac7b6e4

Please sign in to comment.