#79 feat: parse validation attributes for OpenAPI constraints#87
Merged
RAprogramm merged 2 commits into78-doc-commentsfrom Jan 7, 2026
Merged
#79 feat: parse validation attributes for OpenAPI constraints#87RAprogramm merged 2 commits into78-doc-commentsfrom
RAprogramm merged 2 commits into78-doc-commentsfrom
Conversation
8ffe30b to
480a572
Compare
e82799b to
2f306b7
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
480a572 to
5eda2c3
Compare
- Add utils/docs.rs module for doc comment extraction - Extract /// comments from entity struct for tag descriptions - Extract /// comments from fields for schema descriptions - Use entity doc as fallback for tag_description in OpenAPI - 6 unit tests for doc extraction functions
- Add validation.rs module for #[validate(...)] parsing - Support length(min, max), range(min, max), email, url, regex - Generate OpenAPI schema constraints (minLength, maxLength, etc.) - Store raw attrs for passthrough to generated DTOs - 8 unit tests for validation parsing
2f306b7 to
0db154a
Compare
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
validation.rsmodule for parsing#[validate(...)]attributesSupported Validators
length(min = N)minLength: Nlength(max = N)maxLength: Nrange(min = N)minimum: Nrange(max = N)maximum: Nemailformat: emailurlformat: uriregex = "..."pattern: ...Usage
Generated OpenAPI Schema
Test plan
Closes #79
Depends on #86