mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Update docs
This commit is contained in:
@@ -16,10 +16,13 @@ import (
|
|||||||
/* handleRouteCreateOrUpdate is used to handle POST PUT and PATCH for routes.
|
/* handleRouteCreateOrUpdate is used to handle POST PUT and PATCH for routes.
|
||||||
Post will only create route if its not there and create app if its not.
|
Post will only create route if its not there and create app if its not.
|
||||||
create only
|
create only
|
||||||
|
Post does not skip validation of zero values
|
||||||
Put will create app if its not there and if route is there update if not it will create new route.
|
Put will create app if its not there and if route is there update if not it will create new route.
|
||||||
update if exists or create if not exists
|
update if exists or create if not exists
|
||||||
|
Put does not skip validation of zero values
|
||||||
Patch will not create app if it does not exist since the route needs to exist as well...
|
Patch will not create app if it does not exist since the route needs to exist as well...
|
||||||
update only
|
update only
|
||||||
|
Patch accepts partial updates / skips validation of zero values.
|
||||||
*/
|
*/
|
||||||
func (s *Server) handleRouteCreateOrUpdate(c *gin.Context) {
|
func (s *Server) handleRouteCreateOrUpdate(c *gin.Context) {
|
||||||
ctx := c.MustGet("ctx").(context.Context)
|
ctx := c.MustGet("ctx").(context.Context)
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ paths:
|
|||||||
/apps/{app}/routes:
|
/apps/{app}/routes:
|
||||||
post:
|
post:
|
||||||
summary: Create new Route
|
summary: Create new Route
|
||||||
description: Create a new route in an app, if app doesn't exists, it creates the app
|
description: Create a new route in an app, if app doesn't exists, it creates the app. Post does not skip validation of zero values.
|
||||||
tags:
|
tags:
|
||||||
- Routes
|
- Routes
|
||||||
parameters:
|
parameters:
|
||||||
@@ -221,7 +221,7 @@ paths:
|
|||||||
|
|
||||||
/apps/{app}/routes/{route}:
|
/apps/{app}/routes/{route}:
|
||||||
put:
|
put:
|
||||||
summary: Create a Route if it does not exist. Update if it does. Will also create app if it does not exist.
|
summary: Create a Route if it does not exist. Update if it does. Will also create app if it does not exist. Put does not skip validation of zero values
|
||||||
description: Update or Create a route
|
description: Update or Create a route
|
||||||
tags:
|
tags:
|
||||||
- Routes
|
- Routes
|
||||||
@@ -256,7 +256,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/Error'
|
$ref: '#/definitions/Error'
|
||||||
patch:
|
patch:
|
||||||
summary: Update a Route, Fails if the route or app does not exist.
|
summary: Update a Route, Fails if the route or app does not exist. Accepts partial updates / skips validation of zero values.
|
||||||
description: Update a route
|
description: Update a route
|
||||||
tags:
|
tags:
|
||||||
- Routes
|
- Routes
|
||||||
|
|||||||
Reference in New Issue
Block a user