Closed northys closed 1 year ago
I see. Validation is a problem here. Great report.
@f3l1x Is there any work done on this already? In one of our apps it would be very useful to define custom types. I can try to prepare PR
@f3l1x I prepared PR that would allow custom mapping types to be added. Could you check it out? See https://github.com/contributte/apitte/pull/187
Just btw - I'm no longer a programmer so I can't check it nor test it...
Done in #187
When I saw this part of documentation about overriding mapping datatypes I immediately created my own
UuidTypeMapper
and registered it likeThis is not supported though. Is there any way to add custom parameter mapping types? I'm not yet much familiar with the library codebase but from what I already saw it shouldn't be hard to implement. Maybe I could take a look at it but not this month. I have to finish something before deadline :D
Now I'm confused about dupllication of checks in multiple plugin and I think this must be fixed to implement this. Validation in CoreSchemaPlugin raises exception https://github.com/apitte/core/blob/c99c923ba006896a685a5d5b27fcdcc7d9432e49/src/Schema/Validation/RequestParameterValidation.php#L48 using in_array check inside array of hardcoded types. While CoreMappingPlugin does the actual mapping and is the one who registers the mappers. This array of mappers (their keys respectively) must be somehow passed to
RequestParameterValidation
insideCoreSchemaPlugin
.