PathmindAI / nativerl

Train reinforcement learning agents using AnyLogic or Python-based simulations
Apache License 2.0
19 stars 4 forks source link

Split ma to components #412

Closed alethander closed 3 years ago

alethander commented 3 years ago

The main source of issue with MA is, that it mixes in fact three artifacts in one, with a common classpath. Artifacts are: 1) API 2) CodeGenerator 3) POJOs that are used in API, CodeGenerator and also passed to generated code.

Reasoning:

When API is a spring boot application with a long list od libraries, including swagger, serialization/deserialization, and webserver., CodeGenerator is a very simple app that does not need all this extra stuff from API. POJOs especially should be as simple as possible.

What we have now - Request parameters, annotated with Swagger are (ab)-used as pojo and passed to CodeGenerator, bringing all Jackson stuff along (that is the reason, why @kepricon needs to tweak classpath in #411). In fact, Jackson is not even needed there (if DTO would be just DTO, and not responsible also for its own deserialization in of and from methods).

By this PR I am splitting those three components and clear dependencies.