#81 feat: add command-level security configuration#91
Merged
RAprogramm merged 6 commits into80-examples-supportfrom Jan 7, 2026
Merged
#81 feat: add command-level security configuration#91RAprogramm merged 6 commits into80-examples-supportfrom
RAprogramm merged 6 commits into80-examples-supportfrom
Conversation
- Add security field to CommandDef for per-command override - Parse security = "..." option in #[command(...)] attributes - Support "none" value to make specific commands public - Update handler generation to use command security with priority: 1. Command-level security override 2. Entity-level public commands list 3. Entity-level default security - Add security_scheme_name helper for mapping schemes - Add 3 unit tests for security parsing Closes #81
- Create error.rs module with EntityError derive macro
- Parse #[status(code)] attributes for HTTP status codes
- Use doc comments as error descriptions
- Generate {Error}Responses struct with helper methods:
- status_codes() - all error status codes
- descriptions() - all error descriptions
- utoipa_responses() - tuples for OpenAPI
- Add 4 unit tests for error parsing
Closes #82
- Wire up deprecated_in config to generate deprecated = true in utoipa - Version is already supported via full_path_prefix() - Add 5 unit tests for security scheme name mapping Closes #83
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
security = "..."option to#[command(...)]for per-command security override"none"to make specific commands publicUsage
Test plan
Closes #81