Skip to content

Commit

Permalink
fix(api-docs): Pull in new swagger library & include Auth controller …
Browse files Browse the repository at this point in the history
…in generated docs
  • Loading branch information
Travis Tomsu committed Jun 7, 2017
1 parent 6e25915 commit 62434e7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ allprojects {
apply plugin: 'groovy'

ext {
spinnakerDependenciesVersion = project.hasProperty('spinnakerDependenciesVersion') ? project.property('spinnakerDependenciesVersion') : '0.91.0'
spinnakerDependenciesVersion = project.hasProperty('spinnakerDependenciesVersion') ? project.property('spinnakerDependenciesVersion') : '0.92.0'
}

def checkLocalVersions = [spinnakerDependenciesVersion: spinnakerDependenciesVersion]
Expand Down
1 change: 1 addition & 0 deletions gate-web/config/gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ swagger:
contact:
patterns:
- .*tasks.*
- .*auth.*
- .*applications.*
- .*securityGroups.*
- /search
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestMethod
import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.bind.annotation.RestController
import springfox.documentation.annotations.ApiIgnore

import javax.servlet.http.HttpServletResponse
import java.util.regex.Pattern
Expand Down Expand Up @@ -68,8 +69,8 @@ class AuthController {
}
}

@RequestMapping("/user")
User user(@SpinnakerUser User user) {
@RequestMapping(value = "/user", method = RequestMethod.GET)
User user(@ApiIgnore @SpinnakerUser User user) {
if (!user) {
return user
}
Expand All @@ -81,12 +82,12 @@ class AuthController {
return user
}

@RequestMapping("/user/serviceAccounts")
List<String> getServiceAccounts(@SpinnakerUser User user) {
@RequestMapping(value = "/user/serviceAccounts", method = RequestMethod.GET)
List<String> getServiceAccounts(@ApiIgnore @SpinnakerUser User user) {
permissionService.getServiceAccounts(user)
}

@RequestMapping("/loggedOut")
@RequestMapping(value = "/loggedOut", method = RequestMethod.GET)
String loggedOut() {
return LOGOUT_MESSAGES[r.nextInt(LOGOUT_MESSAGES.size()+1)]
}
Expand All @@ -104,7 +105,7 @@ class AuthController {
}
}

@RequestMapping("/redirect")
@RequestMapping(value = "/redirect", method = RequestMethod.GET)
void redirect(HttpServletResponse response, @RequestParam String to) {
validDeckRedirect(to) ?
response.sendRedirect(to) :
Expand Down

0 comments on commit 62434e7

Please sign in to comment.