membrane-php/membrane-core

Support Parameters "in":"header" or "in":"cookie"

Opened this issue · 0 comments

Membrane does not support header and cookie parameters currently.

The issue is that all header and cookie payloads come out as an array, which conflicts with trying to validate types that aren't arrays.

The solution may be to include a BeforeSet that, for non-array values, checks the array only contains one item and that the item is the specified "type". Then an Afterset that flattens the array.