Skip to content

Add ancestor endpoints and remove explicit parent context#15746

Merged
Migaroez merged 23 commits intov14/devfrom
v14/feature/ancestor-endpoints
Mar 25, 2024
Merged

Add ancestor endpoints and remove explicit parent context#15746
Migaroez merged 23 commits intov14/devfrom
v14/feature/ancestor-endpoints

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).

kjac added 22 commits February 21, 2024 13:53
…, 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
@kjac kjac marked this pull request as ready for review March 20, 2024 14:08
@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
@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.

4 participants