Enforce that if request/correlation id provided, it must be a UUID otherwise generate new
derekbekoe opened this issue · 1 comments
derekbekoe commented
Issue
Currently, any value is accepted.
Expectation
Only UUIDs should be accepted.
The could be implemented with a new kwarg on the Plugins so this isn't a breaking change for any users who currently accept request values that are not UUIDs.
Relevant source code
starlette-context/starlette_context/plugins/correlation_id.py
Lines 14 to 22 in 79aa8ff
Happy to submit a PR if needed.
tomwojcik commented
Makes sense.
Feel free to open a PR or I'll do that myself over the weekend.