Skip to content

Commit 0a9df3c

Browse files
authored
V14: OpenAPI: Explicitly set ByRelationTypeKey endpoint name (#16729)
This is because of an `operationId` name clash with `ByKeyRelationTypeController.ByKey`, ref: https://github.com/umbraco/Umbraco-CMS/blob/release-14.0.0/src/Umbraco.Cms.Api.Management/Controllers/RelationType/ByKeyRelationTypeController.cs#L27 This change attempts to ensure a unique `operationId` in the OpenAPI/Swagger JSON.
1 parent 32fe23b commit 0a9df3c

File tree

2 files changed

+388
-388
lines changed

2 files changed

+388
-388
lines changed

src/Umbraco.Cms.Api.Management/Controllers/Relation/ByRelationTypeKeyRelationController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Asp.Versioning;
1+
using Asp.Versioning;
22
using Microsoft.AspNetCore.Http;
33
using Microsoft.AspNetCore.Mvc;
44
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
@@ -29,7 +29,7 @@ public ByRelationTypeKeyRelationController(IRelationService relationService, IRe
2929
/// <remarks>
3030
/// Use case: On a relation type page you can see all created relations of this type.
3131
/// </remarks>
32-
[HttpGet("type/{id:guid}")]
32+
[HttpGet("type/{id:guid}", Name = "GetRelationByRelationTypeId")]
3333
[MapToApiVersion("1.0")]
3434
[ProducesResponseType(typeof(PagedViewModel<RelationResponseModel>), StatusCodes.Status200OK)]
3535
[ProducesResponseType(typeof(PagedViewModel<ProblemDetails>), StatusCodes.Status404NotFound)]

0 commit comments

Comments
 (0)