Skip to content

Commit 8017656

Browse files
committed
docs(compilers/openapi): drop a census deferral reason #293 settled
The path-item census is deferred for two stated reasons. The second no longer holds: it said httpMethods is narrower than the library's method set and has no `query`, so a census over what it does not name would report a valid 3.2 query operation as undeclared. #293 added `query` to the table and pathOperations reads additionalOperations beside it, so what a path item can legally name is now fully spelled there. The first reason is untouched and is the one that decides it: the library folds an unrecognized key into the operations map rather than recording it as undeclared, so there is no census to read — and the key is not lost in silence, since folding it reports a validation-type-mismatch at error severity naming the key at its own pointer. What is left is reading the raw node, which #377 holds.
1 parent eedd16d commit 8017656

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

compilers/openapi/internal/operation/operations.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -513,13 +513,14 @@ func fillOperationDocs(d *ir.Docs, src *soa.Operation) {
513513
// pointer, which is the losslessness property the census exists for; what is
514514
// lost is the key's value, not the fact that it was written.
515515
// - Recovering the value means reading the raw node against a path item's key
516-
// vocabulary, and the only vocabulary this compiler owns is httpMethods,
517-
// which is narrower than the library's — it has no `query`, the method
518-
// OpenAPI 3.2 adds. A census over what httpMethods does not name would
519-
// therefore report a valid 3.2 `query` operation as an undeclared key.
516+
// vocabulary rather than taking a census the library offers, which is work of
517+
// a different kind from every other site here.
520518
//
521-
// That vocabulary is what GitHub #293 is about, so widening it here would settle
522-
// that issue as a side effect of this one. Tracked separately in GitHub #377.
519+
// The vocabulary itself is no longer the obstacle it was: httpMethods was
520+
// narrower than the library's until GitHub #293 added `query` to it, and
521+
// pathOperations reads additionalOperations beside it, so what a path item can
522+
// legally name is now fully spelled here. What is left is the reading, tracked
523+
// in GitHub #377.
523524
func applyPathItemResidue(c lowering.Ctx, op *ir.Operation, pi *soa.PathItem, declPtr string) []ir.Diagnostic {
524525
diags := applyPathServers(c, op, pi, declPtr)
525526
diags = append(diags, applyPathItemDocs(c, op, pi, declPtr)...)

0 commit comments

Comments
 (0)