joelittlejohn / jsonschema2pojo

Generate Java types from JSON or JSON Schema and annotate those types for data-binding with Jackson, Gson, etc

Home Page:http://www.jsonschema2pojo.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mirror "deprecated" annotation from JSON schema in the generated code

HermannGruber opened this issue · comments

I want to bring up again an issue that has been discussed in #588...

Things have changed in the meantime, and JSON schema now has a mechanism for marking fields as deprecated:
https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.9.3
Now it seems quite natural to wish that if the deprecated keyword is present in a field in the JSON schema, the generated getters/setters in the POJO will be deprecated (in the Java sense) as well.