Skip to content

Commit

Permalink
handle empty operation id
Browse files Browse the repository at this point in the history
  • Loading branch information
rucciva committed Jun 18, 2024
1 parent c5d6dae commit 7082415
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion internal/proxy/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ func (pe *ProxyExtension) compile() (err error) {
*op = *uop

op.Parameters = opParam
op.OperationId = opID
if opID != "" {
op.OperationId = opID
}
op.Security = opSecurity
for m := range orderedmap.Iterate(context.Background(), op.Extensions) {
opExt.Set(m.Key(), m.Value())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
{{range $paramIdx, $param := .PathParams}}
{{.GoVariableName}} := r.{{.GoName | ucFirst}}
{{- end}}
{{if .RequiresParamObject -}}
params := r.Params
{{end -}}

var err error
{{range $paramIdx, $param := .PathParams}}
Expand Down
2 changes: 0 additions & 2 deletions internal/proxy/testoutput/oapi-proxy.go

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

0 comments on commit 7082415

Please sign in to comment.