Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST endpoints for related resources are ambiguous #326

Open
dvob opened this issue Jan 22, 2018 · 2 comments
Open

REST endpoints for related resources are ambiguous #326

dvob opened this issue Jan 22, 2018 · 2 comments
Labels

Comments

@dvob
Copy link
Contributor

dvob commented Jan 22, 2018

The REST endpoints to edit properties of resource relations are ambiguous. If you add the same resource to an application server twice its no longer possible to specify which resource relation you want to edit. This leads to a couple of strange behaviour on different REST endpoints:

  • GET /resources/{resourceGroupName}/{releaseName}/relations/{relatedResourceGroupName}/{relatedReleaseName}/properties: you see each property multiple times but its not clear to which resource relation they belong
  • GET /resources/{resourceGroupName}/{releaseName}/relations/{relatedResourceGroupName}/{relatedReleaseName}/properties/{propertyName}: returns randomly one value of all resource relations
  • PUT /resources/{resourceGroupName}/{releaseName}/relations/{relatedResourceGroupName}/{relatedReleaseName}/properties/{propertyName}: throws javax.persistence.NonUniqueResultException

Liima Version: 1.16.1
Steps to reproduce:

  1. create resource type myResource
  2. add a new resource type property myProperty
  3. create resource myResource1
  4. add myResource1 at least twice to an application server (Add Relation)

The resource should then be shown as myResource1 and myResource1 (myResource1_1) on the application server. Then you can perform the REST calls described above.

@dvob
Copy link
Contributor Author

dvob commented Jan 22, 2018

Another problem I just found in the web gui: If you remove the relation myResource1 from the application server all the other relations (myResource (myResource1_*)) are removed as well.

@yvespp yvespp added the bug label Mar 6, 2018
@yvespp yvespp added this to the Version 1.17.1 milestone Mar 6, 2018
@yvespp yvespp removed this from the Version 1.17.1 milestone May 25, 2018
@RetGal
Copy link
Contributor

RetGal commented Jul 4, 2018

@dsbrng25b Concerning the issue in the web gui: this has been fixed in 1.7.1.
To address the reported issues of the REST endpoints would require a change in the structure of the returned values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants