Package org.bremersee.test.web
Interface GoodRestApiTwo
-
@Tag("GoodRestApiController") @Validated public interface GoodRestApiTwo
Rest api two for testing.- Author:
- Christian Bremer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.bremersee.geojson.model.Geometry
addGeometry(@Valid org.bremersee.geojson.model.Geometry geometry)
Add geometry geometry.void
deleteGeometry(String id)
Delete geometry.List<org.bremersee.geojson.model.Geometry>
getGeometries(String query)
Gets geometries.org.bremersee.geojson.model.Geometry
getGeometry(String id)
Gets geometry.org.bremersee.geojson.model.Geometry
updateGeometry(String id, @Valid org.bremersee.geojson.model.Geometry geometry)
Update geometry geometry.
-
-
-
Method Detail
-
getGeometries
@RequestMapping(value="/api/geometries", produces="application/json", method=GET) List<org.bremersee.geojson.model.Geometry> getGeometries(@RequestParam(name="q",required=false) String query)
Gets geometries.- Parameters:
query
- the query- Returns:
- the geometries
-
addGeometry
@RequestMapping(value="/api/geometries", produces="application/json", consumes="application/json", method=POST) org.bremersee.geojson.model.Geometry addGeometry(@Valid @RequestBody @Valid org.bremersee.geojson.model.Geometry geometry)
Add geometry geometry.- Parameters:
geometry
- the geometry- Returns:
- the geometry
-
getGeometry
@RequestMapping(value="/api/geometries/{id}", produces="application/json", method=GET) org.bremersee.geojson.model.Geometry getGeometry(@PathVariable("id") String id)
Gets geometry.- Parameters:
id
- the id- Returns:
- the geometry
-
updateGeometry
@RequestMapping(value="/api/geometries/{id}", produces="application/json", consumes="application/json", method=PUT) org.bremersee.geojson.model.Geometry updateGeometry(@PathVariable("id") String id, @Valid @RequestBody @Valid org.bremersee.geojson.model.Geometry geometry)
Update geometry geometry.- Parameters:
id
- the idgeometry
- the geometry- Returns:
- the geometry
-
deleteGeometry
@RequestMapping(value="/api/geometries/{id}", produces="application/json", method=DELETE) void deleteGeometry(@PathVariable("id") String id)
Delete geometry.- Parameters:
id
- the id
-
-