From 05fc283d06d871843951c83fd42abc9a8cc2d352 Mon Sep 17 00:00:00 2001 From: Florian Eitel Date: Sun, 11 Aug 2019 21:55:53 +0200 Subject: [PATCH] Allow rollershutter to close to state `0` https://goswagger.io/use/models/schemas.html#nullability --- move.go | 2 +- swagger.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/move.go b/move.go index 3e8a55e..97c96c4 100644 --- a/move.go +++ b/move.go @@ -17,7 +17,7 @@ func Move(state *State, shutters []string, position int64) { m := &models.ModulePercentage{ Bridge: state.ModuleStatus[state.ModuleForName[x]].Bridge, ID: state.ModuleForName[x], - TargetPosition: position, + TargetPosition: swag.Int64(position), } updates = append(updates, m) } diff --git a/swagger.yaml b/swagger.yaml index ec5d3c3..08e5fd9 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -327,6 +327,7 @@ definitions: target_position: description: percentage open type: integer + x-nullable: true securityDefinitions: OAuth2: type: oauth2