marshmallow-code / marshmallow-code/marshmallow-oneofschema

Ability to set type_field errors dynamically

Open
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
142
Forks
44
Avg merge
7h 7m
Merged PRs (30d)
3

Description

There are a few hard coded errors in the `_load` method that would be nice to be able to set dynamically without overriding the method.

This is helpful in the case where the `type_field` is being used for the schema routing but `type_field_remove` is also set to `False` so the data is passed along and used elsewhere.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the _load method and tracing its hard-coded errors, especially the path used when type_field_remove is False. Check how type_field currently routes schema data and identify the existing error behavior that needs to become configurable. Done means callers can set those errors dynamically without overriding _load, while the type field remains available for downstream use.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.