From f36416913fee46465bb8c50722c4b173f6bfe5fd Mon Sep 17 00:00:00 2001 From: Christos Arvanitis Date: Wed, 27 Nov 2024 19:43:58 +0200 Subject: [PATCH] fix(openapi): Rewrite Swagger to OpenAPI annotations (#1192) * fix(openapi): Rewrite Swagger to OpenAPI annotations * chore(deps): bump latest kork version --------- Co-authored-by: Edgar Garcia --- fiat-web/fiat-web.gradle | 2 +- .../spinnaker/fiat/controllers/AuthorizeController.java | 6 +++--- gradle.properties | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fiat-web/fiat-web.gradle b/fiat-web/fiat-web.gradle index d99ac7f0f..0af581f93 100644 --- a/fiat-web/fiat-web.gradle +++ b/fiat-web/fiat-web.gradle @@ -19,7 +19,7 @@ dependencies { implementation "io.spinnaker.kork:kork-plugins" implementation "io.spinnaker.kork:kork-web" implementation "io.spinnaker.kork:kork-retrofit" - implementation "io.swagger:swagger-annotations" + implementation "io.swagger.core.v3:swagger-annotations" implementation "net.logstash.logback:logstash-logback-encoder" runtimeOnly "io.spinnaker.kork:kork-runtime" diff --git a/fiat-web/src/main/java/com/netflix/spinnaker/fiat/controllers/AuthorizeController.java b/fiat-web/src/main/java/com/netflix/spinnaker/fiat/controllers/AuthorizeController.java index 3f55050ca..aac2f801f 100644 --- a/fiat-web/src/main/java/com/netflix/spinnaker/fiat/controllers/AuthorizeController.java +++ b/fiat-web/src/main/java/com/netflix/spinnaker/fiat/controllers/AuthorizeController.java @@ -30,7 +30,7 @@ import com.netflix.spinnaker.kork.web.exceptions.InvalidRequestException; import com.netflix.spinnaker.kork.web.exceptions.NotFoundException; import com.netflix.spinnaker.security.AuthenticatedRequest; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; import java.io.IOException; import java.util.*; import java.util.function.Supplier; @@ -77,8 +77,8 @@ public AuthorizeController( this.getUserPermissionCounterId = registry.createId("fiat.getUserPermission"); } - @ApiOperation( - value = + @Operation( + summary = "Used mostly for testing. Not really any real value to the rest of " + "the system. Disabled by default.") @RequestMapping(method = RequestMethod.GET) diff --git a/gradle.properties b/gradle.properties index dc720e565..7d53ec934 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ includeProviders=file,github,google-groups,ldap -korkVersion=7.245.0 +korkVersion=7.247.0 org.gradle.parallel=true spinnakerGradleVersion=8.32.1 targetJava17=true