marshmallow-code / marshmallow-code/marshmallow
Allow specifying output field when using `unknown=INCLUDE`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 738
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 7
Description
From https://github.com/marshmallow-code/marshmallow/issues/524#issuecomment-393057138
> We could even go further and let the user set a default Field when using *INCLUDE*, but I'm not sure it is so useful, and it is never too late to add it in a later step.
(edited to make the argument name correct)
I suggested [here](https://github.com/marshmallow-code/marshmallow/issues/524#issuecomment-397430467) that a field could be passed to unknown, e.g. `unknown=fields.Str()`.
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 by reading the linked discussion in issue 524 and the current handling of unknown=INCLUDE. Trace how a field such as fields.Str() would be applied to unknown output fields, then identify the relevant tests for unknown-field serialization. Done means the requested output-field behavior is specified, implemented, and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100