From 836a1e7f3d36d6257db5edf64335d0dd07cdc65a Mon Sep 17 00:00:00 2001 From: Simon Dumas Date: Thu, 31 Oct 2024 18:16:03 +0100 Subject: [PATCH] Move Circe marshalling to kernel --- build.sbt | 10 ++-- .../nexus/delta/routes/AclsRoutes.scala | 4 +- .../nexus/delta/routes/ExportRoutes.scala | 2 +- .../nexus/delta/routes/MultiFetchRoutes.scala | 2 +- .../delta/routes/OrganizationsRoutes.scala | 2 +- .../delta/routes/PermissionsRoutes.scala | 2 +- .../nexus/delta/routes/ProjectsRoutes.scala | 2 +- .../nexus/delta/routes/RealmsRoutes.scala | 2 +- .../nexus/delta/routes/ResolversRoutes.scala | 2 +- .../nexus/delta/routes/ResourcesRoutes.scala | 2 +- .../delta/routes/ResourcesTrialRoutes.scala | 2 +- .../nexus/delta/routes/SchemasRoutes.scala | 2 +- .../delta/routes/TypeHierarchyRoutes.scala | 4 +- .../delta/routes/UserPermissionsRoutes.scala | 2 +- .../delta/routes/PermissionsRoutesSpec.scala | 2 +- .../nexus/delta/kernel}/RdfMediaTypes.scala | 2 +- .../kernel}/circe/CirceMarshalling.scala | 4 +- .../kernel}/circe/CirceUnmarshalling.scala | 4 +- .../kernel}/circe/CirceMarshallingSpec.scala | 12 ++-- .../circe/CirceUnmarshallingSpec.scala | 12 ++-- .../delta/kernel}/circe/SimpleResource.scala | 5 +- .../archive/routes/ArchiveRoutes.scala | 2 +- .../plugins/archive/ArchiveRoutesSpec.scala | 2 +- .../client/SparqlQueryResponseType.scala | 2 +- .../blazegraph/client/SparqlResults.scala | 2 +- .../blazegraph/client/XmlSupport.scala | 2 +- .../routes/BlazegraphViewsDirectives.scala | 2 +- .../BlazegraphViewsIndexingRoutes.scala | 2 +- .../routes/BlazegraphViewsRoutes.scala | 2 +- .../routes/BlazegraphViewsRoutesSpec.scala | 2 +- .../compositeviews/client/DeltaClient.scala | 3 +- .../routes/CompositeViewsIndexingRoutes.scala | 2 +- .../routes/CompositeViewsRoutes.scala | 2 +- .../client/DeltaClientSpec.scala | 2 +- .../routes/CompositeViewsRoutesSpec.scala | 6 +- .../client/ElasticSearchClient.scala | 2 +- .../routes/ElasticSearchIndexingRoutes.scala | 2 +- .../routes/ElasticSearchViewsRoutes.scala | 2 +- .../ElasticSearchViewsDirectivesSpec.scala | 2 +- .../ElasticSearchViewsRoutesFixtures.scala | 2 +- .../routes/GraphAnalyticsRoutes.scala | 2 +- .../plugins/jira/routes/JiraRoutes.scala | 2 +- .../ProjectDeletionRoutesSpec.scala | 2 +- .../delta/plugins/search/SearchRoutes.scala | 2 +- .../files/routes/DelegateFilesRoutes.scala | 2 +- .../storage/files/routes/FilesRoutes.scala | 2 +- .../files/routes/LinkFilesRoutes.scala | 2 +- .../client/RemoteDiskStorageClient.scala | 2 +- .../storages/routes/StoragesRoutes.scala | 2 +- .../files/routes/FilesRoutesSpec.scala | 2 +- .../sdk/directives/DeltaDirectives.scala | 2 +- .../sdk/directives/ResponseToJsonLd.scala | 2 +- .../nexus/delta/sdk/http/HttpClient.scala | 2 +- .../sdk/marshalling/RdfMarshalling.scala | 4 +- .../sdk/directives/DeltaDirectivesSpec.scala | 4 +- .../sdk/directives/ResponseToJsonLdSpec.scala | 2 +- .../sdk/marshalling/RdfMarshallingSpec.scala | 2 +- .../nexus/tests/BaseIntegrationSpec.scala | 1 + .../bluebrain/nexus/tests/BlazegraphDsl.scala | 1 + .../nexus/tests/CirceUnmarshalling.scala | 56 ------------------- .../nexus/tests/ElasticsearchDsl.scala | 1 + .../bluebrain/nexus/tests/HttpClient.scala | 1 + .../bluebrain/nexus/tests/RdfMediaTypes.scala | 30 ---------- .../nexus/tests/admin/AdminDsl.scala | 3 +- .../bluebrain/nexus/tests/iam/AclDsl.scala | 5 +- .../nexus/tests/iam/PermissionDsl.scala | 3 +- .../tests/kg/ElasticSearchViewsDsl.scala | 3 +- .../nexus/tests/kg/files/StoragesDsl.scala | 3 +- 68 files changed, 92 insertions(+), 177 deletions(-) rename delta/{rdf/src/main/scala/ch/epfl/bluebrain/nexus/delta/rdf => kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel}/RdfMediaTypes.scala (96%) rename delta/{sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk => kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel}/circe/CirceMarshalling.scala (89%) rename delta/{sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk => kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel}/circe/CirceUnmarshalling.scala (93%) rename delta/{sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk => kernel/src/test/scala/ch/epfl/bluebrain/nexus/delta/kernel}/circe/CirceMarshallingSpec.scala (67%) rename delta/{sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk => kernel/src/test/scala/ch/epfl/bluebrain/nexus/delta/kernel}/circe/CirceUnmarshallingSpec.scala (78%) rename delta/{sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk => kernel/src/test/scala/ch/epfl/bluebrain/nexus/delta/kernel}/circe/SimpleResource.scala (62%) delete mode 100644 tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/CirceUnmarshalling.scala delete mode 100644 tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/RdfMediaTypes.scala diff --git a/build.sbt b/build.sbt index 9bfa164437..be8257bc85 100755 --- a/build.sbt +++ b/build.sbt @@ -202,7 +202,7 @@ lazy val kernel = project .settings( libraryDependencies ++= Seq( akkaStream, // Needed to create content type - akkaHttpCore, + akkaHttp, caffeine, catsCore, catsRetry, @@ -211,6 +211,8 @@ lazy val kernel = project fs2io, circeCore, circeParser, + circeLiteral, + circeGenericExtras, handleBars, nimbusJoseJwt, kamonCore, @@ -219,7 +221,9 @@ lazy val kernel = project pureconfigCats, munit % Test, munitCatsEffect % Test, - scalaTest % Test + scalaTest % Test, + akkaTestKit % Test, + akkaHttpTestKit % Test ), addCompilerPlugin(kindProjector), addCompilerPlugin(betterMonadicFor), @@ -313,8 +317,6 @@ lazy val sdk = project libraryDependencies ++= Seq( akkaHttpXml exclude ("org.scala-lang.modules", "scala-xml_2.13"), scalaXml, - circeLiteral, - circeGenericExtras, distageCore, akkaSlf4j % Test, akkaTestKit % Test, diff --git a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/AclsRoutes.scala b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/AclsRoutes.scala index e772058c7d..3e9d46d331 100644 --- a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/AclsRoutes.scala +++ b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/AclsRoutes.scala @@ -8,6 +8,7 @@ import akka.http.scaladsl.model.{StatusCode, StatusCodes} import akka.http.scaladsl.server.{Directive1, MalformedQueryParamRejection, Route} import cats.effect.IO import cats.syntax.all._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.JsonLdContext.keywords import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder @@ -19,9 +20,8 @@ import ch.epfl.bluebrain.nexus.delta.sdk.acls.model.AclAddressFilter.{AnyOrganiz import ch.epfl.bluebrain.nexus.delta.sdk.acls.model.AclRejection.AclNotFound import ch.epfl.bluebrain.nexus.delta.sdk.acls.model._ import ch.epfl.bluebrain.nexus.delta.sdk.acls.{AclCheck, Acls} -import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.AuthDirectives +import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities import ch.epfl.bluebrain.nexus.delta.sdk.implicits._ import ch.epfl.bluebrain.nexus.delta.sdk.marshalling.RdfRejectionHandler.{malformedQueryParamEncoder, malformedQueryParamResponseFields} diff --git a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ExportRoutes.scala b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ExportRoutes.scala index f1a644da1e..d38226b529 100644 --- a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ExportRoutes.scala +++ b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ExportRoutes.scala @@ -2,11 +2,11 @@ package ch.epfl.bluebrain.nexus.delta.routes import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.server.Route +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck import ch.epfl.bluebrain.nexus.delta.sdk.acls.model.AclAddress -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.AuthDirectives import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.directives.UriDirectives.baseUriPrefix diff --git a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/MultiFetchRoutes.scala b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/MultiFetchRoutes.scala index 68de1533ae..efff0a2a27 100644 --- a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/MultiFetchRoutes.scala +++ b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/MultiFetchRoutes.scala @@ -1,10 +1,10 @@ package ch.epfl.bluebrain.nexus.delta.routes import akka.http.scaladsl.server.Route +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.AuthDirectives import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.directives.UriDirectives.baseUriPrefix diff --git a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/OrganizationsRoutes.scala b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/OrganizationsRoutes.scala index 4b0af5389d..921b24b8e2 100644 --- a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/OrganizationsRoutes.scala +++ b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/OrganizationsRoutes.scala @@ -4,13 +4,13 @@ import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.server.{Directive1, Route} import cats.effect.IO import cats.implicits._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.routes.OrganizationsRoutes.OrganizationInput import ch.epfl.bluebrain.nexus.delta.sdk.OrganizationResource import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.AuthDirectives import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities diff --git a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/PermissionsRoutes.scala b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/PermissionsRoutes.scala index 7fc537efb0..5dd4cfb183 100644 --- a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/PermissionsRoutes.scala +++ b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/PermissionsRoutes.scala @@ -3,6 +3,7 @@ package ch.epfl.bluebrain.nexus.delta.routes import akka.http.scaladsl.server.{MalformedRequestContentRejection, Route} import cats.effect.IO import cats.implicits._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.contexts import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.JsonLdContext.keywords import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.{ContextValue, RemoteContextResolution} @@ -13,7 +14,6 @@ import ch.epfl.bluebrain.nexus.delta.routes.PermissionsRoutes._ import ch.epfl.bluebrain.nexus.delta.sdk.PermissionsResource import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck import ch.epfl.bluebrain.nexus.delta.sdk.acls.model.AclAddress -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.AuthDirectives import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities diff --git a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ProjectsRoutes.scala b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ProjectsRoutes.scala index 3974d0d560..2eef063138 100644 --- a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ProjectsRoutes.scala +++ b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ProjectsRoutes.scala @@ -4,12 +4,12 @@ import akka.http.scaladsl.model._ import akka.http.scaladsl.server._ import cats.data.OptionT import cats.implicits._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk._ import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.AuthDirectives import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.fusion.FusionConfig diff --git a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/RealmsRoutes.scala b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/RealmsRoutes.scala index 99e532548a..4becaf6af6 100644 --- a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/RealmsRoutes.scala +++ b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/RealmsRoutes.scala @@ -5,6 +5,7 @@ import akka.http.scaladsl.server.{Directive1, Route} import cats.data.NonEmptySet import cats.effect.IO import cats.implicits._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering @@ -13,7 +14,6 @@ import ch.epfl.bluebrain.nexus.delta.routes.RealmsRoutes.RealmInput._ import ch.epfl.bluebrain.nexus.delta.sdk.RealmResource import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck import ch.epfl.bluebrain.nexus.delta.sdk.acls.model.AclAddress -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.AuthDirectives import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities diff --git a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ResolversRoutes.scala b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ResolversRoutes.scala index f0618aafc9..34b6982acf 100644 --- a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ResolversRoutes.scala +++ b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ResolversRoutes.scala @@ -5,6 +5,7 @@ import akka.http.scaladsl.model.{StatusCode, StatusCodes} import akka.http.scaladsl.server._ import cats.effect.IO import cats.implicits._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.{contexts, schemas} import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.{ContextValue, RemoteContextResolution} import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder @@ -12,7 +13,6 @@ import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.routes.ResolutionType.{AllResolversInProject, SingleResolver} import ch.epfl.bluebrain.nexus.delta.sdk._ import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.directives.{AuthDirectives, DeltaSchemeDirectives} import ch.epfl.bluebrain.nexus.delta.sdk.fusion.FusionConfig diff --git a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ResourcesRoutes.scala b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ResourcesRoutes.scala index c97ba2add7..39747c2a0c 100644 --- a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ResourcesRoutes.scala +++ b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ResourcesRoutes.scala @@ -4,13 +4,13 @@ import akka.http.scaladsl.model.StatusCodes.{Created, OK} import akka.http.scaladsl.server._ import cats.effect.IO import cats.syntax.all._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.schemas import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.{ContextValue, RemoteContextResolution} import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk._ import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.AuthDirectives import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.fusion.FusionConfig diff --git a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ResourcesTrialRoutes.scala b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ResourcesTrialRoutes.scala index 618e04dde4..4f3045c5d9 100644 --- a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ResourcesTrialRoutes.scala +++ b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/ResourcesTrialRoutes.scala @@ -3,6 +3,7 @@ package ch.epfl.bluebrain.nexus.delta.routes import akka.http.scaladsl.server.Route import cats.effect.IO import cats.syntax.all._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.schemas import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering @@ -10,7 +11,6 @@ import ch.epfl.bluebrain.nexus.delta.routes.ResourcesTrialRoutes.SchemaInput._ import ch.epfl.bluebrain.nexus.delta.routes.ResourcesTrialRoutes.{GenerateSchema, GenerationInput} import ch.epfl.bluebrain.nexus.delta.sdk.SchemaResource import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.AuthDirectives import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities diff --git a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/SchemasRoutes.scala b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/SchemasRoutes.scala index 788f55fc89..a236939434 100644 --- a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/SchemasRoutes.scala +++ b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/SchemasRoutes.scala @@ -5,6 +5,7 @@ import akka.http.scaladsl.model.{StatusCode, StatusCodes} import akka.http.scaladsl.server._ import cats.effect.IO import cats.implicits._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.contexts import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.schemas.shacl import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.{ContextValue, RemoteContextResolution} @@ -12,7 +13,6 @@ import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk._ import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.directives.{AuthDirectives, DeltaSchemeDirectives} import ch.epfl.bluebrain.nexus.delta.sdk.fusion.FusionConfig diff --git a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/TypeHierarchyRoutes.scala b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/TypeHierarchyRoutes.scala index 0f3190f6c6..9c9641184a 100644 --- a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/TypeHierarchyRoutes.scala +++ b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/TypeHierarchyRoutes.scala @@ -3,19 +3,19 @@ package ch.epfl.bluebrain.nexus.delta.routes import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.server.Route import cats.implicits.catsSyntaxApplicativeError +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck import ch.epfl.bluebrain.nexus.delta.sdk.acls.model.AclAddress -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.AuthDirectives import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities import ch.epfl.bluebrain.nexus.delta.sdk.implicits._ import ch.epfl.bluebrain.nexus.delta.sdk.model.BaseUri import ch.epfl.bluebrain.nexus.delta.sdk.permissions.Permissions.typehierarchy -import ch.epfl.bluebrain.nexus.delta.sdk.typehierarchy.{TypeHierarchy => TypeHierarchyModel} import ch.epfl.bluebrain.nexus.delta.sdk.typehierarchy.model.{TypeHierarchy, TypeHierarchyRejection} +import ch.epfl.bluebrain.nexus.delta.sdk.typehierarchy.{TypeHierarchy => TypeHierarchyModel} final class TypeHierarchyRoutes( typeHierarchy: TypeHierarchyModel, diff --git a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/UserPermissionsRoutes.scala b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/UserPermissionsRoutes.scala index dc031ace76..bf6b8d48ba 100644 --- a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/UserPermissionsRoutes.scala +++ b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/UserPermissionsRoutes.scala @@ -2,9 +2,9 @@ package ch.epfl.bluebrain.nexus.delta.routes import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.server.Route +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck import ch.epfl.bluebrain.nexus.delta.sdk.acls.model.AclAddress -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.AuthDirectives import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities diff --git a/delta/app/src/test/scala/ch/epfl/bluebrain/nexus/delta/routes/PermissionsRoutesSpec.scala b/delta/app/src/test/scala/ch/epfl/bluebrain/nexus/delta/routes/PermissionsRoutesSpec.scala index 9f3321b871..55ffb3380b 100644 --- a/delta/app/src/test/scala/ch/epfl/bluebrain/nexus/delta/routes/PermissionsRoutesSpec.scala +++ b/delta/app/src/test/scala/ch/epfl/bluebrain/nexus/delta/routes/PermissionsRoutesSpec.scala @@ -4,7 +4,7 @@ import akka.http.scaladsl.model.MediaRanges.`*/*` import akka.http.scaladsl.model._ import akka.http.scaladsl.model.headers.Accept import akka.http.scaladsl.server.Route -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes._ +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes._ import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.JsonLdContext.keywords import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclSimpleCheck import ch.epfl.bluebrain.nexus.delta.sdk.acls.model.AclAddress diff --git a/delta/rdf/src/main/scala/ch/epfl/bluebrain/nexus/delta/rdf/RdfMediaTypes.scala b/delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/RdfMediaTypes.scala similarity index 96% rename from delta/rdf/src/main/scala/ch/epfl/bluebrain/nexus/delta/rdf/RdfMediaTypes.scala rename to delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/RdfMediaTypes.scala index 76925c7d2c..ef26bd0df9 100644 --- a/delta/rdf/src/main/scala/ch/epfl/bluebrain/nexus/delta/rdf/RdfMediaTypes.scala +++ b/delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/RdfMediaTypes.scala @@ -1,4 +1,4 @@ -package ch.epfl.bluebrain.nexus.delta.rdf +package ch.epfl.bluebrain.nexus.delta.kernel import akka.http.scaladsl.model.HttpCharsets._ import akka.http.scaladsl.model.MediaType diff --git a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/circe/CirceMarshalling.scala b/delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/circe/CirceMarshalling.scala similarity index 89% rename from delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/circe/CirceMarshalling.scala rename to delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/circe/CirceMarshalling.scala index e5604bcf55..5a09af78a3 100644 --- a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/circe/CirceMarshalling.scala +++ b/delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/circe/CirceMarshalling.scala @@ -1,10 +1,10 @@ -package ch.epfl.bluebrain.nexus.delta.sdk.circe +package ch.epfl.bluebrain.nexus.delta.kernel.circe import akka.http.scaladsl.marshalling.{Marshaller, ToEntityMarshaller} import akka.http.scaladsl.model.MediaTypes.`application/json` import akka.http.scaladsl.model.{ContentType, HttpEntity, MediaType} import akka.util.ByteString -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes.`application/ld+json` +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes.`application/ld+json` import io.circe.{Encoder, Json, Printer} trait CirceMarshalling { diff --git a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/circe/CirceUnmarshalling.scala b/delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/circe/CirceUnmarshalling.scala similarity index 93% rename from delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/circe/CirceUnmarshalling.scala rename to delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/circe/CirceUnmarshalling.scala index 312a3b31d6..511f7d15ad 100644 --- a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/circe/CirceUnmarshalling.scala +++ b/delta/kernel/src/main/scala/ch/epfl/bluebrain/nexus/delta/kernel/circe/CirceUnmarshalling.scala @@ -1,10 +1,10 @@ -package ch.epfl.bluebrain.nexus.delta.sdk.circe +package ch.epfl.bluebrain.nexus.delta.kernel.circe import akka.http.scaladsl.model.ContentTypeRange import akka.http.scaladsl.model.MediaTypes.`application/json` import akka.http.scaladsl.unmarshalling.{FromEntityUnmarshaller, Unmarshaller} import akka.util.ByteString -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes._ +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes._ import io.circe.{jawn, Decoder, Json} import scala.collection.immutable.Seq diff --git a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/circe/CirceMarshallingSpec.scala b/delta/kernel/src/test/scala/ch/epfl/bluebrain/nexus/delta/kernel/circe/CirceMarshallingSpec.scala similarity index 67% rename from delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/circe/CirceMarshallingSpec.scala rename to delta/kernel/src/test/scala/ch/epfl/bluebrain/nexus/delta/kernel/circe/CirceMarshallingSpec.scala index 818a650750..19456285a4 100644 --- a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/circe/CirceMarshallingSpec.scala +++ b/delta/kernel/src/test/scala/ch/epfl/bluebrain/nexus/delta/kernel/circe/CirceMarshallingSpec.scala @@ -1,13 +1,11 @@ -package ch.epfl.bluebrain.nexus.delta.sdk.circe +package ch.epfl.bluebrain.nexus.delta.kernel.circe import akka.actor.ActorSystem import akka.http.scaladsl.marshalling.Marshal import akka.http.scaladsl.model.MediaTypes.`application/json` import akka.http.scaladsl.model.{HttpEntity, MessageEntity} import akka.testkit.TestKit -import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.nxv -import ch.epfl.bluebrain.nexus.testkit.CirceLiteral -import ch.epfl.bluebrain.nexus.testkit.scalatest.TestMatchers +import io.circe.literal._ import io.circe.syntax._ import org.scalatest.concurrent.ScalaFutures import org.scalatest.matchers.should.Matchers @@ -19,15 +17,13 @@ class CirceMarshallingSpec extends TestKit(ActorSystem("CirceMarshallingSpec")) with AnyWordSpecLike with Matchers - with CirceLiteral with CirceMarshalling - with TestMatchers with ScalaFutures { import system.dispatcher - private val id = nxv + "myresource" + private val id = "myresource" private val resource = SimpleResource(id, 1, Instant.EPOCH, "Maria", 20) - private val json = json"""{"id": "$id", "rev": 1, "createdAt": ${Instant.EPOCH.asJson}, "name": "Maria", "age": 20}""" + private val json = json"""{"id": $id, "rev": 1, "createdAt": ${Instant.EPOCH.asJson}, "name": "Maria", "age": 20}""" "Converting SimpleResource to an HttpEntity" should { diff --git a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/circe/CirceUnmarshallingSpec.scala b/delta/kernel/src/test/scala/ch/epfl/bluebrain/nexus/delta/kernel/circe/CirceUnmarshallingSpec.scala similarity index 78% rename from delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/circe/CirceUnmarshallingSpec.scala rename to delta/kernel/src/test/scala/ch/epfl/bluebrain/nexus/delta/kernel/circe/CirceUnmarshallingSpec.scala index 2bb1ba561a..82ed080e39 100644 --- a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/circe/CirceUnmarshallingSpec.scala +++ b/delta/kernel/src/test/scala/ch/epfl/bluebrain/nexus/delta/kernel/circe/CirceUnmarshallingSpec.scala @@ -1,14 +1,12 @@ -package ch.epfl.bluebrain.nexus.delta.sdk.circe +package ch.epfl.bluebrain.nexus.delta.kernel.circe import akka.actor.ActorSystem import akka.http.scaladsl.model.MediaTypes.`application/json` import akka.http.scaladsl.model.{HttpEntity, HttpRequest} import akka.http.scaladsl.unmarshalling.Unmarshal import akka.testkit.TestKit -import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.nxv -import ch.epfl.bluebrain.nexus.testkit.CirceLiteral -import ch.epfl.bluebrain.nexus.testkit.scalatest.TestMatchers import io.circe.DecodingFailure +import io.circe.literal._ import io.circe.syntax._ import org.scalatest.concurrent.ScalaFutures import org.scalatest.matchers.should.Matchers @@ -20,14 +18,12 @@ class CirceUnmarshallingSpec extends TestKit(ActorSystem("CirceUnmarshallingSpec")) with AnyWordSpecLike with Matchers - with CirceLiteral with CirceUnmarshalling - with TestMatchers with ScalaFutures { - private val id = nxv + "myresource" + private val id = "myresource" private val resource = SimpleResource(id, 1, Instant.EPOCH, "Maria", 20) - private val json = json"""{"id": "$id", "rev": 1, "createdAt": ${Instant.EPOCH.asJson}, "name": "Maria", "age": 20}""" + private val json = json"""{"id": $id, "rev": 1, "createdAt": ${Instant.EPOCH.asJson}, "name": "Maria", "age": 20}""" "Converting HttpEntity to a SimpleResource" should { diff --git a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/circe/SimpleResource.scala b/delta/kernel/src/test/scala/ch/epfl/bluebrain/nexus/delta/kernel/circe/SimpleResource.scala similarity index 62% rename from delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/circe/SimpleResource.scala rename to delta/kernel/src/test/scala/ch/epfl/bluebrain/nexus/delta/kernel/circe/SimpleResource.scala index 26dd33fd34..3e7295b402 100644 --- a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/circe/SimpleResource.scala +++ b/delta/kernel/src/test/scala/ch/epfl/bluebrain/nexus/delta/kernel/circe/SimpleResource.scala @@ -1,12 +1,11 @@ -package ch.epfl.bluebrain.nexus.delta.sdk.circe +package ch.epfl.bluebrain.nexus.delta.kernel.circe -import ch.epfl.bluebrain.nexus.delta.rdf.IriOrBNode.Iri import io.circe.{Decoder, Encoder} import io.circe.generic.semiauto._ import java.time.Instant -final case class SimpleResource(id: Iri, rev: Int, createdAt: Instant, name: String, age: Int) +final case class SimpleResource(id: String, rev: Int, createdAt: Instant, name: String, age: Int) object SimpleResource { implicit val simpleResourceEncoder: Encoder.AsObject[SimpleResource] = deriveEncoder[SimpleResource] implicit val simpleResourceDecoder: Decoder[SimpleResource] = deriveDecoder[SimpleResource] diff --git a/delta/plugins/archive/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/archive/routes/ArchiveRoutes.scala b/delta/plugins/archive/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/archive/routes/ArchiveRoutes.scala index bceed4c878..cb7d8c0381 100644 --- a/delta/plugins/archive/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/archive/routes/ArchiveRoutes.scala +++ b/delta/plugins/archive/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/archive/routes/ArchiveRoutes.scala @@ -11,7 +11,7 @@ import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.AkkaSource import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.directives.{AuthDirectives, FileResponse} import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities diff --git a/delta/plugins/archive/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/archive/ArchiveRoutesSpec.scala b/delta/plugins/archive/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/archive/ArchiveRoutesSpec.scala index 0031315103..49726f180e 100644 --- a/delta/plugins/archive/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/archive/ArchiveRoutesSpec.scala +++ b/delta/plugins/archive/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/archive/ArchiveRoutesSpec.scala @@ -23,7 +23,7 @@ import ch.epfl.bluebrain.nexus.delta.plugins.storage.files.schemas import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.StorageFixtures import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.DigestAlgorithm import ch.epfl.bluebrain.nexus.delta.rdf.IriOrBNode.Iri -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes.`application/ld+json` +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes.`application/ld+json` import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.nxv import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering diff --git a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/SparqlQueryResponseType.scala b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/SparqlQueryResponseType.scala index 99682b7a88..3245c271a3 100644 --- a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/SparqlQueryResponseType.scala +++ b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/SparqlQueryResponseType.scala @@ -5,7 +5,7 @@ import cats.data.NonEmptyList import ch.epfl.bluebrain.nexus.delta.sdk.instances._ import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client.SparqlQueryResponse._ -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes._ +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes._ import cats.implicits._ /** diff --git a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/SparqlResults.scala b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/SparqlResults.scala index d7990db4b9..6d899b6c26 100644 --- a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/SparqlResults.scala +++ b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/SparqlResults.scala @@ -3,7 +3,7 @@ package ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client import akka.http.scaladsl.marshalling.ToEntityMarshaller import akka.http.scaladsl.model.Uri import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client.SparqlResults._ -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes.`application/sparql-results+json` +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes.`application/sparql-results+json` import ch.epfl.bluebrain.nexus.delta.rdf.instances._ import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.marshalling.RdfMarshalling diff --git a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/XmlSupport.scala b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/XmlSupport.scala index 94cd5d0888..b320b2b582 100644 --- a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/XmlSupport.scala +++ b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/client/XmlSupport.scala @@ -4,7 +4,7 @@ import akka.http.scaladsl.marshallers.xml.ScalaXmlSupport import akka.http.scaladsl.marshalling.{Marshaller, ToEntityMarshaller} import akka.http.scaladsl.model.{ContentTypeRange, MediaType} import akka.http.scaladsl.unmarshalling.FromEntityUnmarshaller -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes import scala.xml.NodeSeq diff --git a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsDirectives.scala b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsDirectives.scala index 270084cc5a..1bd93224a1 100644 --- a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsDirectives.scala +++ b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsDirectives.scala @@ -5,7 +5,7 @@ import akka.http.scaladsl.model.MediaTypes.`text/plain` import akka.http.scaladsl.server.Directives.{extractRequest, provide} import akka.http.scaladsl.server.{Directive, Directive1, Route} import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client.{SparqlQueryResponse, SparqlQueryResponseType} -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes._ +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes._ import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ diff --git a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsIndexingRoutes.scala b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsIndexingRoutes.scala index ffeb00bf10..1004c4897d 100644 --- a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsIndexingRoutes.scala +++ b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsIndexingRoutes.scala @@ -14,7 +14,7 @@ import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.{ContextValue, RemoteCon import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.{AuthDirectives, DeltaDirectives} import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities import ch.epfl.bluebrain.nexus.delta.sdk.implicits._ diff --git a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsRoutes.scala b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsRoutes.scala index c756ed0cfa..27a5308e82 100644 --- a/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsRoutes.scala +++ b/delta/plugins/blazegraph/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsRoutes.scala @@ -5,6 +5,7 @@ import akka.http.scaladsl.model.{StatusCode, StatusCodes} import akka.http.scaladsl.server.{Directive0, Route} import cats.effect.IO import cats.implicits._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.model.BlazegraphViewRejection._ import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.model._ import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.model.permissions.{read => Read, write => Write} @@ -16,7 +17,6 @@ import ch.epfl.bluebrain.nexus.delta.rdf.query.SparqlQuery import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.IndexingAction import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.{AuthDirectives, DeltaDirectives} import ch.epfl.bluebrain.nexus.delta.sdk.fusion.FusionConfig import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities diff --git a/delta/plugins/blazegraph/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsRoutesSpec.scala b/delta/plugins/blazegraph/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsRoutesSpec.scala index ecaaf0734c..e1a42f7c89 100644 --- a/delta/plugins/blazegraph/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsRoutesSpec.scala +++ b/delta/plugins/blazegraph/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/blazegraph/routes/BlazegraphViewsRoutesSpec.scala @@ -11,7 +11,7 @@ import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.BlazegraphViews import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client.{SparqlQueryClientDummy, SparqlResults} import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.model._ import ch.epfl.bluebrain.nexus.delta.rdf.IriOrBNode.Iri -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes._ +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes._ import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.nxv import ch.epfl.bluebrain.nexus.delta.rdf.query.SparqlQuery import ch.epfl.bluebrain.nexus.delta.rdf.query.SparqlQuery.SparqlConstructQuery diff --git a/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClient.scala b/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClient.scala index e95e09592a..c24c5ee0f0 100644 --- a/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClient.scala +++ b/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClient.scala @@ -9,11 +9,10 @@ import akka.http.scaladsl.model.{HttpRequest, HttpResponse, StatusCodes} import akka.stream.alpakka.sse.scaladsl.EventSource import cats.effect.IO import cats.effect.unsafe.implicits._ -import ch.epfl.bluebrain.nexus.delta.kernel.Logger +import ch.epfl.bluebrain.nexus.delta.kernel.{Logger, RdfMediaTypes} import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.model.CompositeViewSource.RemoteProjectSource import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.stream.CompositeBranch import ch.epfl.bluebrain.nexus.delta.rdf.IriOrBNode.Iri -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes import ch.epfl.bluebrain.nexus.delta.rdf.graph.NQuads import ch.epfl.bluebrain.nexus.delta.sdk.auth.{AuthTokenProvider, Credentials} import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClient diff --git a/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/routes/CompositeViewsIndexingRoutes.scala b/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/routes/CompositeViewsIndexingRoutes.scala index 7c20756953..a1f7b17e5b 100644 --- a/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/routes/CompositeViewsIndexingRoutes.scala +++ b/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/routes/CompositeViewsIndexingRoutes.scala @@ -16,7 +16,7 @@ import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.{ContextValue, RemoteCon import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.{AuthDirectives, DeltaDirectives} import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities import ch.epfl.bluebrain.nexus.delta.sdk.implicits._ diff --git a/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/routes/CompositeViewsRoutes.scala b/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/routes/CompositeViewsRoutes.scala index 2b4cc52fad..763e45bd8f 100644 --- a/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/routes/CompositeViewsRoutes.scala +++ b/delta/plugins/composite-views/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/routes/CompositeViewsRoutes.scala @@ -16,7 +16,7 @@ import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.query.SparqlQuery import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.{AuthDirectives, DeltaDirectives} import ch.epfl.bluebrain.nexus.delta.sdk.fusion.FusionConfig import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities diff --git a/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClientSpec.scala b/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClientSpec.scala index 8a74fe10f6..bc1b8b2aee 100644 --- a/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClientSpec.scala +++ b/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClientSpec.scala @@ -10,9 +10,9 @@ import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server.RouteResult import akka.stream.scaladsl.Source import akka.testkit.TestKit +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.model.CompositeViewSource.RemoteProjectSource import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.stream.CompositeBranch -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes import ch.epfl.bluebrain.nexus.delta.rdf.graph.NQuads import ch.epfl.bluebrain.nexus.delta.sdk.ConfigFixtures import ch.epfl.bluebrain.nexus.delta.sdk.auth.{AuthTokenProvider, Credentials} diff --git a/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/routes/CompositeViewsRoutesSpec.scala b/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/routes/CompositeViewsRoutesSpec.scala index ca1bd7b49e..5270430cd0 100644 --- a/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/routes/CompositeViewsRoutesSpec.scala +++ b/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/routes/CompositeViewsRoutesSpec.scala @@ -5,18 +5,18 @@ import akka.http.scaladsl.model.headers.{`Content-Type`, Accept, Location} import akka.http.scaladsl.model.{HttpEntity, StatusCodes, Uri} import akka.http.scaladsl.server.Route import akka.util.ByteString +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes import ch.epfl.bluebrain.nexus.delta.kernel.utils.UrlUtils import ch.epfl.bluebrain.nexus.delta.plugins.blazegraph.client.SparqlQueryClientDummy import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.CompositeViews import ch.epfl.bluebrain.nexus.delta.plugins.compositeviews.model.permissions import ch.epfl.bluebrain.nexus.delta.rdf.IriOrBNode.{BNode, Iri} -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes.`application/sparql-query` +import RdfMediaTypes.`application/sparql-query` import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.nxv import ch.epfl.bluebrain.nexus.delta.rdf.graph.NTriples import ch.epfl.bluebrain.nexus.delta.rdf.query.SparqlQuery import ch.epfl.bluebrain.nexus.delta.sdk.acls.model.AclAddress -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceMarshalling +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceMarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaSchemeDirectives import ch.epfl.bluebrain.nexus.delta.sdk.fusion.FusionConfig import ch.epfl.bluebrain.nexus.delta.sdk.implicits._ diff --git a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/client/ElasticSearchClient.scala b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/client/ElasticSearchClient.scala index edc97210b9..4c386e8faa 100644 --- a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/client/ElasticSearchClient.scala +++ b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/client/ElasticSearchClient.scala @@ -17,7 +17,7 @@ import ch.epfl.bluebrain.nexus.delta.kernel.{Logger, RetryStrategy} import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.ElasticSearchClient.BulkResponse.MixedOutcomes.Outcome import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.ElasticSearchClient._ import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.model.{EmptyResults, ResourcesSearchParams} -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceMarshalling._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceMarshalling._ import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError.{HttpClientStatusError, HttpUnexpectedError} import ch.epfl.bluebrain.nexus.delta.sdk.http.{HttpClient, HttpClientError} import ch.epfl.bluebrain.nexus.delta.sdk.model.BaseUri diff --git a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/routes/ElasticSearchIndexingRoutes.scala b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/routes/ElasticSearchIndexingRoutes.scala index 801df6fbcc..c996c2ca7c 100644 --- a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/routes/ElasticSearchIndexingRoutes.scala +++ b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/routes/ElasticSearchIndexingRoutes.scala @@ -3,6 +3,7 @@ package ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.routes import akka.http.scaladsl.server._ import cats.effect.IO import cats.implicits._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.ElasticSearchViewsQuery import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.indexing.IndexingViewDef.ActiveViewDef import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.model.ElasticSearchViewRejection._ @@ -15,7 +16,6 @@ import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.{ContextValue, RemoteCon import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.AuthDirectives import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities diff --git a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/routes/ElasticSearchViewsRoutes.scala b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/routes/ElasticSearchViewsRoutes.scala index b6466b2ef0..a567c394c0 100644 --- a/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/routes/ElasticSearchViewsRoutes.scala +++ b/delta/plugins/elasticsearch/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/routes/ElasticSearchViewsRoutes.scala @@ -5,6 +5,7 @@ import akka.http.scaladsl.model.{StatusCode, StatusCodes} import akka.http.scaladsl.server._ import cats.effect.IO import cats.implicits._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.client.PointInTime import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.model.ElasticSearchViewRejection._ import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.model._ @@ -14,7 +15,6 @@ import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk._ import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.AuthDirectives import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.fusion.FusionConfig diff --git a/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/routes/ElasticSearchViewsDirectivesSpec.scala b/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/routes/ElasticSearchViewsDirectivesSpec.scala index 6096abf8d3..0919ee9484 100644 --- a/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/routes/ElasticSearchViewsDirectivesSpec.scala +++ b/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/routes/ElasticSearchViewsDirectivesSpec.scala @@ -10,7 +10,7 @@ import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.model.ResourcesSearch import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.model.ResourcesSearchParams.Type.{ExcludedType, IncludedType} import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.nxv import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.JsonLdContext.keywords -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceMarshalling +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceMarshalling import ch.epfl.bluebrain.nexus.delta.sdk.implicits._ import ch.epfl.bluebrain.nexus.delta.sdk.model._ import ch.epfl.bluebrain.nexus.delta.sdk.model.search.Sort.OrderType diff --git a/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/routes/ElasticSearchViewsRoutesFixtures.scala b/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/routes/ElasticSearchViewsRoutesFixtures.scala index 81d97e061f..62253e3642 100644 --- a/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/routes/ElasticSearchViewsRoutesFixtures.scala +++ b/delta/plugins/elasticsearch/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/routes/ElasticSearchViewsRoutesFixtures.scala @@ -2,11 +2,11 @@ package ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.routes import akka.http.scaladsl.model.headers.OAuth2BearerToken import akka.http.scaladsl.server.{ExceptionHandler, RejectionHandler} +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceMarshalling import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.Fixtures import ch.epfl.bluebrain.nexus.delta.plugins.elasticsearch.model.{schema => elasticSearchSchema} import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclSimpleCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceMarshalling import ch.epfl.bluebrain.nexus.delta.sdk.generators.ProjectGen import ch.epfl.bluebrain.nexus.delta.sdk.identities.IdentitiesDummy import ch.epfl.bluebrain.nexus.delta.sdk.identities.model.Caller diff --git a/delta/plugins/graph-analytics/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/graph/analytics/routes/GraphAnalyticsRoutes.scala b/delta/plugins/graph-analytics/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/graph/analytics/routes/GraphAnalyticsRoutes.scala index 30b40c9d90..a137fb527b 100644 --- a/delta/plugins/graph-analytics/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/graph/analytics/routes/GraphAnalyticsRoutes.scala +++ b/delta/plugins/graph-analytics/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/graph/analytics/routes/GraphAnalyticsRoutes.scala @@ -8,7 +8,7 @@ import ch.epfl.bluebrain.nexus.delta.plugins.graph.analytics.{GraphAnalytics, Gr import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.AuthDirectives import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities diff --git a/delta/plugins/jira/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/jira/routes/JiraRoutes.scala b/delta/plugins/jira/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/jira/routes/JiraRoutes.scala index d1321ff5b9..a586f082ab 100644 --- a/delta/plugins/jira/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/jira/routes/JiraRoutes.scala +++ b/delta/plugins/jira/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/jira/routes/JiraRoutes.scala @@ -9,7 +9,7 @@ import ch.epfl.bluebrain.nexus.delta.plugins.jira.{JiraClient, JiraError} import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.AuthDirectives import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.error.ServiceError.AuthorizationFailed diff --git a/delta/plugins/project-deletion/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/projectdeletion/ProjectDeletionRoutesSpec.scala b/delta/plugins/project-deletion/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/projectdeletion/ProjectDeletionRoutesSpec.scala index 8553915864..890a774890 100644 --- a/delta/plugins/project-deletion/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/projectdeletion/ProjectDeletionRoutesSpec.scala +++ b/delta/plugins/project-deletion/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/projectdeletion/ProjectDeletionRoutesSpec.scala @@ -1,8 +1,8 @@ package ch.epfl.bluebrain.nexus.delta.plugins.projectdeletion import akka.http.scaladsl.model.StatusCodes +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes import ch.epfl.bluebrain.nexus.delta.plugins.projectdeletion.model.{contexts, ProjectDeletionConfig} -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.{ContextValue, RemoteContextResolution} import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.model.BaseUri diff --git a/delta/plugins/search/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/search/SearchRoutes.scala b/delta/plugins/search/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/search/SearchRoutes.scala index e749a8acef..0b947fc300 100644 --- a/delta/plugins/search/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/search/SearchRoutes.scala +++ b/delta/plugins/search/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/search/SearchRoutes.scala @@ -10,7 +10,7 @@ import ch.epfl.bluebrain.nexus.delta.plugins.search.model.{SearchConfig, SearchR import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.{AuthDirectives, DeltaDirectives} import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities import ch.epfl.bluebrain.nexus.delta.sdk.marshalling.RdfMarshalling diff --git a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/routes/DelegateFilesRoutes.scala b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/routes/DelegateFilesRoutes.scala index 0c5b5013da..f2d5927cb7 100644 --- a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/routes/DelegateFilesRoutes.scala +++ b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/routes/DelegateFilesRoutes.scala @@ -4,6 +4,7 @@ import akka.http.scaladsl.model.StatusCodes.{Created, OK} import akka.http.scaladsl.server._ import cats.effect.IO import cats.syntax.all._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.{CirceMarshalling, CirceUnmarshalling} import ch.epfl.bluebrain.nexus.delta.plugins.storage.files.model.FileDelegationRequest.{FileDelegationCreationRequest, FileDelegationUpdateRequest} import ch.epfl.bluebrain.nexus.delta.plugins.storage.files.model.FileRejection._ import ch.epfl.bluebrain.nexus.delta.plugins.storage.files.model._ @@ -13,7 +14,6 @@ import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.StoragesConfig.Sho import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.{CirceMarshalling, CirceUnmarshalling} import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.directives.{AuthDirectives, ResponseToJsonLd} import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities diff --git a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/routes/FilesRoutes.scala b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/routes/FilesRoutes.scala index dcea506b0b..31f6356760 100644 --- a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/routes/FilesRoutes.scala +++ b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/routes/FilesRoutes.scala @@ -8,6 +8,7 @@ import akka.http.scaladsl.server.Directives.{extractRequestEntity, optionalHeade import akka.http.scaladsl.server._ import cats.effect.IO import cats.syntax.all._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.plugins.storage.files.model.FileRejection._ import ch.epfl.bluebrain.nexus.delta.plugins.storage.files.model._ import ch.epfl.bluebrain.nexus.delta.plugins.storage.files.permissions.{read => Read, write => Write} @@ -21,7 +22,6 @@ import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk._ import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.directives.{AuthDirectives, DeltaSchemeDirectives} import ch.epfl.bluebrain.nexus.delta.sdk.error.ServiceError.AuthorizationFailed diff --git a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/routes/LinkFilesRoutes.scala b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/routes/LinkFilesRoutes.scala index d45e32659a..6571e4dd8e 100644 --- a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/routes/LinkFilesRoutes.scala +++ b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/routes/LinkFilesRoutes.scala @@ -10,7 +10,7 @@ import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.StoragesConfig.Sho import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.AuthDirectives import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities diff --git a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/operations/remote/client/RemoteDiskStorageClient.scala b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/operations/remote/client/RemoteDiskStorageClient.scala index b7b8bdc626..e2b7afea04 100644 --- a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/operations/remote/client/RemoteDiskStorageClient.scala +++ b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/operations/remote/client/RemoteDiskStorageClient.scala @@ -19,7 +19,7 @@ import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.operations.remote. import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.JsonLdContext.keywords import ch.epfl.bluebrain.nexus.delta.sdk.AkkaSource import ch.epfl.bluebrain.nexus.delta.sdk.auth.{AuthTokenProvider, Credentials} -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceMarshalling._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceMarshalling._ import ch.epfl.bluebrain.nexus.delta.sdk.error.ServiceError.FeatureDisabled import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError._ import ch.epfl.bluebrain.nexus.delta.sdk.http.{HttpClient, HttpClientError} diff --git a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/routes/StoragesRoutes.scala b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/routes/StoragesRoutes.scala index 0f4c423716..ae26f9724d 100644 --- a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/routes/StoragesRoutes.scala +++ b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/routes/StoragesRoutes.scala @@ -3,6 +3,7 @@ package ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.routes import akka.http.scaladsl.model.StatusCodes.Created import akka.http.scaladsl.server._ import cats.implicits._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.StoragePluginExceptionHandler.handleStorageExceptions import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages._ import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.StorageRejection._ @@ -12,7 +13,6 @@ import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.IndexingAction import ch.epfl.bluebrain.nexus.delta.sdk.acls.AclCheck -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.directives.{AuthDirectives, DeltaSchemeDirectives} import ch.epfl.bluebrain.nexus.delta.sdk.fusion.FusionConfig diff --git a/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/routes/FilesRoutesSpec.scala b/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/routes/FilesRoutesSpec.scala index a4f1d94694..8e483df7c0 100644 --- a/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/routes/FilesRoutesSpec.scala +++ b/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/routes/FilesRoutesSpec.scala @@ -16,7 +16,7 @@ import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.StorageType import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.operations.{FileOperations, LinkFileAction} import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.{contexts => storageContexts, permissions => storagesPermissions, FetchStorage, StorageFixtures, Storages, StoragesConfig} import ch.epfl.bluebrain.nexus.delta.rdf.IriOrBNode.Iri -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes.`application/ld+json` +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes.`application/ld+json` import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.{contexts, nxv} import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.{ContextValue, RemoteContextResolution} diff --git a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/DeltaDirectives.scala b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/DeltaDirectives.scala index 19297e161e..7d87026b66 100644 --- a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/DeltaDirectives.scala +++ b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/DeltaDirectives.scala @@ -10,7 +10,7 @@ import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server._ import cats.effect.IO import cats.syntax.all._ -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes._ +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes._ import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder import ch.epfl.bluebrain.nexus.delta.sdk.directives.Response.{Complete, Reject} import ch.epfl.bluebrain.nexus.delta.sdk.fusion.FusionConfig diff --git a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/ResponseToJsonLd.scala b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/ResponseToJsonLd.scala index 209333153d..a0a3d909a7 100644 --- a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/ResponseToJsonLd.scala +++ b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/ResponseToJsonLd.scala @@ -10,7 +10,7 @@ import akka.http.scaladsl.server.Route import cats.effect.IO import cats.effect.unsafe.implicits._ import cats.syntax.all._ -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes._ +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes._ import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.api.{JsonLdApi, JsonLdJavaApi} import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder diff --git a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClient.scala b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClient.scala index c827b51661..3dde52a07e 100644 --- a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClient.scala +++ b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/http/HttpClient.scala @@ -14,7 +14,7 @@ import cats.implicits._ import ch.epfl.bluebrain.nexus.delta.kernel.utils.IOFuture import ch.epfl.bluebrain.nexus.delta.kernel.utils.IOFuture.defaultCancelable import ch.epfl.bluebrain.nexus.delta.sdk.AkkaSource -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceUnmarshalling._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling._ import ch.epfl.bluebrain.nexus.delta.sdk.http.HttpClientError._ import ch.epfl.bluebrain.nexus.delta.sdk.syntax._ import io.circe.{Decoder, Json} diff --git a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/marshalling/RdfMarshalling.scala b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/marshalling/RdfMarshalling.scala index fe3ed64ad2..8896e8d31a 100644 --- a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/marshalling/RdfMarshalling.scala +++ b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/marshalling/RdfMarshalling.scala @@ -6,8 +6,8 @@ import akka.http.scaladsl.model.MediaTypes._ import akka.http.scaladsl.model._ import akka.http.scaladsl.unmarshalling.{FromEntityUnmarshaller, FromStringUnmarshaller, PredefinedFromEntityUnmarshallers, Unmarshaller} import akka.util.ByteString -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes._ +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes._ import ch.epfl.bluebrain.nexus.delta.rdf.graph.{Dot, NQuads, NTriples} import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.JsonLd import ch.epfl.bluebrain.nexus.delta.rdf.query.SparqlQuery diff --git a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/DeltaDirectivesSpec.scala b/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/DeltaDirectivesSpec.scala index e323329a1a..8fbdd05e0f 100644 --- a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/DeltaDirectivesSpec.scala +++ b/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/DeltaDirectivesSpec.scala @@ -12,7 +12,7 @@ import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server.{ExceptionHandler, RejectionHandler, Route} import cats.effect.IO import ch.epfl.bluebrain.nexus.delta.rdf.IriOrBNode.Iri -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes._ +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes._ import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.{contexts, nxv} import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.api.{JsonLdApi, JsonLdJavaApi} import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.{ContextValue, RemoteContextResolution} @@ -20,7 +20,7 @@ import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder import ch.epfl.bluebrain.nexus.delta.rdf.utils.JsonKeyOrdering import ch.epfl.bluebrain.nexus.delta.sdk.SimpleRejection._ import ch.epfl.bluebrain.nexus.delta.sdk.SimpleResource.rawHeader -import ch.epfl.bluebrain.nexus.delta.sdk.circe.CirceMarshalling +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceMarshalling import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectives._ import ch.epfl.bluebrain.nexus.delta.sdk.directives.DeltaDirectivesSpec.SimpleResource2 import ch.epfl.bluebrain.nexus.delta.sdk.fusion.FusionConfig diff --git a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/ResponseToJsonLdSpec.scala b/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/ResponseToJsonLdSpec.scala index 24afbd3820..3d9969f082 100644 --- a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/ResponseToJsonLdSpec.scala +++ b/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/ResponseToJsonLdSpec.scala @@ -8,7 +8,7 @@ import akka.http.scaladsl.server.RouteConcatenation import akka.stream.scaladsl.Source import akka.util.ByteString import cats.effect.IO -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes.`application/ld+json` +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes.`application/ld+json` import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.{contexts, nxv} import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.encoder.JsonLdEncoder diff --git a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/marshalling/RdfMarshallingSpec.scala b/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/marshalling/RdfMarshallingSpec.scala index baf80594a9..e2c9600973 100644 --- a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/marshalling/RdfMarshallingSpec.scala +++ b/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/marshalling/RdfMarshallingSpec.scala @@ -2,7 +2,7 @@ package ch.epfl.bluebrain.nexus.delta.sdk.marshalling import akka.http.scaladsl.marshalling.Marshal import akka.http.scaladsl.model._ -import ch.epfl.bluebrain.nexus.delta.rdf.RdfMediaTypes._ +import ch.epfl.bluebrain.nexus.delta.kernel.RdfMediaTypes._ import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.nxv import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.api.{JsonLdApi, JsonLdJavaApi} import ch.epfl.bluebrain.nexus.delta.rdf.jsonld.context.RemoteContextResolution diff --git a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/BaseIntegrationSpec.scala b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/BaseIntegrationSpec.scala index 5ddc513c97..7a558de3ff 100644 --- a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/BaseIntegrationSpec.scala +++ b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/BaseIntegrationSpec.scala @@ -8,6 +8,7 @@ import cats.effect.unsafe.implicits._ import cats.effect.{IO, Ref} import cats.syntax.all._ import ch.epfl.bluebrain.nexus.delta.kernel.Logger +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.testkit._ import ch.epfl.bluebrain.nexus.testkit.clock.FixedClock import ch.epfl.bluebrain.nexus.testkit.scalatest.ce.{CatsEffectAsyncScalaTestAdapter, CatsEffectEventually, CatsIOValues} diff --git a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/BlazegraphDsl.scala b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/BlazegraphDsl.scala index 6d3c138d0a..e0068ccd80 100644 --- a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/BlazegraphDsl.scala +++ b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/BlazegraphDsl.scala @@ -7,6 +7,7 @@ import akka.http.scaladsl.model.headers.Accept import akka.http.scaladsl.model.{HttpRequest, MediaRange, MediaType} import akka.stream.Materializer import cats.effect.IO +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.testkit.CirceLiteral import io.circe.optics.JsonPath.root import org.scalatest.matchers.should.Matchers diff --git a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/CirceUnmarshalling.scala b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/CirceUnmarshalling.scala deleted file mode 100644 index 260be9ee25..0000000000 --- a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/CirceUnmarshalling.scala +++ /dev/null @@ -1,56 +0,0 @@ -package ch.epfl.bluebrain.nexus.tests - -import akka.http.scaladsl.model.MediaTypes.`application/json` -import akka.http.scaladsl.model.{ContentTypeRange, MediaType} -import akka.http.scaladsl.unmarshalling.{FromEntityUnmarshaller, Unmarshaller} -import akka.util.ByteString -import RdfMediaTypes.{`application/ld+json`, `application/sparql-results+json`} -import io.circe.{jawn, Decoder, Json} - -import scala.collection.immutable.Seq -import scala.concurrent.Future - -/** - * Unmarshallings that allow Akka Http to convert an [[HttpEntity]] to a type ''A'' using a [[Decoder]] Partially - * ported from ''de.heikoseeberger.akkahttpcirce.CirceSupport''. - */ -trait CirceUnmarshalling { - - private val mediaTypes: Seq[MediaType.WithFixedCharset] = - List(`application/json`, `application/ld+json`, `application/sparql-results+json`) - - private def unmarshallerContentTypes: Seq[ContentTypeRange] = - mediaTypes.map(ContentTypeRange.apply) - - implicit final def fromByteStringUnmarshaller[A: Decoder]: Unmarshaller[ByteString, A] = - Unmarshaller[ByteString, Json](_ => bs => Future.fromTry(jawn.parseByteBuffer(bs.asByteBuffer).toTry)) - .map(Decoder[A].decodeJson) - .map(_.fold(throw _, identity)) - - /** - * HTTP entity => `Json` - * - * @return - * unmarshaller for `Json` - */ - implicit final val jsonUnmarshaller: FromEntityUnmarshaller[Json] = - Unmarshaller.byteStringUnmarshaller - .forContentTypes(unmarshallerContentTypes: _*) - .map { - case ByteString.empty => throw Unmarshaller.NoContentException - case data => jawn.parseByteBuffer(data.asByteBuffer).fold(throw _, identity) - } - - /** - * HTTP entity => `Json` => `A` - * - * @return - * unmarshaller for `A` - */ - implicit final def decoderUnmarshaller[A: Decoder]: FromEntityUnmarshaller[A] = - jsonUnmarshaller - .map(Decoder[A].decodeJson) - .map(_.fold(throw _, identity)) -} - -object CirceUnmarshalling extends CirceUnmarshalling diff --git a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/ElasticsearchDsl.scala b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/ElasticsearchDsl.scala index 437436465c..1579f4f59f 100644 --- a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/ElasticsearchDsl.scala +++ b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/ElasticsearchDsl.scala @@ -7,6 +7,7 @@ import akka.http.scaladsl.model.{ContentTypes, HttpEntity, HttpRequest, StatusCo import akka.stream.Materializer import cats.effect.IO import ch.epfl.bluebrain.nexus.delta.kernel.Logger +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.kernel.utils.ClasspathResourceLoader import ch.epfl.bluebrain.nexus.testkit.CirceLiteral import org.scalatest.Assertion diff --git a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/HttpClient.scala b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/HttpClient.scala index 946b601d52..6463d26b00 100644 --- a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/HttpClient.scala +++ b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/HttpClient.scala @@ -14,6 +14,7 @@ import akka.stream.alpakka.sse.scaladsl.EventSource import akka.stream.scaladsl.Sink import cats.effect.IO import cats.effect.unsafe.implicits._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.kernel.utils.UrlUtils import ch.epfl.bluebrain.nexus.tests.HttpClient.{jsonHeaders, rdfApplicationSqlQuery, tokensMap} import ch.epfl.bluebrain.nexus.tests.Identity.Anonymous diff --git a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/RdfMediaTypes.scala b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/RdfMediaTypes.scala deleted file mode 100644 index 80d3e3c916..0000000000 --- a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/RdfMediaTypes.scala +++ /dev/null @@ -1,30 +0,0 @@ -package ch.epfl.bluebrain.nexus.tests - -import akka.http.scaladsl.model.HttpCharsets._ -import akka.http.scaladsl.model.MediaType - -/** - * Collection of media types specific to RDF. - */ -// $COVERAGE-OFF$ -object RdfMediaTypes { - final val `text/turtle`: MediaType.WithOpenCharset = MediaType.applicationWithOpenCharset("turtle", "ttl") - - final val `application/rdf+xml`: MediaType.WithOpenCharset = MediaType.applicationWithOpenCharset("rdf+xml", "rdf") - - final val `application/n-triples`: MediaType.WithFixedCharset = - MediaType.applicationWithFixedCharset("n-triples", `UTF-8`, "nt") - - final val `application/ld+json`: MediaType.WithFixedCharset = - MediaType.applicationWithFixedCharset("ld+json", `UTF-8`, "jsonld") - - final val `application/sparql-results+json`: MediaType.WithFixedCharset = - MediaType.applicationWithFixedCharset("sparql-results+json", `UTF-8`, "json") - - final val `application/sparql-query`: MediaType.WithFixedCharset = - MediaType.applicationWithFixedCharset("sparql-query", `UTF-8`) - - final val `application/vnd.graphviz`: MediaType.WithFixedCharset = - MediaType.textWithFixedCharset("vnd.graphviz", `UTF-8`, "dot") -} -// $COVERAGE-ON$ diff --git a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/admin/AdminDsl.scala b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/admin/AdminDsl.scala index 4cc2dabebf..7c7f139913 100644 --- a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/admin/AdminDsl.scala +++ b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/admin/AdminDsl.scala @@ -4,12 +4,13 @@ import akka.http.scaladsl.model.{StatusCode, StatusCodes} import cats.effect.IO import cats.effect.unsafe.implicits._ import ch.epfl.bluebrain.nexus.delta.kernel.Logger +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.kernel.utils.ClasspathResourceLoader import ch.epfl.bluebrain.nexus.testkit.Generators +import ch.epfl.bluebrain.nexus.tests.HttpClient import ch.epfl.bluebrain.nexus.tests.Identity.Authenticated import ch.epfl.bluebrain.nexus.tests.Optics._ import ch.epfl.bluebrain.nexus.tests.config.TestsConfig -import ch.epfl.bluebrain.nexus.tests.{CirceUnmarshalling, HttpClient} import io.circe.Json import io.circe.syntax.EncoderOps import org.scalatest.matchers.should.Matchers diff --git a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/iam/AclDsl.scala b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/iam/AclDsl.scala index 5c7d72003c..929c2f68e6 100644 --- a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/iam/AclDsl.scala +++ b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/iam/AclDsl.scala @@ -5,11 +5,12 @@ import cats.effect.IO import cats.effect.unsafe.implicits._ import cats.implicits._ import ch.epfl.bluebrain.nexus.delta.kernel.Logger +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.kernel.utils.ClasspathResourceLoader import ch.epfl.bluebrain.nexus.tests.Identity.Authenticated import ch.epfl.bluebrain.nexus.tests.Optics.error -import ch.epfl.bluebrain.nexus.tests.iam.types.{AclEntry, AclListing, Anonymous, Permission, User} -import ch.epfl.bluebrain.nexus.tests.{CirceUnmarshalling, HttpClient, Identity} +import ch.epfl.bluebrain.nexus.tests.iam.types._ +import ch.epfl.bluebrain.nexus.tests.{HttpClient, Identity} import io.circe.Json import org.scalatest.matchers.should.Matchers import org.scalatest.{Assertion, OptionValues} diff --git a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/iam/PermissionDsl.scala b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/iam/PermissionDsl.scala index a2575e91d5..8d9c2702c1 100644 --- a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/iam/PermissionDsl.scala +++ b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/iam/PermissionDsl.scala @@ -3,9 +3,10 @@ package ch.epfl.bluebrain.nexus.tests.iam import akka.http.scaladsl.model.StatusCodes import cats.effect.IO import cats.effect.unsafe.implicits._ +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.kernel.utils.ClasspathResourceLoader import ch.epfl.bluebrain.nexus.tests.iam.types.{Permission, Permissions} -import ch.epfl.bluebrain.nexus.tests.{CirceUnmarshalling, HttpClient, Identity} +import ch.epfl.bluebrain.nexus.tests.{HttpClient, Identity} import io.circe.Json import org.scalatest.Assertion import org.scalatest.matchers.should.Matchers diff --git a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/kg/ElasticSearchViewsDsl.scala b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/kg/ElasticSearchViewsDsl.scala index 1192d13cc2..90ab933b19 100644 --- a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/kg/ElasticSearchViewsDsl.scala +++ b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/kg/ElasticSearchViewsDsl.scala @@ -2,9 +2,10 @@ package ch.epfl.bluebrain.nexus.tests.kg import akka.http.scaladsl.model.StatusCodes import cats.effect.IO +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.kernel.utils.ClasspathResourceLoader import ch.epfl.bluebrain.nexus.testkit.CirceLiteral -import ch.epfl.bluebrain.nexus.tests.{CirceUnmarshalling, HttpClient, Identity} +import ch.epfl.bluebrain.nexus.tests.{HttpClient, Identity} import io.circe.Json import org.scalatest.Assertion import org.scalatest.matchers.should.Matchers diff --git a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/kg/files/StoragesDsl.scala b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/kg/files/StoragesDsl.scala index 13e724acf5..6655fc6321 100644 --- a/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/kg/files/StoragesDsl.scala +++ b/tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/kg/files/StoragesDsl.scala @@ -2,11 +2,12 @@ package ch.epfl.bluebrain.nexus.tests.kg.files import akka.http.scaladsl.model._ import cats.effect.IO +import ch.epfl.bluebrain.nexus.delta.kernel.circe.CirceUnmarshalling import ch.epfl.bluebrain.nexus.delta.kernel.utils.ClasspathResourceLoader import ch.epfl.bluebrain.nexus.testkit.CirceEq +import ch.epfl.bluebrain.nexus.tests.HttpClient import ch.epfl.bluebrain.nexus.tests.Identity.storages.Coyote import ch.epfl.bluebrain.nexus.tests.Optics.{filterKey, filterMetadataKeys} -import ch.epfl.bluebrain.nexus.tests.{CirceUnmarshalling, HttpClient} import io.circe.Json import org.scalatest._ import org.scalatest.matchers.should.Matchers