mirror of
https://github.com/Fishwaldo/huma.git
synced 2025-03-15 19:31:27 +00:00
fix: include tags in rendered OpenAPI
This commit is contained in:
parent
8ae23b5a44
commit
127d4d748c
1 changed files with 7 additions and 1 deletions
|
@ -30,7 +30,13 @@ func (r *Resource) toOpenAPI() *gabs.Container {
|
|||
}
|
||||
|
||||
for _, op := range r.operations {
|
||||
doc.Set(op.toOpenAPI(), r.path, strings.ToLower(op.method))
|
||||
opValue := op.toOpenAPI()
|
||||
|
||||
if len(r.tags) > 0 {
|
||||
opValue.Set(r.tags, "tags")
|
||||
}
|
||||
|
||||
doc.Set(opValue, r.path, strings.ToLower(op.method))
|
||||
}
|
||||
|
||||
return doc
|
||||
|
|
Loading…
Add table
Reference in a new issue