Skip to content

Instantly share code, notes, and snippets.

@njofce
Created March 7, 2021 16:43
Show Gist options
  • Save njofce/bb3cb82ac1e4ee5f888eebb85a29c61a to your computer and use it in GitHub Desktop.
Save njofce/bb3cb82ac1e4ee5f888eebb85a29c61a to your computer and use it in GitHub Desktop.
@RequestMapping("file")
public interface FileApi {
@GetMapping("/{id}")
FileMetadata getFile(@PathVariable String id);
@GetMapping("/search")
List<FileMetadata> searchFiles(@RequestParam(name = "name") String name);
@PostMapping("/save")
String saveFile(@RequestBody FileMetadata file);
@PutMapping("/update/{id}")
String updateFile(@RequestBody FileMetadata file, @PathVariable String id);
@DeleteMapping("/delete/{id}")
String updateFile(@PathVariable String id);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment