Merged
Conversation
- Remove unnecessary Result wrapping from generate_filtered_schema (T7)
- Convert option_if_let_else patterns to map_or_else
- Apply let...else syntax for early-return match patterns
- Add backtick formatting to doc comments for types/traits
- Narrow mutex lock scope in schema_type proc macro
- Remove redundant else blocks after return statements
- Use format string interpolation (format!("{x}") over format!("{}", x))
- Add #[allow] annotations for intentional clippy suppressions
- Change pub(crate) to pub where re-exported through module hierarchy
All 1270 tests pass, clippy clean.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…ions Extract 181-line god function into 3 focused helpers: - build_schema_lookups: register schema name/definition maps - parse_component_schemas: parse structs/enums into OpenAPI schemas - build_path_items: process routes into path items with operations Main function now orchestrates calls + assembles the OpenApi struct (~60 lines). Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add thread-local depth counter (MAX_DEPTH=32) to parse_type_to_schema_ref_with_schemas. Prevents stack overflow from deeply nested or circular type references. Falls back to generic Object schema when depth exceeded. Implementation uses thread_local Cell<usize> for zero-API-change depth tracking that works across both direct and indirect recursion paths. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Build a HashMap<file_path, syn::File> once at the start of OpenAPI doc generation, shared by both parse_component_schemas() and build_path_items(). Before: Each route re-read and re-parsed its source file. For N routes in M files, this was O(N × file_parse). parse_component_schemas() also read ALL route files for EACH struct via string search: O(structs × N × file_read). After: Each unique file parsed exactly once: O(M × file_parse). Struct lookups use a pre-built name→file index: O(1) per struct.
…ing> The known_schemas map mapped name→name (value was never used — only .contains_key() was called). Replacing with HashSet eliminates one String clone per schema registration and reduces memory usage. Updated 9 files across the parser module: all function signatures, call sites, and test code.
Changepacksvespera@Unknown - crates/vespera/Cargo.tomlMaybe you forgot to write the following files to the latest version vespera_core@Unknown - crates/vespera_core/Cargo.tomlMaybe you forgot to write the following files to the latest version vespera_macro@Unknown - crates/vespera_macro/Cargo.tomlMaybe you forgot to write the following files to the latest version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.