apache / incubator-kie-issues

Apache License 2.0
11 stars 1 forks source link

Fix rest endpoint generation inside kogito runtimes #1373

Open gitgabrio opened 3 days ago

gitgabrio commented 3 days ago

For rules projects, the rest endpoint is generated even with kogito.generate.rest.rules=false configuration

Inside ApplicationGenerator.filterGeneratedFile(GeneratedFile), the following snippet

boolean keepFile = context.hasRESTGloballyAvailable() || !REST_TYPE.equals(generatedFile.type()); does not consider engine-specific configuration, result being that the boolean is true when the disabling has been made on a per-engine base, even for REST type.

The wrong behaviour seems evident only on rules engine, though, so more investigation is needed.