Summary
lowerWebhooks names its group ir.Naming{Source: "webhooks"} (compilers/openapi/operations.go:155). Two things are wrong with that value, and they are separable.
-
The name is invented, not declared. No OpenAPI document contains a group called "webhooks"; the compiler synthesizes the group to hold webhook operations. Naming.Source is the spelling the source used, so recording an invented name there tells an emitter the API author chose it. The sibling case gets this right: operations with no tags land in a group named ir.Naming{Hint: "default"} (operations.go:173), a hint precisely because the compiler chose it.
-
Canonical is empty beside a non-empty Source. An emitter reading this Naming finds no word sequence and has to segment "webhooks" itself, which is the casing decision invariant 4 exists to keep out of emitters. irverify allows an empty canonical because a Naming may legitimately carry only a Hint, so nothing reports it.
Evidence
testdata/conformance/openapi/webhooks.golden.json:17 shows the group shipping with a source name and no canonical:
"name": {
"source": "webhooks"
}
The architecture sweep added in #183 does not catch this: it asserts that a Canonical is filled by the framework, not that a Source comes with one.
Expected
Decide which of the two the group is — a hint, like the default group, or a name with the canonical words beside it — and apply it. Either way the webhooks golden moves, so it wants its own change rather than riding along with an unrelated one.
Summary
lowerWebhooksnames its groupir.Naming{Source: "webhooks"}(compilers/openapi/operations.go:155). Two things are wrong with that value, and they are separable.The name is invented, not declared. No OpenAPI document contains a group called "webhooks"; the compiler synthesizes the group to hold webhook operations.
Naming.Sourceis the spelling the source used, so recording an invented name there tells an emitter the API author chose it. The sibling case gets this right: operations with no tags land in a group namedir.Naming{Hint: "default"}(operations.go:173), a hint precisely because the compiler chose it.Canonicalis empty beside a non-emptySource. An emitter reading this Naming finds no word sequence and has to segment "webhooks" itself, which is the casing decision invariant 4 exists to keep out of emitters.irverifyallows an empty canonical because a Naming may legitimately carry only aHint, so nothing reports it.Evidence
testdata/conformance/openapi/webhooks.golden.json:17shows the group shipping with a source name and no canonical:The architecture sweep added in #183 does not catch this: it asserts that a
Canonicalis filled by the framework, not that aSourcecomes with one.Expected
Decide which of the two the group is — a hint, like the default group, or a name with the canonical words beside it — and apply it. Either way the webhooks golden moves, so it wants its own change rather than riding along with an unrelated one.