Skip to content

Commit

Permalink
fix: fixed a bug in the visitor logic
Browse files Browse the repository at this point in the history
  • Loading branch information
dangazineu committed Jan 20, 2025
1 parent 488fa5e commit 8794463
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generator/internal/api/visitors.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,11 @@ func (v CrossReferencingVisitor) Traverse(a *API) error {

func (v CrossReferencingVisitor) VisitMethod(m *Method) error {
var ok bool
m.InputType, ok = m.Parent.API.State.MessageByID[m.InputTypeID]
m.InputType, ok = v.API.State.MessageByID[m.InputTypeID]
if !ok {
return fmt.Errorf("unable to lookup input type %s", m.InputTypeID)
}
m.OutputType, ok = m.Parent.API.State.MessageByID[m.OutputTypeID]
m.OutputType, ok = v.API.State.MessageByID[m.OutputTypeID]
if !ok {
return fmt.Errorf("unable to lookup output type %s", m.OutputTypeID)
}
Expand Down

0 comments on commit 8794463

Please sign in to comment.