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

Clear schema cache between JSON files #1484

Closed joelittlejohn closed 1 year ago

joelittlejohn commented 1 year ago

When using JSON or YAML files (not schemas, but example data) the schemas will not have a proper file path in their ID, as there is no actual schema file. All schema IDs will be fragments only (relative references within the document). Once generation is complete for a file, these schemas should be thrown away and not reused.

Closes #1427

unkish commented 1 year ago

Would it make sense to take some of the changes from https://github.com/joelittlejohn/jsonschema2pojo/pull/1464 in particular:

Or separate PR would be better ?

joelittlejohn commented 1 year ago

I've ticked off two of the above as part of this change.