mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
api: remove app_name duplication of route related calls (#370)
This commit is contained in:
@@ -6,7 +6,7 @@ swagger: '2.0'
|
||||
info:
|
||||
title: IronFunctions
|
||||
description: The open source serverless platform.
|
||||
version: "0.1.21"
|
||||
version: "0.1.22"
|
||||
# the domain of the service
|
||||
host: "127.0.0.1:8080"
|
||||
# array of all schemes that your API supports
|
||||
@@ -319,10 +319,6 @@ definitions:
|
||||
allOf:
|
||||
- type: object
|
||||
properties:
|
||||
app_name:
|
||||
type: string
|
||||
description: "App this route belongs to."
|
||||
readOnly: true
|
||||
path:
|
||||
type: string
|
||||
description: URL path that will be matched to this route
|
||||
|
||||
@@ -112,12 +112,11 @@ func (p *publishcmd) route(path string, ff *funcfile) error {
|
||||
|
||||
body := functions.RouteWrapper{
|
||||
Route: functions.Route{
|
||||
Path: *ff.Route,
|
||||
Image: ff.FullName(),
|
||||
AppName: *ff.App,
|
||||
Memory: *ff.Memory,
|
||||
Type_: *ff.Type,
|
||||
Config: expandEnvConfig(ff.Config),
|
||||
Path: *ff.Route,
|
||||
Image: ff.FullName(),
|
||||
Memory: *ff.Memory,
|
||||
Type_: *ff.Type,
|
||||
Config: expandEnvConfig(ff.Config),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -283,7 +283,6 @@ func (a *routesCmd) create(c *cli.Context) error {
|
||||
|
||||
body := functions.RouteWrapper{
|
||||
Route: functions.Route{
|
||||
AppName: appName,
|
||||
Path: route,
|
||||
Image: image,
|
||||
Memory: c.Int64("memory"),
|
||||
@@ -367,7 +366,7 @@ func (a *routesCmd) configList(c *cli.Context) error {
|
||||
fmt.Print("export ", k, "=", v, "\n")
|
||||
}
|
||||
} else {
|
||||
fmt.Println(wrapper.Route.AppName, wrapper.Route.Path, "configuration:")
|
||||
fmt.Println(appName, wrapper.Route.Path, "configuration:")
|
||||
w := tabwriter.NewWriter(os.Stdout, 0, 8, 1, ' ', 0)
|
||||
for k, v := range config {
|
||||
fmt.Fprint(w, k, ":\t", v, "\n")
|
||||
@@ -413,7 +412,7 @@ func (a *routesCmd) configSet(c *cli.Context) error {
|
||||
return fmt.Errorf("error updating route configuration: %v", err)
|
||||
}
|
||||
|
||||
fmt.Println(wrapper.Route.AppName, wrapper.Route.Path, "updated", key, "with", value)
|
||||
fmt.Println(appName, wrapper.Route.Path, "updated", key, "with", value)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -456,6 +455,6 @@ func (a *routesCmd) configUnset(c *cli.Context) error {
|
||||
return fmt.Errorf("error updating route configuration: %v", err)
|
||||
}
|
||||
|
||||
fmt.Println(wrapper.Route.AppName, wrapper.Route.Path, "removed", key)
|
||||
fmt.Println(appName, wrapper.Route.Path, "removed", key)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user