eiffel-community / eiffel-remrem-generate

Apache License 2.0
8 stars 70 forks source link

RemRem-Generate 2.1.4 generates remrem temeplate with old meta.version #203

Closed tobiasake closed 1 year ago

tobiasake commented 2 years ago

Description

The new RemRem-Generate 2.1.4 version comes with some new Eiffel Paris Edition Protocol version changes.

EiffelComptositionDefinedEvent meta.version is uplifted from 3.0.0 to 3.1.0 which remrem-generate fails to generate in this entrypoint: "GET /template/{type}/{mp}" If I do a Get request to this entrypoint with type=EiffelComptositionDefinedEvent and mp=eiffelsematics, then a remrem template is generated with old meta.version:

  "msgParams": {
    "meta": {
      "type": "EiffelCompositionDefinedEvent",
      "version": "3.0.0",

If I take this template and fill in other required Event field and do a POST request to entrypoint "POST /{mp}" that generate the actual event content I get this error:

{
  "message": "Cannot validate given JSON string",
  "cause": "com.ericsson.eiffel.remrem.semantics.validator.EiffelValidationException: [object has missing required properties ([\"version\"])]"
}

This is due to old meta.version in the template. If I manually change the meta.version to version 3.1.0 then Eiffel event is successfully generated.

The issue is this entrypoint "GET /template/{type}/{mp}" that don't generate templates according to the new Eiffel Paris Edition protocol templates.

RemRem-Generate and Protocol versions info: { "serviceVersion": { "serviceVersion": "2.1.4" }, "endpointVersions": { "semanticsVersion": "2.2.1" } }

Motivation

RemRem-Generate should generate templates that is valid according to the Eiffel protocol and ready to be used for generating Eiffel event and publish Eiffel event on Eiffel MessageBus.

Exemplification

Benefits

RemRem-Generate generates Eiffel events that is ready to be published on MessageBus with less manual work for the user.

Possible Drawbacks

None

z-sztrom commented 1 year ago

The root cause of the issue is https://github.com/eiffel-community/eiffel-remrem-semantics/issues/164.