You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compilers/openapi/internal/operation/content.go (1,142 lines) holds media types, multipart and sequential encoding, headers, examples and request bodies, and the package comment.
Direction
encoding.go: part encodings, multipart body parts, sequential (itemEncoding/prefixEncoding) encoding, and the body-model helpers only they use.
headers.go: headers and their serialization.
examples.go: example lists and spellings.
body.go: the request body.
content.go keeps media types and content entries. The package comment moves to doc.go.
internal/resolve/resolve.go cites bodySchemaPointer (content.go); it becomes operation/encoding.go.
Blocked by
#998, #1000 and #1046 edit content.go or its tests; #1057 rewrites operations_test.go.
Done when
Every top-level declaration of the package, with its doc comment and any comment between declarations, is byte-identical before and after the move (compared with a throwaway go/ast script), and no golden changes.
Comments that name a file name the file the code now lives in, changed in a commit of their own.
go test ./compilers/openapi/... passes without -update.
Priority: P4, rule 1 (housekeeping: moves code between files and changes no lowering, validation, IR or emit-contract behaviour). wc -l compilers/openapi/internal/operation/content.go → 1142 (morphic @a1f15b29).
A fourth TestContent_* test sits outside content_test.go: TestContent_ASharedBodyOrHeaderIsNamedForItsDeclaration, in compilers/openapi/internal/operation/pathitemref_test.go. "Tests follow their names" should take it along with the three in operations_test.go.
If #1099 merges first, the bodySchemaPointer (content.go) citation this issue repoints is in internal/resolve/refsite.go (IsRefSite's comment), not internal/resolve/resolve.go; #1099 splits that file.
Activity
OmarAlJarrah commentedon Oct 22, 2026
A fourth
TestContent_*test sits outsidecontent_test.go:TestContent_ASharedBodyOrHeaderIsNamedForItsDeclaration, incompilers/openapi/internal/operation/pathitemref_test.go. "Tests follow their names" should take it along with the three inoperations_test.go.grep -n '^func TestContent_' compilers/openapi/internal/operation/*_test.go | grep -v content_test.golists all four.OmarAlJarrah commentedon Oct 22, 2026
If #1099 merges first, the
bodySchemaPointer (content.go)citation this issue repoints is ininternal/resolve/refsite.go(IsRefSite's comment), notinternal/resolve/resolve.go; #1099 splits that file.