Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Create a StrictEnumField #40

Merged
merged 1 commit into from
Jan 28, 2021
Merged

Conversation

jeffsawatzky
Copy link

@jeffsawatzky jeffsawatzky commented Jun 11, 2020

One of the issues that is holding up adding ApiSpec support is that EnumField can support different behaviour for load_by and dump_by. This can be seen in #24, #25, #27, #38

This PR adds a StrictEnumField which removes that behaviour while retaining backwards compatibility with the current EnumField.

If this PR is approved, then we should be able to add the ApiSpec support to this strict field, and anyone that would like to have ApiSpec support should switch to this one.

@jeffsawatzky
Copy link
Author

@justanr how do you feel about this PR? If this is good, then I (or someone else, such as @Birne94, @quaterneon, or @h) can come back and add ApiSpec support to this class

@jeffsawatzky
Copy link
Author

@justanr Any feedback? Almost a month now and no response. Is this repo still maintained?

@jeffsawatzky
Copy link
Author

@justanr I would be very grateful if you could review this PR and either approve it, or let me know what needs to change.

@justanr justanr changed the base branch from master to next-release January 28, 2021 18:38
@justanr
Copy link
Owner

justanr commented Jan 28, 2021

I retargeted the branch to a next-releases branch (collecting all changes that should go in) there's now 1 small conflict (make_error needs to move to EnumField fail method). Happy to resolve that myself or if you want to.

@jeffsawatzky
Copy link
Author

@justanr I think I resolved the conflict. Let me know if there is anything else that needs to be updated. Thanks!

@justanr justanr merged commit f036748 into justanr:next-release Jan 28, 2021
@justanr
Copy link
Owner

justanr commented Jan 28, 2021

👍 danke for the extreme patience.

@kaos
Copy link

kaos commented Apr 1, 2021

I've used the version from #38 successfully with OpenAPI spec, and would very much appreciate if it could be merged, and a release published, eventually :) 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants