Skip to content

Commit

Permalink
fix: escape path strings (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
byashimov authored May 23, 2024
1 parent 2be6c8d commit b982025
Show file tree
Hide file tree
Showing 36 changed files with 312 additions and 272 deletions.
7 changes: 6 additions & 1 deletion generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,12 @@ func exec() error {
continue
}

urlParams = append(urlParams, jen.Id(strcase.ToLowerCamel(s.CamelName)))
v := jen.Id(strcase.ToLowerCamel(s.CamelName))
if s.Type == SchemaTypeString {
v = jen.Id("url.PathEscape").Call(v)
}

urlParams = append(urlParams, v)
}

outObj := jen.Id("_")
Expand Down
25 changes: 13 additions & 12 deletions handler/account/account.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions handler/accountauthentication/accountauthentication.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions handler/accountteam/accountteam.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions handler/accountteammember/accountteammember.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions handler/applicationuser/applicationuser.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b982025

Please sign in to comment.