Skip to content
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

Add ancestor endpoints and remove explicit parent context #15746

Merged
merged 23 commits into from Mar 25, 2024

Conversation

kjac
Copy link
Contributor

@kjac kjac commented Feb 21, 2024

Prerequisites

  • I have added steps to test this contribution in the description below

Description

We need to know about ancestors in the Management API - among other things because:

  • Deep linking to an item in a tree requires expanding the tree to said item location.
  • MNTP needs a parent context to handle dynamic root queries.

We already have a few explicit implementations of parent context, but it is not something we have added on a broad scale, so we have opted to remove them in favor of using the ancestor endpoints instead.

The client needs these endpoints to contain the queried item too (the "self"), so that's what they do. Eventually we may add a parameter to make this behavior configurable from the client perspective, but that's for another day.

Testing this PR

Create structures to match the new ancestor endpoints, and use Swagger to query ancestors through these structures. The result should contain the queried item but not the system root (-1).

…, scripts, static files, stylesheets and templates
# Conflicts:
#	src/Umbraco.Cms.Api.Management/Controllers/FolderManagementControllerBase.cs
#	src/Umbraco.Cms.Api.Management/OpenApi.json
# Conflicts:
#	src/Umbraco.Cms.Api.Management/OpenApi.json
# Conflicts:
#	src/Umbraco.Cms.Api.Management/Controllers/Tree/FolderTreeControllerBase.cs
# Conflicts:
#	src/Umbraco.Cms.Api.Management/Controllers/Tree/FolderTreeControllerBase.cs
# Conflicts:
#	src/Umbraco.Cms.Api.Management/Controllers/Dictionary/Tree/DictionaryTreeControllerBase.cs
@madsrasmussen
Copy link
Contributor

Client Part is ready to merge. Please merge this PR umbraco/Umbraco.CMS.Backoffice#1429 when this is merged.

Copy link
Contributor

@Migaroez Migaroez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good (except for the reworked test)
Tests show no issues.

@Migaroez Migaroez merged commit f6f868e into v14/dev Mar 25, 2024
15 checks passed
@Migaroez Migaroez deleted the v14/feature/ancestor-endpoints branch March 25, 2024 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants