From 77c5d38381f43613c96f3527a9e3f4e334037af1 Mon Sep 17 00:00:00 2001 From: James Jeffrey Date: Thu, 6 Jul 2017 10:42:17 -0700 Subject: [PATCH] Update docs --- api/server/routes_create_update.go | 3 +++ docs/swagger.yml | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/api/server/routes_create_update.go b/api/server/routes_create_update.go index 08ea6641e..426cf3a5b 100644 --- a/api/server/routes_create_update.go +++ b/api/server/routes_create_update.go @@ -16,10 +16,13 @@ import ( /* 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. 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. 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... update only + Patch accepts partial updates / skips validation of zero values. */ func (s *Server) handleRouteCreateOrUpdate(c *gin.Context) { ctx := c.MustGet("ctx").(context.Context) diff --git a/docs/swagger.yml b/docs/swagger.yml index b13552ec4..9e914d53c 100644 --- a/docs/swagger.yml +++ b/docs/swagger.yml @@ -161,7 +161,7 @@ paths: /apps/{app}/routes: post: 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: - Routes parameters: @@ -221,7 +221,7 @@ paths: /apps/{app}/routes/{route}: 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 tags: - Routes @@ -256,7 +256,7 @@ paths: schema: $ref: '#/definitions/Error' 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 tags: - Routes