Skip to content

Commit 782c009

Browse files
authored
Improvements to the OpenAPI Docs (#14754)
* Ensure APIS only can produce one response type * Ensure APIs document Unauthorized and Forbidden results * If a controller constructor injects IAuthorizationService we assume the actions can return forbidden * Updated OpenApi.json * OpenApi.json * Update OpenApi.json * Update OpenApi.json
1 parent 8574759 commit 782c009

File tree

3 files changed

+2491
-10885
lines changed

3 files changed

+2491
-10885
lines changed

src/Umbraco.Cms.Api.Management/Controllers/ManagementApiControllerBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ namespace Umbraco.Cms.Api.Management.Controllers;
2222
[MapToApi(ManagementApiConfiguration.ApiName)]
2323
[JsonOptionsName(Constants.JsonOptionsNames.BackOffice)]
2424
[AppendEventMessages]
25+
[Produces("application/json")]
2526
public abstract class ManagementApiControllerBase : Controller, IUmbracoFeature
2627
{
2728
protected IActionResult CreatedAtId<T>(Expression<Func<T, string>> action, Guid id)

0 commit comments

Comments
 (0)