Skip to content

Commit

Permalink
doc: API doc updated
Browse files Browse the repository at this point in the history
  • Loading branch information
nitin-vavdiya committed Jun 17, 2024
1 parent b7f3a57 commit a883a16
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 42 deletions.
70 changes: 41 additions & 29 deletions docs/api/revocation-service/openapi_v001.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,35 @@
"required" : true
},
"responses" : {

Check warning

Code scanning / KICS

Default Response Undefined On Operations (v3) Warning documentation

Default field is not defined on responses

Check warning

Code scanning / KICS

Response Code Missing (v3) Warning documentation

429 response is undefined

Check warning

Code scanning / KICS

Response Code Missing (v3) Warning documentation

415 response is undefined

Check warning

Code scanning / KICS

Response Code Missing (v3) Warning documentation

400 response is undefined
"401" : {
"description" : "UnauthorizedException: invalid token"
},
"200" : {
"description" : "if credential is revoked"
},
"500" : {
"description" : "RevocationServiceException: Internal Server Error"
},
"409" : {
"description" : "ConflictException: Revocation service error",
"description" : "Status of credential",
"content" : {

Check warning

Code scanning / KICS

Media Type Object Without Schema Warning documentation

The attribute 'schema' is undefined
"application/json" : {}
"application/json" : {

Check warning

Code scanning / KICS

Response on operations that should have a body has undefined schema (v3) Warning documentation

paths.{/api/v1/revocations/verify}.{post}.responses.{200}.content.{application/json}.schema is undefined
"examples" : {
"if credential is revoked" : {
"description" : "if credential is revoked",
"value" : {
"status" : "revoked"
}
},
"if credential is active" : {
"description" : "if credential is is active",
"value" : {
"status" : "active"
}
}
}
}
}
},
"403" : {

Check warning

Code scanning / KICS

Response on operations that should have a body has undefined schema (v3) Warning documentation

paths./api/v1/revocations/verify.post.responses.403.content is undefined
"description" : "ForbiddenException: invalid caller"
},
"401" : {

Check warning

Code scanning / KICS

Response on operations that should have a body has undefined schema (v3) Warning documentation

paths./api/v1/revocations/verify.post.responses.401.content is undefined
"description" : "UnauthorizedException: invalid token"
},
"500" : {

Check warning

Code scanning / KICS

Response on operations that should have a body has undefined schema (v3) Warning documentation

paths./api/v1/revocations/verify.post.responses.500.content is undefined
"description" : "RevocationServiceException: Internal Server Error"
}
}
}
Expand Down Expand Up @@ -98,12 +110,6 @@
"required" : true
},
"responses" : {

Check warning

Code scanning / KICS

Default Response Undefined On Operations (v3) Warning documentation

Default field is not defined on responses

Check warning

Code scanning / KICS

Response Code Missing (v3) Warning documentation

429 response is undefined

Check warning

Code scanning / KICS

Response Code Missing (v3) Warning documentation

415 response is undefined

Check warning

Code scanning / KICS

Response Code Missing (v3) Warning documentation

400 response is undefined
"401" : {
"description" : "UnauthorizedException: invalid token"
},
"500" : {
"description" : "RevocationServiceException: Internal Server Error"
},
"403" : {

Check warning

Code scanning / KICS

Response on operations that should have a body has undefined schema (v3) Warning documentation

paths./api/v1/revocations/status-entry.post.responses.403.content is undefined
"description" : "ForbiddenException: invalid caller"
},
Expand All @@ -120,6 +126,12 @@
}
}
}
},
"401" : {

Check warning

Code scanning / KICS

Response on operations that should have a body has undefined schema (v3) Warning documentation

paths./api/v1/revocations/status-entry.post.responses.401.content is undefined
"description" : "UnauthorizedException: invalid token"
},
"500" : {

Check warning

Code scanning / KICS

Response on operations that should have a body has undefined schema (v3) Warning documentation

paths./api/v1/revocations/status-entry.post.responses.500.content is undefined
"description" : "RevocationServiceException: Internal Server Error"
}
}
}
Expand Down Expand Up @@ -150,15 +162,6 @@
"required" : true
},
"responses" : {

Check warning

Code scanning / KICS

Default Response Undefined On Operations (v3) Warning documentation

Default field is not defined on responses

Check warning

Code scanning / KICS

Response Code Missing (v3) Warning documentation

415 response is undefined

Check warning

Code scanning / KICS

Response Code Missing (v3) Warning documentation

429 response is undefined

Check warning

Code scanning / KICS

Response Code Missing (v3) Warning documentation

400 response is undefined
"200" : {
"description" : "Verifiable credential revoked successfully."
},
"401" : {
"description" : "UnauthorizedException: invalid token"
},
"500" : {
"description" : "RevocationServiceException: Internal Server Error"
},
"403" : {

Check warning

Code scanning / KICS

Response on operations that should have a body has undefined schema (v3) Warning documentation

paths./api/v1/revocations/revoke.post.responses.403.content is undefined
"description" : "ForbiddenException: invalid caller"
},
Expand All @@ -176,6 +179,15 @@
}
}
}
},
"401" : {

Check warning

Code scanning / KICS

Response on operations that should have a body has undefined schema (v3) Warning documentation

paths./api/v1/revocations/revoke.post.responses.401.content is undefined
"description" : "UnauthorizedException: invalid token"
},
"200" : {

Check warning

Code scanning / KICS

Response on operations that should have a body has undefined schema (v3) Warning documentation

paths./api/v1/revocations/revoke.post.responses.200.content is undefined
"description" : "Verifiable credential revoked successfully."
},
"500" : {

Check warning

Code scanning / KICS

Response on operations that should have a body has undefined schema (v3) Warning documentation

paths./api/v1/revocations/revoke.post.responses.500.content is undefined
"description" : "RevocationServiceException: Internal Server Error"
}
}
}
Expand Down Expand Up @@ -221,9 +233,6 @@
}
],
"responses" : {

Check warning

Code scanning / KICS

Default Response Undefined On Operations (v3) Warning documentation

Default field is not defined on responses

Check warning

Code scanning / KICS

Response Code Missing (v3) Warning documentation

403 response is undefined when security field is defined

Check warning

Code scanning / KICS

Response Code Missing (v3) Warning documentation

429 response is undefined

Check warning

Code scanning / KICS

Response Code Missing (v3) Warning documentation

401 response is undefined when security field is defined

Check warning

Code scanning / KICS

Response Code Missing (v3) Warning documentation

400 response is undefined
"500" : {
"description" : "RevocationServiceException: Internal Server Error"
},
"200" : {
"description" : "Get Status list credential ",
"content" : {

Check warning

Code scanning / KICS

Media Type Object Without Schema Warning documentation

The attribute 'schema' is undefined
Expand Down Expand Up @@ -262,6 +271,9 @@
},
"404" : {

Check warning

Code scanning / KICS

Response on operations that should have a body has undefined schema (v3) Warning documentation

paths./api/v1/revocations/credentials/{issuerBPN}/{status}/{index}.get.responses.404.content is undefined
"description" : "Status list credential not found"
},
"500" : {

Check warning

Code scanning / KICS

Response on operations that should have a body has undefined schema (v3) Warning documentation

paths./api/v1/revocations/credentials/{issuerBPN}/{status}/{index}.get.responses.500.content is undefined
"description" : "RevocationServiceException: Internal Server Error"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import org.springframework.http.MediaType;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand All @@ -43,19 +44,19 @@ public class RevocationApiControllerApiDocs {
value = {
@ApiResponse(
responseCode = "200",
description = "if credential is revoked",
content = @Content(
description = "Status of credential",
content = { @Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
examples = {
@ExampleObject(description = "if credential is revoked", value = """
@ExampleObject(name = "if credential is revoked", description = "if credential is revoked", value = """
{
"status":"revoked"
}
"""),
@ExampleObject(description = "if credential is is active", value = """
@ExampleObject(name = "if credential is active", description = "if credential is is active", value = """
{
"status":"active"
}
""") })),
""") }) }),
@ApiResponse(
responseCode = "401",
description = "UnauthorizedException: invalid token",
Expand All @@ -64,14 +65,6 @@ public class RevocationApiControllerApiDocs {
responseCode = "403",
description = "ForbiddenException: invalid caller",
content = @Content()),
@ApiResponse(
responseCode = "409",
description = "ConflictException: Revocation service error",
content =
@Content(
examples =
@ExampleObject(),
mediaType = "application/json")),
@ApiResponse(
responseCode = "500",
description = "RevocationServiceException: Internal Server Error",
Expand Down

0 comments on commit a883a16

Please sign in to comment.