ehrbase / openEHR_SDK

A SDK to facilitate the development of openEHR applications
Other
48 stars 28 forks source link

How to generate code using the generateChoicesForSingleEvent config #196

Closed ppazos closed 3 years ago

ppazos commented 3 years ago

Background

I tried this command:

$ java -jar generator-1.2.0.jar -opt ~/Desktop/sofa-score/SOFA.opt -out ~/Desktop/sofa-score/sofa -package "org.ehrbase.fhirbridge.ehr.converter.sofascore" -config generateChoicesForSingleEvent=true

And got this output:

Exception in thread "main" java.io.FileNotFoundException: generateChoicesForSingleEvent=true (No such file or directory)
    at java.base/java.io.FileInputStream.open0(Native Method)
    at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
    at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
    at java.base/java.io.FileInputStream.<init>(FileInputStream.java:112)
    at org.ehrbase.client.classgenerator.ClassGeneratorRunner.getClassGeneratorConfig(ClassGeneratorRunner.java:85)
    at org.ehrbase.client.classgenerator.ClassGeneratorRunner.main(ClassGeneratorRunner.java:71)

Not sure what is wrong, that seems to follow the README correctly.

stefanspiska commented 3 years ago

you have to copy generator/src/main/resources/DefaultConfig.yaml to the dir.

and then change the property in the yaml.

-config is the path to your config yaml