joelittlejohn / jsonschema2pojo

Generate Java types from JSON or JSON Schema and annotate those types for data-binding with Jackson, Gson, etc
http://www.jsonschema2pojo.org
Apache License 2.0
6.24k stars 1.66k forks source link

Hide sensitive properties from toString() #1556

Open Michal-Kubricht opened 1 year ago

Michal-Kubricht commented 1 year ago

It is in some cases useful to mark some property in JSON schema definition as a sensitive (or confidential) and thus making it hidden from generated toString() method.

Generator already contains a feature "toStringExcludes" which is global property specifying everything to be excluded from toString generation by name.

It would be advantage to have a definition of what to exclude inside the JSON schema. Idea would be to have it similarly to already existing feature excludedFromEqualsAndHashCode.

Michal-Kubricht commented 1 year ago

Attempt to bring the feature: https://github.com/joelittlejohn/jsonschema2pojo/pull/1557