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

support data_key

Open DeoLeung opened this issue 4 years ago • 4 comments

we have some schema using unqualified names like 2019, 1abc, we use data_key to support it

class A(Schema):
  a = fields.String(data_key='2019')

we would like it to be dumped as

{'2019': {'title': '2019', 'type': 'string'}

it's now dumped as

{'a': {'title': 'a', 'type': 'string'}

DeoLeung avatar Feb 29 '20 09:02 DeoLeung

Looks like there's been some progress here: #100 but the tests aren't currently passing on that branch

fuhrysteve avatar Feb 29 '20 15:02 fuhrysteve

I can pick this up as I'm in need of it. @fuhrysteve - want me to take the other Lundalogik branch to preserve his commits, or start a fresh one with their changes included?

ZoranPavlovic avatar Feb 15 '21 13:02 ZoranPavlovic

Fixed by https://github.com/fuhrysteve/marshmallow-jsonschema/pull/139 ?

martijnthe avatar Mar 02 '21 19:03 martijnthe

I still see this as of marshmallow-jsonschema==0.11.1

rw-access avatar Apr 06 '21 17:04 rw-access