forked from sngular/scs-multiapi-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUploadApi.java
More file actions
46 lines (38 loc) · 1.35 KB
/
Copy pathUploadApi.java
File metadata and controls
46 lines (38 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.sngular.multifileplugin.testbinarybodyresource;
import java.util.Optional;
import java.util.List;
import java.util.Map;
import javax.validation.Valid;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import org.springframework.http.MediaType;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.core.io.Resource;
public interface UploadApi {
/**
* POST /upload
* @param resource (required)
* @return OK; (status code 200)
*/
@Operation(
operationId = "uploadBinary",
tags = {"test"},
responses = {
@ApiResponse(responseCode = "200", description = "OK")
}
)
@RequestMapping(
method = RequestMethod.POST,
value = "/upload",
produces = {"application/json"}
)
default ResponseEntity<Void> uploadBinary(@Parameter(name = "resource", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody Resource resource) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
}