Skip to content

V2 OpenAPI cycle detection uses manual enter/leave instead of RAII #7

@rawkode

Description

@rawkode

The V3 schema path (schema.rs) correctly uses an ExpandGuard RAII struct that auto-removes entries from the expanding set on drop. The V2 path uses manual enter()/leave() calls. If any ? early-return occurs between enter and leave, the expanding set leaks entries, causing false cycle detection on subsequent visits to the same schema.

This is a latent correctness bug. The V2 resolver (schema.rs:580-588) should be refactored to use the same RAII pattern as V3 (schema.rs:159).

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions