Skip to content

Commit 316ac96

Browse files
committed
feat(REST): add support for Yaml as request body
Allow to set CRS Wkts in source and target fields without having to escape WKT content (using yaml multiline string)
1 parent 560dc59 commit 316ac96

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/geomatys/crsservice/rest/CRSOperationController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import io.swagger.v3.oas.annotations.media.Schema;
2525
import java.time.OffsetDateTime;
2626
import org.springframework.core.io.Resource;
27+
import org.springframework.http.MediaType;
2728
import org.springframework.http.ResponseEntity;
2829
import org.springframework.web.bind.annotation.CrossOrigin;
2930
import org.springframework.web.bind.annotation.RequestBody;
@@ -107,7 +108,7 @@ public ResponseEntity<Resource> getOperation(
107108
* Parameters should be passed in json.
108109
*/
109110
@CrossOrigin
110-
@RequestMapping(path = "operation", method = RequestMethod.POST)
111+
@RequestMapping(path = "operation", method = RequestMethod.POST, consumes = { MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_YAML_VALUE })
111112
public ResponseEntity<Resource> getOperation(@RequestBody CrsOperationService.OperationParameters parameters) {
112113
var result = service.getOperation(parameters);
113114
return ResponseEntity.ok()

0 commit comments

Comments
 (0)