Fix packaging

This commit is contained in:
Johan Maasing 2025-04-12 19:59:44 +02:00
parent 19e2d46dd0
commit 1abc1a3164
8 changed files with 144 additions and 25 deletions

View file

@ -19,6 +19,41 @@ separate files (for endpoint-definitions, circe serializer support etc).
So I wrote a [DSL](https://en.wikipedia.org/wiki/Domain-specific_language) parsed by an [ANTLR4](https://www.antlr.org)
parser and a code generator using [freemarker](https://freemarker.apache.org).
```
| Endgen |
-------------------------------------------------
----------- ||--------| |-----------| |------------||
| endpoint | || Parser | | In-Memory | | Freemarker || ---------------
| file | --> || | --> | AST | --> | engine || --> | Output file |
\__________\ ||--------| |-----------| |------------|| \_____________\
------------------------------------------------- -
^
|
----------------
| Template.ftl |
\_______________\
```
## How to Run
You need a Java 24 runtime and java in the path. A very convenient way to install a java runtime is [SdkMan](https://sdkman.io).
Unpack the archive, run the provided shellscript file.
### Usage
```
Usage: EndpointsCLI [-hvV] [-o=<outputDir>] [-t=<templateDir>] <file>
Generate source code from an endpoints specification file.
<file> The source endpoints DSL file.
-h, --help Show this help message and exit.
-o, --output=<outputDir> The directory to write the generated code to.
Default is ~/endpoints-output
-t, --template=<templateDir>
The template directory. Default is
~/endpoints-templates
-v, --verbose Print verbose debug messages.
-V, --version Print version information and exit.
```
## DSL example
In the simplest form the DSL looks like this