-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/1693 api v3 delete recreate #2055
Merged
Merged
Changes from 83 commits
Commits
Show all changes
90 commits
Select commit
Hold shift + click to select a range
f1798b2
#1693 API v3: VersionedModel v3 init - VersionedModelControllerV3 bas…
dk1844 0f62851
#1693 API v3: some basic VersionedModelControllerV3 integration test
dk1844 c01cfda
#1693 API v3: VersionedModelControllerV3 integration test cont'd - te…
dk1844 4fd08e2
#1693 API v3: VersionedModelControllerV3 - post to yield location hea…
dk1844 5c8e005
#1693 API v3: VersionedModelControllerV3 - put to yield no content ->…
dk1844 458bfed
#1693 API v3: VersionedModelControllerV3 - IT for /ds/export (latest …
dk1844 a7a6cf9
#1693 API v3: VersionedModelControllerV3 - location header for put/po…
dk1844 af489b1
#1693 API v3: VersionedModelControllerV3 - location header for post-i…
dk1844 21f8008
#1693 API v3: VersionedModelControllerV3 -IT for GET datasets/{name},…
dk1844 6f63117
#1693 API v3: VersionedModelControllerV3 - IT for GET datasets/{name}…
dk1844 76e87ce
#1693 API v3: VersionedModelControllerV3 - GET /datasets/{name}/{vers…
dk1844 d62cd90
#1693 API v3: VersionedModelControllerV3 - common implementation of /…
dk1844 fc4c359
#1693 API v3: VersionedModelControllerV3 - /{name}/{version}/used-in …
dk1844 e6c8d8c
#1693 API v3: VersionedModelControllerV3 - GET/PUT /{name}/{version}/…
dk1844 3566df5
#1693 API v3: VersionedModelControllerV3 - GET/PUT /{name}/{version}/…
dk1844 219360a
#1693 Fix: (v2) VersionedModelController.getLatestVersionNumber(): Fu…
dk1844 112ac1e
#1693 VersionedModelControllerV3: `/{name}/{version}/validation` impl…
dk1844 101b37a
#1693 VersionedModelControllerV3 - IT extended for `POST /{name}/{ver…
dk1844 b934958
#1693 VersionedModelControllerV3 - conformance rule mgmt GET+POST dat…
dk1844 51ad013
#1693 PR review update - typos etc
dk1844 ba5edce
#1693 Validation-warnings as payload to caller in V3
dk1844 662119b
#1693 Validation-warnings as payload to caller in V3 - IT covered
dk1844 b0fd955
#1693 API v3 impl for MTs, no tests yet
dk1844 d480445
#1693 import validation check added to IT.
dk1844 bffbf55
Merge branch 'feature/1693-api-v3-versioned-model' into feature/1693-…
dk1844 3542a43
Merge branch 'develop-ver-3.0' into feature/1693-api-v3-versioned-model
dk1844 51d68a8
Merge branch 'feature/1693-api-v3-versioned-model' into feature/1693-…
dk1844 e1c904e
#1693 api-v3 mapping table specific - IntegTest for GET/POST/PUT .../…
dk1844 489ae12
#1693 api-v3 mapping table specific - MT now validates if schema exis…
dk1844 d6ef401
#1693 schema validation for DSs + IntegTest update
dk1844 a75ab85
#1693 Mt existence check for DS rules + reflecting in integTest
dk1844 6a16696
Merge branch 'feature/1693-api-v3-versioned-model' into feature/1693-…
dk1844 65b9f21
#1693 Mt existence check for DS rules + reflecting in integTest 2
dk1844 4426ff7
#1693 schema controller v3 - todo IT (original IT v2 works)
dk1844 fe6246c
#1693 schema controller v3 - partial IT - POST, .../json, .../origina…
dk1844 9241eb1
Merge branch 'develop-ver-3.0' into feature/1693-api-v3-versioned-model
dk1844 373bf1d
#1693 PropertyDefinitionControllerV3 - impl + IT for create;
dk1844 73bb8fd
#1693 admin rights required in VersionedModelControllerV3 -> reflecte…
dk1844 a2c5f40
#1693 admin rights required in VersionedModelControllerV3 -> ITs with…
dk1844 4d9f623
#1693 schema api v3: GET ... /json 400 with validation errors on empt…
dk1844 f410702
#1693 dataset v2 delete IT asserted to make sure there are regression…
dk1844 27b2e62
#1693 VersionedModelControllerV3 disable (DELETE .../{name}) + enable…
dk1844 1787692
#1693 Dataset V3 API enable/disable ITs + impl fix
dk1844 e4559b1
#1693 Schema V3 API enable/disable simple cases - no usedIn checks, yet
dk1844 cdbe7ae
#1693 VersionedModelControllerV3 - 2 levels of .../used-in exist ( /{…
dk1844 be02b5d
#1693 usedIn + delete for propertyDefinitions ref'd in Datasets + ITs…
dk1844 09c326e
#1693 PR review update 1
dk1844 5df526d
Merge branch 'feature/1693-api-v3-versioned-model' into feature/1693-…
dk1844 fd87e11
Merge branch 'feature/1693-api-v3-schema-etc' into feature/1693-api-v…
dk1844 8baf2d3
#1693 PR review update: SchemaService(V3) update/create behavior is e…
dk1844 0677bef
Merge branch 'feature/1693-api-v3-schema-etc' into feature/1693-api-v…
dk1844 a474054
#1693 cleanup
dk1844 c50a024
#1693 MT in MCR check - usedIn fix (originally from JS). IT test-case…
dk1844 32e48d0
#1693 UsedIn - empty/nonEmpty normalization + UnitTest. V2 alternated…
dk1844 1c241d1
#1693 DatasetService.updateProperties[V3] -> split between DatasetSer…
dk1844 bf15425
Merge branch 'feature/1693-api-v3-versioned-model' into feature/1693-…
dk1844 06e5c5f
Merge branch 'feature/1693-api-v3-schema-etc' into feature/1693-api-v…
dk1844 7fe2a93
#1693 PR review update: VersionedModelControllerV3 - GET /{name}/expo…
dk1844 56a9f0c
#1693 VersionedMongoRepository - unused method `getAllVersionsValues`…
dk1844 a4aac70
#1693 for V3 API: VersionedSummary -> NamedLatestVersion: impl + IT
dk1844 5d24819
#1693 PR review update: VersionedModelControllerV3 - GET /{name}/expo…
dk1844 7040694
#1693 VersionedMongoRepository - unused method `getAllVersionsValues`…
dk1844 e0fda73
#1693 for V3 API: VersionedSummary -> NamedLatestVersion: impl + IT
dk1844 2bfd751
Merge branch 'feature/1693-api-v3-versioned-model' into feature/1693-…
dk1844 a401024
Merge branch 'feature/1693-api-v3-schema-etc' into feature/1693-api-v…
dk1844 1da8e8c
#1693 PR review updates: renamings, comments, removed unused, formatt…
dk1844 7ae4acb
Merge branch 'feature/1693-api-v3-schema-etc' into feature/1693-api-v…
dk1844 9c3f663
#1693 PR review updates: `@PreAuthorize("@authConstants.hasAdminRole(…
dk1844 c72e559
Merge branch 'feature/1693-api-v3-schema-etc' into feature/1693-api-v…
dk1844 99ee67b
#1693 mergefix: admin-auth for PropDefs only.
dk1844 a80d9ac
#1693 Swagger differs in paths based on `spring.profiles.active` bein…
dk1844 f851bce
Merge branch 'feature/1693-api-v3-versioned-model' into feature/1693-…
dk1844 9679d56
Merge branch 'feature/1693-api-v3-schema-etc' into feature/1693-api-v…
dk1844 562da60
#1693 Swagger API: dev-profile: full v2+v3 API, non-dev: full v3 API
dk1844 fb0dd93
Merge branch 'feature/1693-api-v3-versioned-model' into feature/1693-…
dk1844 1a9c18b
Merge branch 'feature/1693-api-v3-schema-etc' into feature/1693-api-v…
dk1844 eac77dd
#1693 unused import cleanup
dk1844 db1227b
#1693 `NamedLatestVersion` generalized into a multipurpose `NamedVers…
dk1844 56ba9ed
#1693 PRReview `/{name}/{version}/defaults` processing generalization…
dk1844 28c7334
Merge branch 'feature/1693-api-v3-schema-etc' into feature/1693-api-v…
dk1844 619da37
Merge branch 'develop-ver-3.0' into feature/1693-api-v3-schema-etc
dk1844 67f163e
Merge branch 'feature/1693-api-v3-schema-etc' into feature/1693-api-v…
dk1844 9769f8d
Merge branch 'develop-ver-3.0' into feature/1693-api-v3-delete-recreate
dk1844 0ff6851
#1692 Review update: API v3 summary (NamedVersion) now contains `disa…
dk1844 4574b09
#1692 Review update: UsedIn.{isEmpty|nonEmpty} omitted from serializa…
dk1844 982e813
Merge branch 'develop-ver-3.0' into feature/1693-api-v3-delete-recreate
dk1844 006feb0
#1693 VersionedSummaryV2 Bson support fix
dk1844 2905892
#1693 VersionedSummaryV2 support fix - tests & impl
dk1844 e593df1
#1693 disable fail due to nonEmpty used in now carries a wrapper with…
dk1844 34292c4
#1693 `Future {throw x}` replaced with `Future.failed(x)` in rest_api…
dk1844 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
data-model/src/test/scala/za/co/absa/enceladus/model/UsedInTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
* 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 | ||
|
||
import org.scalatest.flatspec.AnyFlatSpec | ||
import org.scalatest.matchers.should.Matchers | ||
import za.co.absa.enceladus.model.menas.MenasReference | ||
|
||
class UsedInTest extends AnyFlatSpec with Matchers { | ||
|
||
private val exampleRef = MenasReference(Some("collection1"), "entity1", 1) | ||
|
||
"UsedIn" should "correctly evaluate .nonEmpty" in { | ||
UsedIn(Some(Seq(exampleRef)), Some(Seq(exampleRef))).nonEmpty shouldBe true | ||
UsedIn(Some(Seq(exampleRef)), Some(Seq.empty)).nonEmpty shouldBe true | ||
UsedIn(Some(Seq(exampleRef)), None).nonEmpty shouldBe true | ||
|
||
UsedIn(Some(Seq.empty), Some(Seq(exampleRef))).nonEmpty shouldBe true | ||
UsedIn(None, Some(Seq(exampleRef))).nonEmpty shouldBe true | ||
|
||
UsedIn(Some(Seq.empty), Some(Seq.empty)).nonEmpty shouldBe false | ||
UsedIn(None, Some(Seq.empty)).nonEmpty shouldBe false | ||
UsedIn(Some(Seq.empty), None).nonEmpty shouldBe false | ||
UsedIn(None, None).nonEmpty shouldBe false | ||
} | ||
|
||
it should "correctly evaluate .empty" in { | ||
UsedIn(Some(Seq(exampleRef)), Some(Seq(exampleRef))).isEmpty shouldBe false | ||
UsedIn(Some(Seq(exampleRef)), Some(Seq.empty)).isEmpty shouldBe false | ||
UsedIn(Some(Seq(exampleRef)), None).isEmpty shouldBe false | ||
|
||
UsedIn(Some(Seq.empty), Some(Seq(exampleRef))).isEmpty shouldBe false | ||
UsedIn(None, Some(Seq(exampleRef))).isEmpty shouldBe false | ||
|
||
UsedIn(Some(Seq.empty), Some(Seq.empty)).isEmpty shouldBe true | ||
UsedIn(None, Some(Seq.empty)).isEmpty shouldBe true | ||
UsedIn(Some(Seq.empty), None).isEmpty shouldBe true | ||
UsedIn(None, None).isEmpty shouldBe true | ||
} | ||
|
||
it should "normalize" in { | ||
UsedIn(Some(Seq(exampleRef)), Some(Seq(exampleRef))).normalized shouldBe UsedIn(Some(Seq(exampleRef)), Some(Seq(exampleRef))) | ||
|
||
UsedIn(Some(Seq(exampleRef)), Some(Seq.empty)).normalized shouldBe UsedIn(Some(Seq(exampleRef)), None) | ||
UsedIn(Some(Seq(exampleRef)), None).normalized shouldBe UsedIn(Some(Seq(exampleRef)), None) | ||
|
||
UsedIn(Some(Seq.empty), Some(Seq(exampleRef))).normalized shouldBe UsedIn(None, Some(Seq(exampleRef))) | ||
UsedIn(None, Some(Seq(exampleRef))).normalized shouldBe UsedIn(None, Some(Seq(exampleRef))) | ||
|
||
UsedIn(Some(Seq.empty), Some(Seq.empty)).normalized shouldBe UsedIn(None, None) | ||
UsedIn(None, None).normalized shouldBe UsedIn(None, None) | ||
|
||
|
||
|
||
|
||
} | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...i/src/main/scala/za/co/absa/enceladus/rest_api/exceptions/EndpointDisabledException.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* 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.rest_api.exceptions | ||
|
||
// todo, there is no usage, remove? | ||
case class EndpointDisabledException(message:String = "", cause: Throwable = None.orNull) extends Exception(message, cause) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to assess correctness of the rewrite, the unit test for nonEmpty was written first and the implementation was changed after that.