mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* 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
35 lines
839 B
Markdown
35 lines
839 B
Markdown
# Applications
|
|
|
|
Applications are the top level object that groups routes together to create an API.
|
|
|
|
## App level configuration
|
|
|
|
When creating or updating an app, you can pass in a map of config variables.
|
|
|
|
`config` is a map of values passed to the route runtime in the form of
|
|
environment variables.
|
|
|
|
Note: Route level configuration overrides app level configuration.
|
|
|
|
```sh
|
|
fn apps create --config k1=v1 --config k2=v2 myapp
|
|
```
|
|
|
|
Or using a cURL:
|
|
|
|
```sh
|
|
curl -H "Content-Type: application/json" -X POST -d '{
|
|
"app": {
|
|
"name":"myapp-curl",
|
|
"config": {
|
|
"k1": "v1",
|
|
"k2": "v2"
|
|
}
|
|
}
|
|
}' http://localhost:8080/v1/apps
|
|
```
|
|
|
|
## Notes
|
|
|
|
App names are immutable. When doing `PUT` calls, keep in mind that although you
|
|
are able to update an app's configuration set, you cannot really rename it. |