-
Notifications
You must be signed in to change notification settings - Fork 502
Expand file tree
/
Copy pathVersion.java
More file actions
executable file
·29 lines (26 loc) · 1.07 KB
/
Version.java
File metadata and controls
executable file
·29 lines (26 loc) · 1.07 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
package com.app.api;
import io.swagger.annotations.*;
import org.springframework.http.*;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static org.springframework.http.MediaType.*;
import com.app.model.VersionModel;
@RestController
@RequestMapping(value = "/version", produces = { "application/json" })
@Api(tags = {"Common"})
public class Version {
@ApiOperation(value = "Gets the version of the REST API", notes = "", response = VersionModel.class)
@ApiResponses(value = { @ApiResponse(code = 200, message = "Returns the version info for the REST API.", response = VersionModel.class) })
@RequestMapping( method = RequestMethod.GET)
public VersionModel getVersion() {
//Authentication ath = SecurityContextHolder.getContext().getAuthentication();
//TokenUser usr = (TokenUser)ath.getDetails();
//String customerId = usr.getUser().getCustomerId()
VersionModel r = new VersionModel();
r.setVersion("1.0.0");
r.setMajor(1);
r.setMinor(0);
r.setPatch(0);
return r;
}
}