Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Separate collection inputfilter validation #96

Closed
wants to merge 4 commits into from
Closed

Separate collection inputfilter validation #96

wants to merge 4 commits into from

Conversation

tigran-m-dev
Copy link
Contributor

Added new functionality to allow create separate validation inputfilters if we have REST API. For example if we have update (PUT) and updateList (PUT collection). Before this changes we can't specify different validation for update and updateList because they are both PUT request, but now it is possible to just specify key PUT and PUT_COLLECTION

tigran-m-dev and others added 2 commits May 16, 2018 16:54
Update fork master branch
…dation for Collection, if we have collection and entity like PATCH and PATCH list
@coveralls
Copy link

coveralls commented May 21, 2018

Coverage Status

Coverage decreased (-2.3%) to 78.431% when pulling 80b84fa on developer-devPHP:separate_collection_inputfilter_validation into afa233a on zfcampus:master.

@michalbundyra
Copy link
Member

@developer-devPHP We need tests for those changes.

@tigran-m-dev
Copy link
Contributor Author

@webimpress
I just pasted example that you have in your doc and changed using this new functionality, which is under PUT_COLLECTION.
In this example we are using Update and Collection Update (List update)
And for each of methods we could specify different Validator

'zf-content-validation' => [
    'Application\Controller\HelloWorld' => [
        'input_filter' => 'Application\Controller\HelloWorld\Validator',
        'PUT' => 'Application\Controller\HelloWorld\UpdateValidator',
        'PUT_COLLECTION' => 'Application\Controller\HelloWorld\UpdateCollectionValidator',
    ],
],

Fixed existing test testReturnsEarlyIfControllerServiceIsNotInConfig added ZFContentNegotiationParameterData
@tigran-m-dev
Copy link
Contributor Author

@webimpress and @weierophinney
I added test for this new functionality. When you have a time please check and let me know your thoughts.
Thanks.

weierophinney added a commit that referenced this pull request May 29, 2018
…tfilter_validation

Separate collection inputfilter validation
weierophinney added a commit that referenced this pull request May 29, 2018
weierophinney added a commit that referenced this pull request May 29, 2018
@weierophinney
Copy link
Member

Thanks, @developer-devPHP; merged to develop for release with 1.5.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants