• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

input-output-hk / atala-prism-building-blocks / 7952553181

18 Feb 2024 11:29PM UTC coverage: 31.291% (-0.3%) from 31.59%
7952553181

Pull #792

CryptoKnightIOG
feat: refactor duplcate code (#873)

Signed-off-by: Bassam Riman <bassam.riman@iohk.io>
Pull Request #792: feat: ZKP verification

170 of 600 new or added lines in 24 files covered. (28.33%)

456 existing lines in 125 files now uncovered.

4152 of 13269 relevant lines covered (31.29%)

0.31 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

60.0
/pollux/lib/core/src/main/scala/io/iohk/atala/pollux/core/model/schema/type/AnoncredSchemaType.scala
1
package io.iohk.atala.pollux.core.model.schema.`type`
2

3
import com.networknt.schema.*
4
import io.iohk.atala.pollux.core.model.schema.Schema
5
import io.iohk.atala.pollux.core.model.schema.`type`.anoncred.AnoncredSchemaSerDesV1
6
import io.iohk.atala.pollux.core.model.schema.`type`.anoncred.AnoncredSchemaSerDesV1.*
7
import io.iohk.atala.pollux.core.model.schema.validator.JsonSchemaError
8
import io.iohk.atala.pollux.core.model.schema.validator.JsonSchemaUtils
9
import io.iohk.atala.pollux.core.model.schema.validator.JsonSchemaValidatorImpl
10
import io.iohk.atala.pollux.core.model.schema.validator.SchemaSerDes
11
import zio.*
12
import zio.json.*
13

14
object AnoncredSchemaType extends CredentialSchemaType {
15

16
  val anondcredShemaBasedSerDes: SchemaSerDes[AnoncredSchemaSerDesV1] = AnoncredSchemaSerDesV1.schemaSerDes
17
  val `type`: String = AnoncredSchemaSerDesV1.version
18

1✔
19
  override def validate(schema: Schema): IO[JsonSchemaError, Unit] = {
1✔
20
    for {
1✔
21
      jsonSchemaSchema <- anondcredShemaBasedSerDes.initialiseJsonSchema
UNCOV
22
      schemaValidator = JsonSchemaValidatorImpl(jsonSchemaSchema)
×
UNCOV
23
      jsonSchemaNode <- JsonSchemaUtils.toJsonNode(schema)
×
24
      _ <- schemaValidator.validate(jsonSchemaNode)
25
    } yield ()
26
  }
27
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc