Skip to content
New issue

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

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

Already on GitHub? # to your account

Unable to update app name #380

Closed
3 tasks
denismakogon opened this issue Dec 1, 2016 · 0 comments
Closed
3 tasks

Unable to update app name #380

denismakogon opened this issue Dec 1, 2016 · 0 comments

Comments

@denismakogon
Copy link
Contributor

denismakogon commented Dec 1, 2016

Create an app with name testapp and then try to update it.

curl -X PUT -d '{"app": {"name": "newapp"}}' localhost:8080/v1/apps/testapp

As response i get:

{"message":"App successfully updated","app":{"name":"testapp","config":null}}

And when i’m trying to list apps i get:

{"message":"Successfully listed applications","apps":[{"name":"testapp","config":null}]}

It appears that app name is immutable. So in order to fix it, following changes required:

  • update docs to reflect immutability of an app name
  • at API level return HTTP 403 with error message saying that app name is immutable
  • update swagger doc to reflect real use case for HTTP PUT

In swagger there's an example:

{
  "app": {
    "name": "string",
    "config": {}
  }
}

But it doesn't have any effect, would be nice to have more useful example.

@ucirello ucirello added this to the Alpha 2 milestone Dec 1, 2016
ucirello added a commit that referenced this issue Dec 5, 2016
AppUpdate was initially conceived as an upsert endpoint for apps.
It turns out that it created an inconsistency regarding updates:
updates with names divergent with URL would not actually change
application's name.

This commit atempts to address the issue by returning an HTTP
error when trying to update an application name. In swagger.yml,
application names are already `readOnly:true`. Thus there is no
change from expected behavior.

Fixes #380
ucirello pushed a commit that referenced this issue Dec 7, 2016
* functions: application updates no longer accept name in the body

AppUpdate was initially conceived as an upsert endpoint for apps.
It turns out that it created an inconsistency regarding updates:
updates with names divergent with URL would not actually change
application's name.

This commit atempts to address the issue by returning an HTTP
error when trying to update an application name. In swagger.yml,
application names are already `readOnly:true`. Thus there is no
change from expected behavior.

Fixes #380

* functions: use specific error value for name change
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants