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
{{ message }}
Repository navigation
openapi: split auth.go into security requirements, schemes and OAuth flows #1093
#1062 left internal/auth/auth.go whole because it holds one construct, security. It holds three: LowerSecurityRequirements lowers the requirements an operation or document declares and never reaches the scheme lowering; the scheme lowering fills each scheme's kind and fields; and an OAuth2 scheme's flows, their fields and scopes are a lowering of their own. At ff8330ba the file is 592 lines.
auth.go is then empty and goes. Tests follow their names where a test names one of the three; the rest stay in auth_test.go and auth_internal_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 and test labels that name a file name the file the code now lives in, changed in a commit of their own: seven cases in compilers/openapi/overlay_test.go are labelled auth.go ….
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/auth/auth.go → 592 (morphic @ff8330ba).
Activity