OAS: Some minor fixes (#762)

* Commit some fixes

* Accept expected

Co-authored-by: Igor Gov <iggvrv@gmail.com>
This commit is contained in:
Andrey Pokhilko
2022-02-07 10:12:05 +03:00
committed by GitHub
parent ea678a4d8c
commit 0f77cf8ef9
7 changed files with 120 additions and 72 deletions

View File

@@ -115,10 +115,10 @@ type nvParams struct {
GeneralizeName func(name string) string
}
func handleNameVals(gw nvParams, params **openapi.ParameterList) {
func handleNameVals(gw nvParams, params **openapi.ParameterList, checkIgnore bool) {
visited := map[string]*openapi.ParameterObj{}
for _, pair := range gw.Pairs {
if gw.IsIgnored(pair.Name) {
if (checkIgnore && gw.IsIgnored(pair.Name)) || pair.Name == "" {
continue
}