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

V14: Reintroduce umbraco api controller as obsolete #16263

Merged
merged 6 commits into from
May 13, 2024

Conversation

bergmania
Copy link
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
Copy link
Contributor

kjac commented May 10, 2024

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
Member Author

FrontEndRoutes still uses the stuff you obsoleted

@kjac
Copy link
Contributor

kjac commented May 12, 2024

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
15 checks passed
@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