marshmallow-code / marshmallow-code/marshmallow-oneofschema

Feature request: "Unsupported value" error message - show supported values

Open
#135 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
142
Forks
44
Avg merge
7h 7m
Merged PRs (30d)
3

Description

Relevant code:

https://github.com/marshmallow-code/marshmallow-oneofschema/blob/a17d5c1493206ebb44664844d36445d5a2a62f5f/marshmallow_oneofschema/one_of_schema.py#L169

Rather than `"Unsupported value: 'foo'"`, I'd like to show the supported values, similar to how Marshmallow's `OneOf` field type shows `Must be one of: FOO`.

Contributor guide

Open the contributing guide

Research direction

Start in marshmallow_oneofschema/one_of_schema.py at the linked code around line 169 and compare the current unsupported-value message with Marshmallow's OneOf field behavior. Update the message to include the supported values, then verify that the resulting error wording matches the requested format.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.