feat(api): specify delete entity-template behavior and enforce relation-target validation#91
Open
walterspieler-dkt wants to merge 1 commit into
Conversation
… validation for relation targets
|
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this PR Provides
targetTemplateIdentifierby another template relation.EntityTemplateIsRelationTargetExceptionwith a clear validation message.template itself, in the same transactional flow.
DELETE /api/v1/entity-templates/{identifier}:ADR link:
Fixes
Review
The reviewer must double-check these points:
!after the type/scope to identify the breakingchange in the release note and ensure we will release a major version.
How to test
Please refer (copy/paste) the test section from the User Story. This should include
(example:
monitoring-service).(example from current test data:
microservice).DELETE /api/v1/entity-templates/monitoring-service.monitoring-serviceare removed (for example,by checking related entity retrieval endpoints or DB content).
DELETE /api/v1/entity-templates/microservice.relation-target usage.
DELETE /api/v1/entity-templates/<non-existent-id>.entities.
relation target in another template.
Breaking changes (if any)
DELETE /api/v1/entity-templates/{identifier}success status changed fromHTTP 204 to HTTP 200.
relation target for another template.
deleting the template.
Context of the Breaking Change
The delete-template endpoint behavior was made explicit and aligned with domain
integrity rules:
Result of the Breaking Change
adapt to HTTP 200.
and should resolve referencing relations before retrying deletion.