From 2abccc6caf249abe5aa070c59958bc07ca58037d Mon Sep 17 00:00:00 2001 From: dushani Date: Tue, 13 Feb 2024 22:02:06 +0530 Subject: [PATCH] fix swagger issue for revoked events. --- .../wso2/carbon/apimgt/internal/service/RevokedjwtApi.java | 5 +++-- .../apimgt/internal/service/RevokedjwtApiService.java | 1 + .../src/main/resources/api.yaml | 4 +--- .../org.wso2.carbon.apimgt.internal.service/swagger.json | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/apimgt/org.wso2.carbon.apimgt.internal.service/src/gen/java/org/wso2/carbon/apimgt/internal/service/RevokedjwtApi.java b/components/apimgt/org.wso2.carbon.apimgt.internal.service/src/gen/java/org/wso2/carbon/apimgt/internal/service/RevokedjwtApi.java index f8cbc89c4262..7b4b81037497 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.internal.service/src/gen/java/org/wso2/carbon/apimgt/internal/service/RevokedjwtApi.java +++ b/components/apimgt/org.wso2.carbon.apimgt.internal.service/src/gen/java/org/wso2/carbon/apimgt/internal/service/RevokedjwtApi.java @@ -1,6 +1,7 @@ package org.wso2.carbon.apimgt.internal.service; import org.wso2.carbon.apimgt.internal.service.dto.ErrorDTO; +import org.wso2.carbon.apimgt.internal.service.dto.RevokedEventsDTO; import org.wso2.carbon.apimgt.internal.service.RevokedjwtApiService; import org.wso2.carbon.apimgt.internal.service.impl.RevokedjwtApiServiceImpl; import org.wso2.carbon.apimgt.api.APIManagementException; @@ -39,9 +40,9 @@ public class RevokedjwtApi { @Produces({ "application/json" }) - @ApiOperation(value = "JTIs of revoked jwt tokens and application and subject entity revocation event data", notes = "This will provide access to - JTIs of directly revoked JWT tokens in database - consumer application information of revoked JWTs due to application change events - subject entity information of revoked JWTs due to user change events ", response = Object.class, tags={ }) + @ApiOperation(value = "JTIs of revoked jwt tokens and application and subject entity revocation event data", notes = "This will provide access to - JTIs of directly revoked JWT tokens in database - consumer application information of revoked JWTs due to application change events - subject entity information of revoked JWTs due to user change events ", response = RevokedEventsDTO.class, tags={ }) @ApiResponses(value = { - @ApiResponse(code = 200, message = "An object of revoke JWTs, revoked subject entities, revoked consumer keys", response = Object.class), + @ApiResponse(code = 200, message = "An object of revoke JWTs, revoked subject entities, revoked consumer keys", response = RevokedEventsDTO.class), @ApiResponse(code = 200, message = "Unexpected error", response = ErrorDTO.class) }) public Response revokedjwtGet() throws APIManagementException{ return delegate.revokedjwtGet(securityContext); diff --git a/components/apimgt/org.wso2.carbon.apimgt.internal.service/src/gen/java/org/wso2/carbon/apimgt/internal/service/RevokedjwtApiService.java b/components/apimgt/org.wso2.carbon.apimgt.internal.service/src/gen/java/org/wso2/carbon/apimgt/internal/service/RevokedjwtApiService.java index aa1722c18a8d..af1d3f195316 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.internal.service/src/gen/java/org/wso2/carbon/apimgt/internal/service/RevokedjwtApiService.java +++ b/components/apimgt/org.wso2.carbon.apimgt.internal.service/src/gen/java/org/wso2/carbon/apimgt/internal/service/RevokedjwtApiService.java @@ -10,6 +10,7 @@ import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.internal.service.dto.ErrorDTO; +import org.wso2.carbon.apimgt.internal.service.dto.RevokedEventsDTO; import java.util.List; diff --git a/components/apimgt/org.wso2.carbon.apimgt.internal.service/src/main/resources/api.yaml b/components/apimgt/org.wso2.carbon.apimgt.internal.service/src/main/resources/api.yaml index c4ddbdf19aec..a44db1b6d67e 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.internal.service/src/main/resources/api.yaml +++ b/components/apimgt/org.wso2.carbon.apimgt.internal.service/src/main/resources/api.yaml @@ -76,9 +76,7 @@ paths: 200: description: An object of revoke JWTs, revoked subject entities, revoked consumer keys schema: - type: object - items: - $ref: '#/definitions/RevokedEvents' + $ref: '#/definitions/RevokedEvents' default: description: Unexpected error schema: diff --git a/components/apimgt/org.wso2.carbon.apimgt.internal.service/swagger.json b/components/apimgt/org.wso2.carbon.apimgt.internal.service/swagger.json index 53437ff63761..5d01116234e2 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.internal.service/swagger.json +++ b/components/apimgt/org.wso2.carbon.apimgt.internal.service/swagger.json @@ -92,7 +92,7 @@ "200" : { "description" : "An object of revoke JWTs, revoked subject entities, revoked consumer keys", "schema" : { - "type" : "object" + "$ref" : "#/definitions/RevokedEvents" } }, "default" : { @@ -1345,8 +1345,8 @@ "type" : "string", "example" : "EXCHANGED", "description" : "The type of the tokens to be used (exchanged or without exchanged). Accepted values are EXCHANGED, DIRECT or BOTH.", - "enum" : [ "EXCHANGED", "DIRECT", "BOTH" ], - "default" : "DIRECT" + "default" : "DIRECT", + "enum" : [ "EXCHANGED", "DIRECT", "BOTH" ] } } },