change generator http method

This commit is contained in:
Anton Romanov 2022-08-12 01:09:55 +04:00
parent 2844619423
commit e267e0c55c
2 changed files with 5 additions and 5 deletions

View File

@ -24,7 +24,6 @@ dependencies {
ext {
versionSLF4J = '1.7.24'
versionJetty = '9.3.16.v20170120'
versionJackson = '2.9.4'
}
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web'
@ -35,9 +34,9 @@ dependencies {
implementation group: 'org.javassist', name: 'javassist', version: '3.25.0-GA'
implementation group: 'org.eclipse.jetty', name: 'jetty-servlet', version: versionJetty
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: versionJackson
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: versionJackson
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: versionJackson
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations'
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310'
implementation group: 'org.springdoc', name: 'springdoc-openapi-ui', version: '1.6.5'

View File

@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
import ru.ulstu.configuration.ApiConfiguration;
import ru.ulstu.datamodel.ts.TimeSeries;
import ru.ulstu.service.UtilService;
import java.util.Map;
@RestController
@ -30,7 +31,7 @@ public class UtilController {
return new ResponseEntity<>(Map.of("result", true), HttpStatus.OK);
}
@GetMapping("getRandom")
@PostMapping("getRandom")
@Operation(description = "Получить временной ряд рандомной длины")
public ResponseEntity<TimeSeries> getRandomTimeSeries(@RequestParam("length") int length) {
return new ResponseEntity<>(utilService.getRandomTimeSeries(length), HttpStatus.OK);