diff options
Diffstat (limited to 'dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/StatusApi.java')
-rw-r--r-- | dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/StatusApi.java | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/StatusApi.java b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/StatusApi.java new file mode 100644 index 00000000..141058c2 --- /dev/null +++ b/dozentenmodulserver/api/src/main/java/org/openslx/bwlp/sat/api/handler/StatusApi.java @@ -0,0 +1,61 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.3.1). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openslx.bwlp.sat.api.handler; + +import org.openslx.bwlp.sat.api.model.StatusFileserver; +import io.swagger.annotations.*; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2021-12-23T15:12:42.264617368+01:00[Europe/Berlin]") +@Validated +@Api(value = "status", description = "the status API") +public interface StatusApi { + + default Optional<NativeWebRequest> getRequest() { + return Optional.empty(); + } + + /** + * GET /status/fileserver : Get bwLehrpool-Server status + * + * @return Successful operation (status code 200) + */ + + @ApiOperation(value = "Get bwLehrpool-Server status", nickname = "getFileserverStatus", notes = "", response = StatusFileserver.class, tags={ "server", }) + @ApiResponses(value = { + + @ApiResponse(code = 200, message = "Successful operation", response = StatusFileserver.class) }) + @RequestMapping( + method = RequestMethod.GET, + value = "/status/fileserver", + produces = { "application/json" } + ) + default ResponseEntity<StatusFileserver> getFileserverStatus() { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"activeUploads\" : 0, \"activeDownloads\" : 6 }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} |