-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How does the code generation work? #17
Comments
Hi, The templates live in the generator action repo here: https://github.com/wirthual/deutschland-generator-action/tree/main/deutschland_templates You should be able to download them and set the path in the generator_config.yaml accordingly. Also you need to execute this script after the generation to bring it in the right folder structure: Basically you can follow the steps in action.yaml to see what's going on. Let me know if that works for you. Unfortunately there are no instructions on how to do this now, so we would really appreciate if you could write down your steps so we can save others from you struggle. Best, |
I somehow missed your reply but now I have looked into it. The following how-to should cover all the steps. I didn't manage to build the client under the How to buildThis tutorial explains how to build the smard-api on your local machine. This tutorial assumes that you already have the smard-api repo cloned to your local machine. OpenAPI generatorFirst, you need an OpenAPI generator installed. Installation is described on the project website. This tutorial assumes that the generator jar is present on your machine. The version is important. You can find the corresponding version in the file action.yaml in the TemplatesThe generator needs templates. They reside in a different repository, called deutschland-generator-action. Clone this repository outside of the smard-api repository:
Now you need to adjust the templateDir: /path/to/deutschland-generator-action/deutschland_templates Generating the python clientNow that you have the generator installed and the templates configured, you can generate the python client. Make sure that your working directory is the smard-api root. The output directory must be the
The OpenAPI generator takes at least four arguments, the openapi configuration file, the language generator, the generator config and the output directory. Make sure to use the
Finally, you need to adjust some path. Use the
InstallingNow that you have successfully build the smard-api client, you can install it on your system. In the
Now you should have a
|
However you can do |
I tried to update the API specification for the projected energy generation. However I couldn't get the generator to work. For local use, I should specify the template, but I couldn't find the template files anywhere. The generator itself later fails, see output below. Is there a documentation available on how to run the generator for this project?
The text was updated successfully, but these errors were encountered: