diff --git a/api/models/route.go b/api/models/route.go index 42b4a9289..e216dbf21 100644 --- a/api/models/route.go +++ b/api/models/route.go @@ -25,7 +25,7 @@ var ( type Routes []*Route type Route struct { - AppName string `json:"appname,omitempty"` + AppName string `json:"app_name,omitempty"` Path string `json:"path,omitempty"` Image string `json:"image,omitempty"` Memory uint64 `json:"memory,omitempty"` diff --git a/docs/docker-swarm/swarm.md b/docs/docker-swarm/swarm.md index 1823e0ec7..aa938f2c1 100644 --- a/docs/docker-swarm/swarm.md +++ b/docs/docker-swarm/swarm.md @@ -46,7 +46,7 @@ $ curl -H "Content-Type: application/json" -X POST -d '{ "app": { "name":"myapp" {"message":"App successfully created","app":{"name":"myapp","config":null}} $ curl -H "Content-Type: application/json" -X POST -d '{ "route": { "type": "sync", "path":"/hello-sync", "image":"iron/hello" } }' http://$IRON_FUNCTION/v1/apps/myapp/routes -{"message":"Route successfully created","route":{"appname":"myapp","path":"/hello-sync","image":"iron/hello","memory":128,"type":"sync","config":null}} +{"message":"Route successfully created","route":{"app_name":"myapp","path":"/hello-sync","image":"iron/hello","memory":128,"type":"sync","config":null}} $ curl -H "Content-Type: application/json" -X POST -d '{ "name":"Johnny" }' http://$IRON_FUNCTION/r/myapp/hello-sync Hello Johnny! @@ -126,7 +126,7 @@ $ curl -H "Content-Type: application/json" -X POST -d '{ "app": { "name":"myapp" {"message":"App successfully created","app":{"name":"myapp","config":null}} $ curl -H "Content-Type: application/json" -X POST -d '{ "route": { "type": "sync", "path":"/hello-sync", "image":"iron/hello" } }' http://$IRON_FUNCTION/v1/apps/myapp/routes -{"message":"Route successfully created","route":{"appname":"myapp","path":"/hello-sync","image":"iron/hello","memory":128,"type":"sync","config":null}} +{"message":"Route successfully created","route":{"app_name":"myapp","path":"/hello-sync","image":"iron/hello","memory":128,"type":"sync","config":null}} $ curl -H "Content-Type: application/json" -X POST -d '{ "name":"Johnny" }' http://$IRON_FUNCTION/r/myapp/hello-sync Hello Johnny! diff --git a/docs/kubernetes/kubernetes.md b/docs/kubernetes/kubernetes.md index 637da105a..ea933971c 100644 --- a/docs/kubernetes/kubernetes.md +++ b/docs/kubernetes/kubernetes.md @@ -50,7 +50,7 @@ $ curl -H "Content-Type: application/json" -X POST -d '{ "app": { "name":"myapp" {"message":"App successfully created","app":{"name":"myapp","config":null}} $ curl -H "Content-Type: application/json" -X POST -d '{ "route": { "type": "sync", "path":"/hello-sync", "image":"iron/hello" } }' http://$IRON_FUNCTION/v1/apps/myapp/routes -{"message":"Route successfully created","route":{"appname":"myapp","path":"/hello-sync","image":"iron/hello","memory":128,"type":"sync","config":null}} +{"message":"Route successfully created","route":{"app_name":"myapp","path":"/hello-sync","image":"iron/hello","memory":128,"type":"sync","config":null}} $ curl -H "Content-Type: application/json" -X POST -d '{ "name":"Johnny" }' http://$IRON_FUNCTION/r/myapp/hello-sync Hello Johnny! @@ -103,7 +103,7 @@ $ curl -H "Content-Type: application/json" -X POST -d '{ "app": { "name":"myapp" {"message":"App successfully created","app":{"name":"myapp","config":null}} $ curl -H "Content-Type: application/json" -X POST -d '{ "route": { "type": "sync", "path":"/hello-sync", "image":"iron/hello" } }' http://$IRON_FUNCTION/v1/apps/myapp/routes -{"message":"Route successfully created","route":{"appname":"myapp","path":"/hello-sync","image":"iron/hello","memory":128,"type":"sync","config":null}} +{"message":"Route successfully created","route":{"app_name":"myapp","path":"/hello-sync","image":"iron/hello","memory":128,"type":"sync","config":null}} $ curl -H "Content-Type: application/json" -X POST -d '{ "name":"Johnny" }' http://$IRON_FUNCTION/r/myapp/hello-sync Hello Johnny! diff --git a/docs/swagger.yml b/docs/swagger.yml index 50a970f99..89b1046e7 100644 --- a/docs/swagger.yml +++ b/docs/swagger.yml @@ -5,8 +5,8 @@ swagger: '2.0' info: title: IronFunctions - description: - version: "0.0.14" + description: The open source serverless platform. + version: "0.1.0" # the domain of the service host: "127.0.0.1:8080" # array of all schemes that your API supports @@ -313,9 +313,6 @@ definitions: type: array items: $ref: '#/definitions/Route' - cursor: - type: string - description: Used to paginate results. If this is returned, pass it into the same query again to get more results. error: $ref: '#/definitions/ErrorBody' @@ -423,7 +420,6 @@ definitions: type: object required: - image - - priority properties: image: type: string diff --git a/triggers/openstack-ceilometer/README.md b/triggers/openstack-ceilometer/README.md index aa43f36df..9356a1241 100644 --- a/triggers/openstack-ceilometer/README.md +++ b/triggers/openstack-ceilometer/README.md @@ -51,7 +51,7 @@ $ vagrant ssh $ curl -H "Content-Type: application/json" -X POST -d '{"app": { "name":"myapp" }}' http://localhost:8080/v1/apps {"message":"App successfully created","app":{"name":"myapp","config":null}} $ curl -H "Content-Type: application/json" -X POST -d '{"route": {"path":"/hello","image":"iron/hello"}}' http://localhost:8080/v1/apps/myapp/routes -{"message":"Route successfully created","route":{"appname":"myapp","path":"/hello","image":"iron/hello","memory":128,"type":"sync","config":null}} +{"message":"Route successfully created","route":{"app_name":"myapp","path":"/hello","image":"iron/hello","memory":128,"type":"sync","config":null}} ``` ## Start a Nova compute instance inside OpenStack