From b20b2ce26df9d1a129c463676c9c95751c7258f5 Mon Sep 17 00:00:00 2001 From: christosarvanitis Date: Tue, 26 Nov 2024 13:43:28 +0200 Subject: [PATCH] fix(openapi): Rewrite Swagger to OpenAPI annotations --- fiat-web/fiat-web.gradle | 2 +- .../spinnaker/fiat/controllers/AuthorizeController.java | 6 +++--- 2 files changed, 4 insertions(+), 4 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)