Skip to content

V14: Reintroduce umbraco api controller as obsolete#16263

Merged
bergmania merged 6 commits into
v14/devfrom
v14/feature/reintroduce-umbraco-api-controller
May 13, 2024
Merged

V14: Reintroduce umbraco api controller as obsolete#16263
bergmania merged 6 commits into
v14/devfrom
v14/feature/reintroduce-umbraco-api-controller

Conversation

@bergmania

Copy link
Copy Markdown
Member

Description

This PR Reintroduces the UmbracoApiController with a massive obsolete warning.

Test

  • The routing should still work
  • It is expected serialization is now using System.Text.Json with camel case etc.

@kjac kjac self-requested a review May 10, 2024 12:42
Comment thread src/Umbraco.Web.Common/Extensions/LinkGeneratorExtensions.cs Outdated
Comment thread src/Umbraco.Web.Common/Extensions/UrlHelperExtensions.cs Outdated
Comment thread src/Umbraco.Web.Common/Extensions/UrlHelperExtensions.cs
@kjac

kjac commented May 10, 2024

Copy link
Copy Markdown
Contributor

I've added a few comments for you to consider - feels like something was reverted that shouldn't have been.

I also added a few more obsoletion messages here and there 😄

The code tests out nicely 💪 this fine controller:

using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Web.Common.Controllers;

namespace Umbraco.Cms.Web.UI.Custom;

public class MyApiController : UmbracoApiController
{
    public IActionResult SayHello() => Ok("Hello!");
}

...is auto-routed as expected:

image

@bergmania

Copy link
Copy Markdown
Member Author

FrontEndRoutes still uses the stuff you obsoleted

@kjac

kjac commented May 12, 2024

Copy link
Copy Markdown
Contributor

Good catch 👍 I have obsoleted that constructor too.

…api-controller' into v14/feature/reintroduce-umbraco-api-controller
@bergmania bergmania merged commit 87c7347 into v14/dev May 13, 2024
@bergmania bergmania deleted the v14/feature/reintroduce-umbraco-api-controller branch May 13, 2024 06:28
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.

2 participants