I want to create an OData client in Java via odata-generator-cli 3.35.0.
Using .edmx and swagger file of following Service from Business Hub.
The OData client is being generated with an exception:
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.ODataToVdmGenerator - Processing 1 OData service...
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.ODataToVdmGenerator - Processing OData service 'Integration Content' at /cpi/api/v1
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.NamespaceClassGenerator - Found entity type IntegrationDesigntimeArtifact from set IntegrationDesigntimeArtifacts
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.NamespaceClassGenerator - Found entity type RuntimeArtifactErrorInformation from set RuntimeArtifactErrorInformations
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.NamespaceClassGenerator - Found entity type Configuration from set Configurations
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.NamespaceClassGenerator - Found entity type Resource from set Resources
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.NamespaceClassGenerator - Found entity type IntegrationRuntimeArtifact from set IntegrationRuntimeArtifacts
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.NamingContext - Found more than one occurrence of the Java identifier type. The new identifier has been renamed to type_2
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.NamespaceClassGenerator - Found entity type IntegrationPackage from set IntegrationPackages
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.NamespaceClassGenerator - Found entity type ServiceEndpoint from set ServiceEndpoints
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.NamespaceClassGenerator - Found entity type EntryPoint from set EntryPoints
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.NamingContext - Found more than one occurrence of the Java identifier type. The new identifier has been renamed to type_2
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.NamespaceClassGenerator - Found entity type Definition from set APIDefinitions
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.NamespaceClassGenerator - Found entity type ValueMappingDesigntimeArtifact from set ValueMappingDesigntimeArtifacts
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.NamespaceClassGenerator - Found entity type ValMapSchema from set ValMapSchema
[main] WARN com.sap.cloud.sdk.datamodel.odata.generator.ODataToVdmGenerator - Error in file IntegrationContent; unable to generate all VDM classes.
com.sap.cloud.sdk.datamodel.odata.generator.ODataGeneratorReadException: org.apache.olingo.odata2.api.edm.EdmException: An exception occurred.
at com.sap.cloud.sdk.datamodel.odata.generator.EdmService$TypedAdapter.getType(EdmService.java:317)
at com.sap.cloud.sdk.datamodel.odata.generator.NamespaceClassGenerator.processNavigationProperties(NamespaceClassGenerator.java:1098)
at com.sap.cloud.sdk.datamodel.odata.generator.NamespaceClassGenerator.processEntitySet(NamespaceClassGenerator.java:891)
at com.sap.cloud.sdk.datamodel.odata.generator.EntitySetProcessor.processEntitySets(EntitySetProcessor.java:74)
at com.sap.cloud.sdk.datamodel.odata.generator.CodeModelClassGenerator.processService(CodeModelClassGenerator.java:102)
at com.sap.cloud.sdk.datamodel.odata.generator.ODataToVdmGenerator.createCodeModelForServices(ODataToVdmGenerator.java:133)
at com.sap.cloud.sdk.datamodel.odata.generator.ODataToVdmGenerator.generate(ODataToVdmGenerator.java:98)
at com.sap.cloud.sdk.datamodel.odata.generator.DataModelGenerator.execute(DataModelGenerator.java:797)
at com.sap.cloud.sdk.datamodel.odata.generator.DataModelGeneratorCli.run(DataModelGeneratorCli.java:206)
at com.sap.cloud.sdk.datamodel.odata.generator.DataModelGeneratorCli.main(DataModelGeneratorCli.java:188)
Caused by: org.apache.olingo.odata2.api.edm.EdmException: An exception occurred.
at org.apache.olingo.odata2.core.edm.provider.EdmAssociationEndImplProv.getEntityType(EdmAssociationEndImplProv.java:51)
at org.apache.olingo.odata2.core.edm.provider.EdmNavigationPropertyImplProv.getType(EdmNavigationPropertyImplProv.java:44)
at com.sap.cloud.sdk.datamodel.odata.generator.EdmService$TypedAdapter.getType(EdmService.java:314)
... 9 more
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.ODataToVdmGenerator - Generating Java classes to C:\Users\W4ff3l\Downloads\odata-gen\trg
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.DataModelGeneratorCli - ------------------------------------------------------------
[main] WARN com.sap.cloud.sdk.datamodel.odata.generator.DataModelGeneratorCli - Generator SUCCEEDED but had the following 1 warning messages:
[main] WARN com.sap.cloud.sdk.datamodel.odata.generator.DataModelGeneratorCli - Error in file IntegrationContent; unable to generate all VDM classes.
[main] INFO com.sap.cloud.sdk.datamodel.odata.generator.DataModelGeneratorCli - ------------------------------------------------------------
Seems like there is a problem with navigation but I don't know how to debug or solve this.
To replicate the problem download .edmx and .json from the Business Hub and use them in the generator.