Post by bskk76 on Jul 11, 2018 10:14:05 GMT
I am hitting the below error while generating java pojos using json schema.
I downloaded the bundle - www.dmtf.org/sites/default/files/standards/documents/DSP8010_2018.1.zip
[~/redfish/org-dmtf-redfish-schema/src/main/schema]: ls -ltr
total 0
drwxr-xr-x@ 109 sivakrishna staff 3488 Jul 11 14:34 metadata
drwxr-xr-x@ 675 sivakrishna staff 21600 Jul 11 15:40 json-schema
[~/redfish/org-dmtf-redfish-schema/src/main/schema]: jsonschema2pojo -c3 -idb -p org.dmtf.redfish.schema -s /Users/sivakrishna/redfish/org-dmtf-redfish-schema/src/main/schema/ -t $PWD/../../../target
Exception in thread "main" java.lang.IllegalArgumentException: Path not present: Operations
at org.jsonschema2pojo.FragmentResolver.resolve(FragmentResolver.java:54)
at org.jsonschema2pojo.FragmentResolver.resolve(FragmentResolver.java:52)
at org.jsonschema2pojo.FragmentResolver.resolve(FragmentResolver.java:31)
at org.jsonschema2pojo.SchemaStore.create(SchemaStore.java:61)
at org.jsonschema2pojo.SchemaStore.create(SchemaStore.java:128)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:59)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
at org.jsonschema2pojo.rules.ArrayRule.apply(ArrayRule.java:81)
at org.jsonschema2pojo.rules.ArrayRule.apply(ArrayRule.java:37)
at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:113)
at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
at org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:75)
at org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:43)
at org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:70)
at org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:38)
at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:119)
at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:70)
at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:90)
at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:66)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:66)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
at org.jsonschema2pojo.SchemaMapper.generate(SchemaMapper.java:92)
at org.jsonschema2pojo.Jsonschema2Pojo.generateRecursive(Jsonschema2Pojo.java:134)
at org.jsonschema2pojo.Jsonschema2Pojo.generateRecursive(Jsonschema2Pojo.java:136)
at org.jsonschema2pojo.Jsonschema2Pojo.generate(Jsonschema2Pojo.java:75)
at org.jsonschema2pojo.cli.Jsonschema2PojoCLI.main(Jsonschema2PojoCLI.java:48)
[~/redfish/org-dmtf-redfish-schema/src/main/schema]:
I downloaded the bundle - www.dmtf.org/sites/default/files/standards/documents/DSP8010_2018.1.zip
[~/redfish/org-dmtf-redfish-schema/src/main/schema]: ls -ltr
total 0
drwxr-xr-x@ 109 sivakrishna staff 3488 Jul 11 14:34 metadata
drwxr-xr-x@ 675 sivakrishna staff 21600 Jul 11 15:40 json-schema
[~/redfish/org-dmtf-redfish-schema/src/main/schema]: jsonschema2pojo -c3 -idb -p org.dmtf.redfish.schema -s /Users/sivakrishna/redfish/org-dmtf-redfish-schema/src/main/schema/ -t $PWD/../../../target
Exception in thread "main" java.lang.IllegalArgumentException: Path not present: Operations
at org.jsonschema2pojo.FragmentResolver.resolve(FragmentResolver.java:54)
at org.jsonschema2pojo.FragmentResolver.resolve(FragmentResolver.java:52)
at org.jsonschema2pojo.FragmentResolver.resolve(FragmentResolver.java:31)
at org.jsonschema2pojo.SchemaStore.create(SchemaStore.java:61)
at org.jsonschema2pojo.SchemaStore.create(SchemaStore.java:128)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:59)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
at org.jsonschema2pojo.rules.ArrayRule.apply(ArrayRule.java:81)
at org.jsonschema2pojo.rules.ArrayRule.apply(ArrayRule.java:37)
at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:113)
at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
at org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:75)
at org.jsonschema2pojo.rules.PropertyRule.apply(PropertyRule.java:43)
at org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:70)
at org.jsonschema2pojo.rules.PropertiesRule.apply(PropertiesRule.java:38)
at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:119)
at org.jsonschema2pojo.rules.ObjectRule.apply(ObjectRule.java:70)
at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:90)
at org.jsonschema2pojo.rules.TypeRule.apply(TypeRule.java:40)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:73)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:66)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:66)
at org.jsonschema2pojo.rules.SchemaRule.apply(SchemaRule.java:30)
at org.jsonschema2pojo.SchemaMapper.generate(SchemaMapper.java:92)
at org.jsonschema2pojo.Jsonschema2Pojo.generateRecursive(Jsonschema2Pojo.java:134)
at org.jsonschema2pojo.Jsonschema2Pojo.generateRecursive(Jsonschema2Pojo.java:136)
at org.jsonschema2pojo.Jsonschema2Pojo.generate(Jsonschema2Pojo.java:75)
at org.jsonschema2pojo.cli.Jsonschema2PojoCLI.main(Jsonschema2PojoCLI.java:48)
[~/redfish/org-dmtf-redfish-schema/src/main/schema]: