Closed manuelpeiso closed 7 months ago
@manuelpeiso This looks good. Have you tested this change in your codebase?
Yes, I already used this option in this endpoint:
#[OpenApiPaginator]
#[OpenApiResponse(schemaType: 'array', associations: ['whiteList' => false])]
#[Get('houses/{house_id}/bethrooms')]
#[PatternUuid('house_id')]
public function homeBethrooms(
BethroomSearcher $searcher
) {
.......
}
And I can see the response I am expecting, no associations loaded:
#[OpenApiResponse(schemaType: 'array', associations: ['whiteList' => false])]
Will allow not load the associations. So we have a way to get the default schema without the associations loaded.
Added strict
=== false
here: https://github.com/manuelpeiso/cakephp-swagger-bake/blob/e4c069ae05ec2fd9ef5c293fe806ad0dfd053b45/src/Lib/Operation/OperationResponseAssociation.php#L74New test
test_false_white_list
created here: https://github.com/manuelpeiso/cakephp-swagger-bake/blob/e4c069ae05ec2fd9ef5c293fe806ad0dfd053b45/tests/TestCase/Lib/Operation/OperationResponseAssociationTest.php#L109Documentation was updated to add new option.
Resolves: #537