marshmallow-jsonschema icon indicating copy to clipboard operation
marshmallow-jsonschema copied to clipboard

Mark fields as read only when using dump_only

Open gpip opened this issue 7 years ago • 2 comments

marshmallow allows marking fields with dump_only / load_only, it would be good to know fields that have been marked as such. Do you think this would require adding another field to JSONSchema, e.g. read_only / write_only?

gpip avatar Apr 19 '17 12:04 gpip

I added support for dump_only to be readonly in the latest master - at a glance I'm not seeing anything in the json schema spec for something resembling write only..

fuhrysteve avatar May 23 '17 23:05 fuhrysteve

I don't think that is part of the json schema. marshmallow uses dump_only to mean read only, and load_only for write only, that's what I was referring to.

gpip avatar May 23 '17 23:05 gpip