Open jafarre-bi opened 2 years ago
@jafarre-viewnext I can't fully understand the problem here, can you please give me a quick call and we clarify. Btw... are you planning to provide a fix for this?
I have edited the ticket to try to make it clearer. @stitakis we can talk about it any time, thank you.
As verified, the two related API have the same implementation:
/validate
https://github.com/opendevstack/ods-provisioning-app/blob/046c072bec44f961da0d52364309daa8def3deb0/src/main/java/org/opendevstack/provision/controller/ProjectApiController.java#L691
and /key/validate
Options:
/validate
as it might not be needed/key/validate
instead
Describe the bug When calling the API endpoint /project/validate?projectName=xxxx, the project is searched by key and not by name. The behaviour is exactly the same as that of the endpoint /project/key/validate?projectKey=xxxx
To Reproduce Please recall that this endpoint's functionality is checking whether the specified project name is available (no project exists with that name). In case the name is available, a 200 status code should be returned. In case a project with that name already exists, a 406 status code should be returned.
Steps to reproduce the behavior:
Expected behavior
Screenshots In the following example, TMEDP is the key of an existing project, but no project with name TMEDP exists.![image](https://user-images.githubusercontent.com/13270880/137491648-68d20377-0abe-4912-8a72-b9bb2519daae.png)
Affected version (please complete the following information):