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

jsonschema2pojo-maven-plugin:1.1.2:generate failed: Path not present: properties #1501

Open Rob-1966 opened 1 year ago

Rob-1966 commented 1 year ago

Hi,

getting this error when upgrading from version 1.1.1 to 1.1.2 and later releases: jsonschema2pojo-maven-plugin:1.1.2:generate failed: Path not present: properties

It has to do with my CustomAnnotator. Without these statements I don't have an error. Unfortunately I need the CustomAnnotator

          <customAnnotator>nl.nn.bank.jsontopojo.AllOfCustomAnnotator</customAnnotator>
          <customRuleFactory>nl.nn.bank.jsontopojo.CustomRuleFactory</customRuleFactory>

Any idea how I can solve this?

joelittlejohn commented 1 year ago

Hi Rob. A major fix went into version 1.2.0 to avoid this error (see #1427). Could you try upgrading to 1.2.1?

It's also possible, however, that your custom rule factory or custom annotator is doing something unsafe. Could you also post the full stack trace here, and (if possible) share the source code for the annotator and rule factory in a gist?

Rob-1966 commented 1 year ago

Hi,

I'm also getting this error with version 1.2.1: ERROR] Failed to execute goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:1.2.1:generate (default) on project mortgage-loan-starter: Execution default of goal org.jsonschema2pojo:jsonschema2pojo-maven-plugin:1.2.1:generate failed: Path not present: properties -> [Help 1]

joelittlejohn commented 1 year ago

Could you fix the formatting, or put these classes into a gist?

Rob-1966 commented 1 year ago

Hi,

Sorry didn't know what a gist is :-)

https://gist.github.com/Rob-1966/96b36ca93e7e0429c7f6416680f312d1