From 1b9b40728d2d1f2a5efd1bb117a5b9f81c67536c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 30 Jun 2025 11:23:43 +0200 Subject: [PATCH] Website: improve docs about installation of code generators Link to the official Java installer, as that doesn't require XCode to be installed (on macOS). And that works on Windows too. --- .../development/generating-code/_index.md | 48 ++++++++++++++++++- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/web/project-website/content/development/generating-code/_index.md b/web/project-website/content/development/generating-code/_index.md index b1436123..69acbc81 100644 --- a/web/project-website/content/development/generating-code/_index.md +++ b/web/project-website/content/development/generating-code/_index.md @@ -19,6 +19,8 @@ There are three code generators used by Flamenco: [mockgen]: https://github.com/golang/mock/mockgen [openapi-codegen]: https://openapi-generator.tech/ +### Go code generators + The first two generators can be installed with either of these commands: ```bash @@ -29,9 +31,51 @@ $ go run mage.go installGenerators $ make install-generators ``` +### Python and JavaScript code generators + + `openapi-codegen` is bundled with the Flamenco sources, but does need a Java -runtime environment to be installed. On Ubuntu Linux, `sudo apt install -default-jre-headless` should be enough. +runtime environment to be installed. + +{{< tabs "installing-java" >}} +{{< tab "Linux" >}} + +On Ubuntu Linux this should be enough: + +```bash +$ sudo apt install default-jre-headless +``` + +Other Linux distributions very likely have a similar package. + +{{< /tab >}} +{{< tab "Windows" >}} + +Use the [official Java installer](https://www.java.com/en/download/manual.jsp). + +{{< /tab >}} +{{< tab "macOS" >}} + +**Option 1** (Native install) + +Use the [official Java installer](https://www.java.com/en/download/manual.jsp). + +
+ +**Option 2** (Homebrew) + +Install Java via homebrew: + +``` +brew install java +``` + +Note that this requires XCode to be installed. + +{{< /tab >}} +{{< /tabs >}} + + ## Committing Generated Code