From 55a9ada714474ba06fdc112009d9d6afe1a1d287 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Thu, 3 Mar 2022 14:16:25 +0100 Subject: [PATCH] Minor changes --- .../api/routes/schema/logic/operations/SchemaValidate.scala | 2 +- .../server/api/routes/schema/logic/trigger/TriggerMode.scala | 2 +- .../api/routes/schema/logic/trigger/TriggerShapeMap.scala | 4 ++-- .../schema/logic/trigger/TriggerTargetDeclarations.scala | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala index 7981c1d7..bee63f4f 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala @@ -111,7 +111,7 @@ private[api] object SchemaValidate extends LazyLogging { case other => IO.raiseError( new RuntimeException( - s"Unexpected validation trigger (${other._type})" + s"Unexpected validation trigger (${other.`type`})" ) ) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala index 640f895f..31b28966 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala @@ -17,7 +17,7 @@ trait TriggerMode { /** Corresponding type of this adapter inside [[ValidationTrigger]] */ - val _type: TriggerModeType + val `type`: TriggerModeType /** Optionally, the [[Data]] being validated in the validation using this trigger */ diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala index 2ae7e45c..f8aeca51 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala @@ -35,7 +35,7 @@ sealed case class TriggerShapeMap( * @return A ShapeMap instance used by WESO libraries in validation */ lazy val innerShapeMap: Either[String, ShapeMapW] = shapeMap.innerShapeMap - override val _type: TriggerModeType = TriggerModeType.SHAPEMAP + override val `type`: TriggerModeType = TriggerModeType.SHAPEMAP // Fetched shapeMap successfully assume( @@ -107,7 +107,7 @@ private[api] object TriggerShapeMap override implicit val encode: Encoder[TriggerShapeMap] = (tsm: TriggerShapeMap) => Json.obj( - ("type", tsm._type.asJson), + ("type", tsm.`type`.asJson), ("shapeMap", tsm.shapeMap.asJson), ("data", tsm.data.asJson), ("schema", tsm.schema.asJson) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala index 208a0f99..eb1cd142 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala @@ -18,7 +18,7 @@ sealed case class TriggerTargetDeclarations private ( ) extends TriggerMode with LazyLogging { - override val _type: TriggerModeType = + override val `type`: TriggerModeType = TriggerModeType.TARGET_DECLARATIONS override def getValidationTrigger: ValidationTrigger = @@ -38,7 +38,7 @@ private[api] object TriggerTargetDeclarations override implicit val encode: Encoder[TriggerTargetDeclarations] = (tsm: TriggerTargetDeclarations) => Json.obj( - ("type", tsm._type.asJson), + ("type", tsm.`type`.asJson), ("data", tsm.data.asJson), ("schema", tsm.schema.asJson) )