Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: apply linters automatic fixes #1458

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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