Adaptor implementations should be generic, they should not directly read request.form
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 109
- Forks
- 107
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 4
Description
An adapter should be a reusable piece of infrastructure. Its implementation should be as generic as possible. But here, and in many other places, we have the adaptors directly reading the request form. This makes them difficult to use. It's the equivalent of depending on a single global variable (the request.form) that's used across the whole system. That's not flexible.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/plone/restapi/serializer/summary.py at the linked implementation, then inspect the other adapter implementations that directly read request.form. Trace how adapter inputs are currently supplied and define a reusable input path that does not depend on the request form. Done means the affected adapters no longer directly read request.form and their existing behavior remains covered by the relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100