Interface GoodRestApiOne
@Tag("GoodRestApiController")
public interface GoodRestApiOne
Rest api one for testing.
- Author:
- Christian Bremer
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<ExampleModel> addExampleModel(ExampleModel model) Add model response entity.org.springframework.http.ResponseEntity<Void> Delete model response entity.org.springframework.http.ResponseEntity<ExampleModel> Gets model.org.springframework.http.ResponseEntity<List<ExampleModel>> getExampleModels(String query) Gets models.org.springframework.http.ResponseEntity<ExampleModel> updateExampleModel(String id, ExampleModel model) Update model response entity.
-
Method Details
-
getExampleModels
@RequestMapping(value="/api/models", produces="application/json", method=GET) org.springframework.http.ResponseEntity<List<ExampleModel>> getExampleModels(@RequestParam(name="q",required=false) String query) Gets models.- Parameters:
query- the query- Returns:
- the models
-
addExampleModel
@RequestMapping(value="/api/models", produces="application/json", consumes="application/json", method=POST) org.springframework.http.ResponseEntity<ExampleModel> addExampleModel(@RequestBody ExampleModel model) Add model response entity.- Parameters:
model- the model- Returns:
- the response entity
-
getExampleModel
@RequestMapping(value="/api/models/{id}", produces="application/json", method=GET) org.springframework.http.ResponseEntity<ExampleModel> getExampleModel(@PathVariable("id") String id) Gets model.- Parameters:
id- the id- Returns:
- the model
-
updateExampleModel
@RequestMapping(value="/api/models/{id}", produces="application/json", consumes="application/json", method=PUT) org.springframework.http.ResponseEntity<ExampleModel> updateExampleModel(@PathVariable("id") String id, @RequestBody ExampleModel model) Update model response entity.- Parameters:
id- the idmodel- the model- Returns:
- the response entity
-
deleteExampleModel
@RequestMapping(value="/api/models/{id}", produces="application/json", method=DELETE) org.springframework.http.ResponseEntity<Void> deleteExampleModel(@PathVariable("id") String id) Delete model response entity.- Parameters:
id- the id- Returns:
- the response entity
-