Skip to content

Commit

Permalink
style: apply linters automatic fixes (#1458)
Browse files Browse the repository at this point in the history
Signed-off-by: Hyperledger Bot <hyperledger-bot@hyperledger.org>
Co-authored-by: Hyperledger Bot <hyperledger-bot@hyperledger.org>
  • Loading branch information
2 people authored and amagyar-iohk committed Nov 20, 2024
1 parent 009a7c9 commit f330ee0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
package common.errors

import org.hyperledger.identus.client.models.Connection
import org.hyperledger.identus.client.models.CreateIssueCredentialRecordRequest
import java.util.UUID

enum class CredentialOfferError {
UNKNOWN_CONNECTION_ID {
override fun updateCredentialWithError(credentialOffer: CreateIssueCredentialRecordRequest): CreateIssueCredentialRecordRequest {
return CreateIssueCredentialRecordRequest(
schemaId = credentialOffer.schemaId,
claims = credentialOffer.claims,
issuingDID = credentialOffer.issuingDID,
issuingKid = credentialOffer.issuingKid,
connectionId = UUID.randomUUID(),
validityPeriod = credentialOffer.validityPeriod,
credentialFormat = credentialOffer.credentialFormat,
automaticIssuance = credentialOffer.automaticIssuance,
)
}
override fun updateCredentialWithError(credentialOffer: CreateIssueCredentialRecordRequest): CreateIssueCredentialRecordRequest = CreateIssueCredentialRecordRequest(
schemaId = credentialOffer.schemaId,
claims = credentialOffer.claims,
issuingDID = credentialOffer.issuingDID,
issuingKid = credentialOffer.issuingKid,
connectionId = UUID.randomUUID(),
validityPeriod = credentialOffer.validityPeriod,
credentialFormat = credentialOffer.credentialFormat,
automaticIssuance = credentialOffer.automaticIssuance,
)
}, ;

abstract fun updateCredentialWithError(credentialOffer: CreateIssueCredentialRecordRequest): CreateIssueCredentialRecordRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import net.serenitybdd.screenplay.Actor

enum class SchemaTemplateError {
TYPE_AND_PROPERTIES_WITHOUT_SCHEMA_TYPE {
override fun inner_schema(): String {
return """
override fun inner_schema(): String = """
{
"type": "object",
"properties": {
Expand All @@ -21,12 +20,10 @@ enum class SchemaTemplateError {
},
"required": ["name"]
}
""".trimIndent()
}
""".trimIndent()
},
CUSTOM_WORDS_NOT_DEFINED {
override fun inner_schema(): String {
return """
override fun inner_schema(): String = """
{
"${"$"}schema": "http://json-schema.org/draft-2020-12/schema#",
"type": "object",
Expand All @@ -40,12 +37,10 @@ enum class SchemaTemplateError {
},
"customKeyword": "value"
}
""".trimIndent()
}
""".trimIndent()
},
MISSING_REQUIRED_FOR_MANDATORY_PROPERTY {
override fun inner_schema(): String {
return """
override fun inner_schema(): String = """
{
"${"$"}schema": "http://json-schema.org/draft-2020-12/schema#",
"type": "object",
Expand All @@ -59,7 +54,6 @@ enum class SchemaTemplateError {
}
}
"""
}
}, ;

abstract fun inner_schema(): String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class JwtCredentialSteps {
fun issuerIssuesTheJwtCredentialWithIssue(
issuer: Actor,
holder: Actor,
credentialOfferError: CredentialOfferError
credentialOfferError: CredentialOfferError,
) {
val credentialOfferRequest = CreateIssueCredentialRecordRequest(
claims = linkedMapOf(
Expand Down

0 comments on commit f330ee0

Please sign in to comment.