-
-
Notifications
You must be signed in to change notification settings - Fork 842
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: before implementation with custom processors (#2421)
## Description The before implementation was never functional, as the returned tags array is a tag name indexed array of tags. This change resolves that, and adds a test to actually insert a processor with the before attribute. ![image](https://github.com/user-attachments/assets/eba83f7a-45ba-4fac-b05b-7e43bd80f33b) ## What type of PR is this? (check all applicable) - [x] Bug Fix - [ ] Feature - [ ] Refactor - [ ] Deprecation - [ ] Breaking Change - [ ] Documentation Update - [ ] CI ## Checklist - [ ] I have made corresponding changes to the documentation (`docs/`) - [ ] I have made corresponding changes to the changelog (`CHANGELOG.md`)
- Loading branch information
1 parent
3216d13
commit e44364d
Showing
4 changed files
with
30 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
services: | ||
Nelmio\ApiDocBundle\Tests\Functional\StubProcessor: | ||
tags: | ||
- { name: 'nelmio_api_doc.swagger.processor', priority: -100, before: OpenApi\Processors\CleanUnusedComponents } |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the NelmioApiDocBundle package. | ||
* | ||
* (c) Nelmio | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Nelmio\ApiDocBundle\Tests\Functional; | ||
|
||
use OpenApi\Analysis; | ||
|
||
class StubProcessor | ||
{ | ||
public function __invoke(Analysis $analysis): void | ||
{ | ||
// Does nothing | ||
} | ||
} |