Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/main/java/com/mrxgrc/inventory/controller/RootController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.mrxgrc.inventory.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class RootController {

@GetMapping("/")
public Map<String, Object> getRoot() {
return Map.of(
"message", "Hello World! Welcome to the Inventory API",
"endpoints", Map.of(
"items", "/items",
"getItemById", "/items/{id}",
"createItem", "POST /items",
"updateItem", "PUT /items/{id}",
"deleteItem", "DELETE /items/{id}",
"health", "/health"
)
);
}
}