From d104915ba840d5d1c7d5f25e4bb50a2cbb2f3ba2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:09:01 -0300 Subject: [PATCH] style: apply linters automatic fixes (#1458) Signed-off-by: Hyperledger Bot Co-authored-by: Hyperledger Bot --- .../common/errors/CredentialOfferError.kt | 23 ++++++++----------- .../common/errors/SchemaTemplateError.kt | 16 ++++--------- .../steps/credentials/JwtCredentialSteps.kt | 2 +- 3 files changed, 16 insertions(+), 25 deletions(-) diff --git a/tests/integration-tests/src/test/kotlin/common/errors/CredentialOfferError.kt b/tests/integration-tests/src/test/kotlin/common/errors/CredentialOfferError.kt index 89e7d9d858..0dbd8e6d42 100644 --- a/tests/integration-tests/src/test/kotlin/common/errors/CredentialOfferError.kt +++ b/tests/integration-tests/src/test/kotlin/common/errors/CredentialOfferError.kt @@ -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 diff --git a/tests/integration-tests/src/test/kotlin/common/errors/SchemaTemplateError.kt b/tests/integration-tests/src/test/kotlin/common/errors/SchemaTemplateError.kt index 9ab3797698..c75159952d 100644 --- a/tests/integration-tests/src/test/kotlin/common/errors/SchemaTemplateError.kt +++ b/tests/integration-tests/src/test/kotlin/common/errors/SchemaTemplateError.kt @@ -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": { @@ -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", @@ -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", @@ -59,7 +54,6 @@ enum class SchemaTemplateError { } } """ - } }, ; abstract fun inner_schema(): String diff --git a/tests/integration-tests/src/test/kotlin/steps/credentials/JwtCredentialSteps.kt b/tests/integration-tests/src/test/kotlin/steps/credentials/JwtCredentialSteps.kt index 104abdad31..6f14a907f2 100644 --- a/tests/integration-tests/src/test/kotlin/steps/credentials/JwtCredentialSteps.kt +++ b/tests/integration-tests/src/test/kotlin/steps/credentials/JwtCredentialSteps.kt @@ -129,7 +129,7 @@ class JwtCredentialSteps { fun issuerIssuesTheJwtCredentialWithIssue( issuer: Actor, holder: Actor, - credentialOfferError: CredentialOfferError + credentialOfferError: CredentialOfferError, ) { val credentialOfferRequest = CreateIssueCredentialRecordRequest( claims = linkedMapOf(