PathMustBeUnique doesn't consider the HTTP Method
Describe the bug #474 introduced a PathMustBeUnique validator, but it only check that a path is unique.
To Reproduce Steps to reproduce the current behavior: Have 2 endpoints with the same path but different method, e.g. GET /user and DELETE /user
Expected behavior It should check that a combination of HTTP method and path is unique.
Are you creating the GET and DELETE operations under two different path items? If you create both GET and DELETE under the same path Item there should not be any error. Can you show an example of an OpenAPI description that gives you an error.
@darrelmiller :
Created a small test to illustrate the problem.
The controller looked like this:
using Microsoft.AspNetCore.Mvc;
namespace OpenApi.IntegrationTest;
[Route("api/v2/someroute/areatype")]
public class TestController : ControllerBase
{
[HttpGet("{index}/{arg}")]
public ActionResult Get(long index, string arg)
{
return Ok("Get");
}
[HttpPut("{index}/{language}")]
public ActionResult Put(int index, string language, string text) {
return Ok("Update");
}
}