From 93b31b97188bbecaa5b5ab0da22147498f4be583 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Mon, 16 Mar 2020 11:48:44 +0100 Subject: [PATCH] keep references to Form parameters --- internal/config/service.go | 5 +++++ internal/config/types.go | 3 +++ 2 files changed, 8 insertions(+) diff --git a/internal/config/service.go b/internal/config/service.go index 18d9b62..7e1e6a9 100644 --- a/internal/config/service.go +++ b/internal/config/service.go @@ -129,6 +129,11 @@ func (svc *Service) checkAndFormatInput(types []datatype.T) error { } svc.Query[queryName] = param + } else { + if svc.Form == nil { + svc.Form = make(map[string]*Parameter) + } + svc.Form[paramName] = param } // use param name if no rename diff --git a/internal/config/types.go b/internal/config/types.go index 7ce33c1..25be16b 100644 --- a/internal/config/types.go +++ b/internal/config/types.go @@ -31,6 +31,9 @@ type Service struct { // references to Query parameters // format: 'GET@paranName' Query map[string]*Parameter + + // references for form parameters (all but Captures and Query) + Form map[string]*Parameter } // Parameter represents a parameter definition (from api.json)