Skip to content

Add nested input_filter for field descriptor - #66

Merged
LeanderCS merged 1 commit into
mainfrom
inputfilter-field
Oct 17, 2025
Merged

Add nested input_filter for field descriptor#66
LeanderCS merged 1 commit into
mainfrom
inputfilter-field

Conversation

@LeanderCS

@LeanderCS LeanderCS commented Oct 17, 2025

Copy link
Copy Markdown
Owner

Summary by Bito

This pull request enhances the Flask input filter library by introducing nested validation capabilities through an 'input_filter' attribute. It includes updates to documentation and a changelog, as well as a comprehensive suite of tests to ensure robust validation across various scenarios.

Copilot AI review requested due to automatic review settings October 17, 2025 01:12
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for nested InputFilter validation, allowing fields to validate nested dictionary structures by specifying an InputFilter class via the input_filter parameter in the field() decorator.

Key Changes:

  • Added input_filter parameter to field descriptors and models to enable nested validation
  • Implemented nested validation logic in ValidationMixin with type checking and error propagation
  • Added comprehensive test coverage for various nested validation scenarios

Reviewed Changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/input_filter/test_nested_input_filter.py New comprehensive test suite for nested InputFilter validation with 20+ test cases
pyproject.toml Version bump from 0.7.4 to 0.7.5
flask_inputfilter/models/field_model/field_model.py Added input_filter attribute to FieldModel dataclass
flask_inputfilter/models/field_model/_field_model.pyx Added input_filter parameter to Cython FieldModel implementation
flask_inputfilter/models/field_model/_field_model.pxd Added input_filter declaration to Cython header
flask_inputfilter/mixins/validation_mixin/validation_mixin.py Implemented nested validation logic with apply_nested_input_filter method
flask_inputfilter/mixins/validation_mixin/_validation_mixin.pyx Cython implementation of nested validation logic
flask_inputfilter/mixins/validation_mixin/_validation_mixin.pxd Added Cython declaration for nested validation method
flask_inputfilter/input_filter.py Updated to pass input_filter parameter during field registration
flask_inputfilter/declarative/field_descriptor.pyi Added input_filter type hint to field descriptor stub
flask_inputfilter/declarative/field_descriptor.py Added input_filter parameter to FieldDescriptor class
flask_inputfilter/declarative/field.py Added input_filter parameter to field() function with documentation
flask_inputfilter/declarative/_field_descriptor.pyx Added input_filter to Cython FieldDescriptor implementation
flask_inputfilter/declarative/_field_descriptor.pxd Added input_filter declaration to Cython header
flask_inputfilter/_input_filter.pyx Updated Cython InputFilter to pass input_filter parameter
docs/source/options/global_decorators.rst Removed unrelated hierarchical configuration documentation
docs/source/options/field_decorator.rst Added comprehensive documentation for the new input_filter parameter
docs/source/changelog.rst Added changelog entry for version 0.7.5 with nested InputFilter feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Repository owner deleted a comment from Copilot AI Oct 17, 2025
Repository owner deleted a comment from Copilot AI Oct 17, 2025
@LeanderCS
LeanderCS merged commit 8bc7bb4 into main Oct 17, 2025
7 checks passed
@LeanderCS
LeanderCS deleted the inputfilter-field branch October 17, 2025 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants