Skip to content

Commit

Permalink
V14: OpenAPI: Explicitly set ByRelationTypeKey endpoint name (#16729)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
leekelleher authored Jul 3, 2024
1 parent 32fe23b commit 0a9df3c
Show file tree
Hide file tree
Showing 2 changed files with 388 additions and 388 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
Expand Down Expand Up @@ -29,7 +29,7 @@ public ByRelationTypeKeyRelationController(IRelationService relationService, IRe
/// <remarks>
/// Use case: On a relation type page you can see all created relations of this type.
/// </remarks>
[HttpGet("type/{id:guid}")]
[HttpGet("type/{id:guid}", Name = "GetRelationByRelationTypeId")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<RelationResponseModel>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(PagedViewModel<ProblemDetails>), StatusCodes.Status404NotFound)]
Expand Down
Loading

0 comments on commit 0a9df3c

Please sign in to comment.