keep references to Form parameters

This commit is contained in:
Adrien Marquès 2020-03-16 11:48:44 +01:00
parent 12417f7f1c
commit 93b31b9718
Signed by: xdrm-brackets
GPG Key ID: D75243CA236D825E
2 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -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)