Skip to content

Commit

Permalink
Adjust angular generator to always add false boolean HTTP GET paramet…
Browse files Browse the repository at this point in the history
…ers (#889)
  • Loading branch information
ftkg committed Jul 25, 2022
1 parent 6914b7b commit aa86ffe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion console/openapi-gen-angular/main.go
Expand Up @@ -154,7 +154,7 @@ export class {{(index .Tags 0).Name}}Service {
let params = new HttpParams();
{{- range $argument := $operation.Parameters -}}
{{if eq $argument.In "query"}}
if ({{$argument.Name}}) {
if ({{$argument.Name}}{{if eq $argument.Type "boolean"}} || {{$argument.Name}} === false{{end}}) {
{{if eq $argument.Type "array" -}}
{{$argument.Name}}.forEach(e => params = params.append('{{$argument.Name}}', String(e)))
{{- else -}}
Expand Down

0 comments on commit aa86ffe

Please sign in to comment.