package com.syntactic.controllers;

import com.syntactic.models.LibraryItem;
import com.syntactic.services.LibraryItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/v1/")
public class HomeController
{
    @Autowired
    LibraryItemService libraryItemService;

    @RequestMapping("/items")
    public List<LibraryItem> Index()
    {
        return libraryItemService.GetAll();
    }

    @RequestMapping(value ="/item", method = RequestMethod.POST)
    public LibraryItem Add(@RequestBody LibraryItem item){
        return libraryItemService.Add(item);
    }
}

@@ -613,16 +613,52 @@
 ing(
-%22/items%22
+value = %22/items%22, method = RequestMethod.GET
 )%0A  
@@ -813,10 +813,9 @@
 od.P
-OS
+U
 T)%0A 

Restrict the api to the right verbs