Conversation
98b777f to
e4ad0c9
Compare
There was a problem hiding this comment.
Couldn't you use the defineDefault method of this class? It makes this automatic.
soyuka
left a comment
There was a problem hiding this comment.
Could you use the automatic method for configuration? the rest is awesome!
e4ad0c9 to
f41ef4c
Compare
1da905e to
88619ac
Compare
|
Also changed the priority of Currently, when changing the priority of |
|
It's a hard problem + there's no bc-layer on priorities... I suggest to merge the code of your default factory to the one handling parameters. I know it'll be more code in a class but it keeps a better responsibility over this in my opinion. |
bfab314 to
2d31329
Compare
There was a problem hiding this comment.
create a an array and name convert all the keys so that you can call __construct with arguments (programatically) we know they match as the configuration does it the other way around
2d31329 to
87829ee
Compare
…to ParameterValidationResourceMetadataCollectionFactory
3e4abbb to
12fb7fb
Compare
Description
This PR allows to define global default parameters that are applied to all resources instead of configuring the parameter individually on each resource.
Before
#[ApiResource( operations: [ new GetCollection( parameters: [ new HeaderParameter( key: 'X-API-Token', required: true, description: 'API Token', ), ], ), ], )] class Book { }#[ApiResource( operations: [ new GetCollection( parameters: [ new HeaderParameter( key: 'X-API-Token', required: true, description: 'API Token', ), ], ), ], )] class Author { }After
Other exemple with two Parameter