Skip to content

Commit

Permalink
support ignore field on root query struct
Browse files Browse the repository at this point in the history
  • Loading branch information
Misfits09 authored and schmurfy committed Jun 19, 2024
1 parent 7472649 commit 77e1d46
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion builder/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@ func (b *Builder) generateQueryParametersDoc(ctx context.Context, swagger *opena
if err != nil {
return err
}
parsedTag := schema.ParseJsonTag(field)

name := schema.ParseJsonTag(field).Name
if parsedTag.Ignored != nil && *parsedTag.Ignored {
continue
}

name := parsedTag.Name
if name == field.Name {
name = shared.ToSnakeCase(field.Name)
}
Expand Down

0 comments on commit 77e1d46

Please sign in to comment.