Try our conversational search powered by Generative AI!

Feature request for custom content delivery api endpoints?

Vote:
 

Where do one put in a feature request for custom content delivery api endpoints for CMS 12+?

namespace EPiServer.ContentApi.ApiConventions.Internal
{
  [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
  internal class ContentApiControllerAttribute : Attribute
  {
  }
}

This attribute - can you make it public so you can create custom content delivery api endpoints easy?

As far as I understand this activates filters and convetions so the json is formatted correctly.

Then you use the ObjectResultWithHeaders action result to with [Produces] attribute to format the end result.

[ApiController]
[Route("api/[controller]/[action]")]
[ResponseCache(Location = ResponseCacheLocation.None, NoStore = true)]
[Produces("application/json")]
public abstract class BaseJsonApiController : ControllerBase
{
	protected IActionResult ToObjectResult<T>(T? value, int statusCode = 200, Dictionary<string, string>? headers = null)
		where T : class =>
		new ObjectResultWithHeaders<T>(value!, statusCode, headers ?? new Dictionary<string, string>());
}

---------------------------------------

And a final question:

What is the point of [JsonFormatter] attriubte and JsonFormattedResult if EPi it self doesn't use it for this type of conversions?

#311112
Edited, Oct 19, 2023 5:48
Vote:
 

Hi Carl, Optimizely have a feedback forum at https://feedback.optimizely.com/ where you can post both feature requests and general ideas.

#311571
Oct 27, 2023 11:51
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.