feat: implement #[api(skip)] for OpenAPI parameter exclusion#22
Merged
Conversation
Add support for skipping specific handler parameters in OpenAPI documentation generation via the #[api(skip)] attribute. This allows developers to exclude internal parameters (like Extension, State) from the OpenAPI spec. Changes: - Simplify parameter skip detection logic in route.rs macro - Preserve non-api attributes when processing function parameters - Fix workspace compilation by excluding cloudflare-worker example - Add comprehensive test cases demonstrating skip functionality - Clean up compiler warnings Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
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.
Summary
Implement the
#[api(skip)]attribute to exclude specific handler parameters from OpenAPI documentation. This allows developers to hide internal parameters likeExtensionandStatefrom the generated OpenAPI spec.Changes
Test Plan
cargo test --workspaceto verify all tests pass/redocor/openapi.jsonon the example to verify skip functionality works correctly🤖 Generated with Claude Code