marshmallow_enum icon indicating copy to clipboard operation
marshmallow_enum copied to clipboard

Allow marshmallow_enum to be used for OpenAPI schema definitions

Open h opened this issue 5 years ago • 3 comments

Passing the enum through to the super-class allows it to be used for APISpec/OpenAPI schema definitions, an important use-case for marshmallow. Given that it's the first parameter of the function, the risk that the parameter was referenced by name in a client library is fairly small. Searching through public repositories in GitHub doesn't reveal any clients where this would be problematic.

OpenAPI does not permit the values to differ between loading/dumping. The load_by and dump_by parameters are still accepted for backward compatibility, but they have been deprecated in favor of the by_value parameter.

h avatar Apr 18 '20 05:04 h

See #24 and #25

h avatar Apr 18 '20 05:04 h

@justanr Could you review the PR and let me know if this looks alright to you? We'd like to start using it to include enum fields in our autogenerated OpenAPI specs. Thanks!

h avatar Apr 22 '20 21:04 h

Time to make a move on this? If @justanr have moved on to other projects, perhaps we can adopt this under another namespace/project?

kaos avatar Jan 08 '21 15:01 kaos