From 09c326e5f4e171a60b962865c744ab39c2ed5ce6 Mon Sep 17 00:00:00 2001 From: Daniel Kavan Date: Thu, 28 Apr 2022 14:32:02 +0200 Subject: [PATCH] #1693 PR review update 1 --- .../model/versionedModel/VersionList.scala | 18 ++++++++++++++++++ .../versionedModel/VersionedSummary.scala | 2 +- .../enceladus/rest_api/SpringFoxConfig.scala | 5 +++-- .../rest_api/services/DatasetService.scala | 2 +- 4 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 data-model/src/main/scala/za/co/absa/enceladus/model/versionedModel/VersionList.scala diff --git a/data-model/src/main/scala/za/co/absa/enceladus/model/versionedModel/VersionList.scala b/data-model/src/main/scala/za/co/absa/enceladus/model/versionedModel/VersionList.scala new file mode 100644 index 000000000..009a0bc5a --- /dev/null +++ b/data-model/src/main/scala/za/co/absa/enceladus/model/versionedModel/VersionList.scala @@ -0,0 +1,18 @@ +/* + * Copyright 2018 ABSA Group Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package za.co.absa.enceladus.model.versionedModel + +case class VersionList(_id: String, versions: Seq[Int]) diff --git a/data-model/src/main/scala/za/co/absa/enceladus/model/versionedModel/VersionedSummary.scala b/data-model/src/main/scala/za/co/absa/enceladus/model/versionedModel/VersionedSummary.scala index e9e931d59..d8ab45f16 100644 --- a/data-model/src/main/scala/za/co/absa/enceladus/model/versionedModel/VersionedSummary.scala +++ b/data-model/src/main/scala/za/co/absa/enceladus/model/versionedModel/VersionedSummary.scala @@ -17,4 +17,4 @@ package za.co.absa.enceladus.model.versionedModel case class VersionedSummary(_id: String, latestVersion: Int) -case class VersionList(_id: String, versions: Seq[Int]) + diff --git a/rest-api/src/main/scala/za/co/absa/enceladus/rest_api/SpringFoxConfig.scala b/rest-api/src/main/scala/za/co/absa/enceladus/rest_api/SpringFoxConfig.scala index b5980e65c..d57f4b30e 100644 --- a/rest-api/src/main/scala/za/co/absa/enceladus/rest_api/SpringFoxConfig.scala +++ b/rest-api/src/main/scala/za/co/absa/enceladus/rest_api/SpringFoxConfig.scala @@ -43,12 +43,13 @@ class SpringFoxConfig extends ProjectMetadata { // api v2 regex("/api/dataset.*"), regex("/api/schema.*"), regex("/api/mappingTable.*"), regex("/api/properties.*"), - regex("/api/monitoring.*"),regex("/api/runs.*"), + regex("/api/monitoring.*"), regex("/api/runs.*"), regex("/api/user.*"), regex("/api/spark.*"), regex("/api/configuration.*"), // api v3 - regex("/api-v3/datasets.*") + regex("/api-v3/datasets.*"), regex("/api-v3/schemas.*"), + regex("/api-v3/mapping-tables.*"), regex("/api-v3/property-definitions.*") ) diff --git a/rest-api/src/main/scala/za/co/absa/enceladus/rest_api/services/DatasetService.scala b/rest-api/src/main/scala/za/co/absa/enceladus/rest_api/services/DatasetService.scala index 1b930e111..c852eebfc 100644 --- a/rest-api/src/main/scala/za/co/absa/enceladus/rest_api/services/DatasetService.scala +++ b/rest-api/src/main/scala/za/co/absa/enceladus/rest_api/services/DatasetService.scala @@ -465,7 +465,7 @@ object DatasetService { * @param properties original properties * @return properties without empty-string value entries */ - def removeBlankProperties(properties: Map[String, String]): Map[String, String] = { + private def removeBlankProperties(properties: Map[String, String]): Map[String, String] = { properties.filter { case (_, propValue) => propValue.nonEmpty } }