s-knibbs / dataclasses-jsonschema

JSON schema generation from dataclasses
MIT License
167 stars 38 forks source link

Change private fields from _ to __ #83

Closed Garito closed 5 years ago

Garito commented 5 years ago

Hi! I'm trying to declare a class member with name id as the mongodb index field of the class but the library exclude fields name with

Would be nice to have an option to change that to another prefix like __ Thanks

Edit: the private prefix is hardcoded here: https://github.com/s-knibbs/dataclasses-jsonschema/blob/22aaa09d09e7d6a37e75cccb2100b824dd200bb0/dataclasses_jsonschema/__init__.py#L282 Should be as easy as define a member (_priv_prefix?) for JsonSchemaMixin?