Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor actions JSON serialization / deserialization + plugin mechanism #2325

Merged
merged 5 commits into from
Oct 18, 2022

Conversation

sylvlecl
Copy link
Contributor

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem ? If so, link to this issue using '#XXX' and skip the rest

#2213

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Feature + refactoring.

What is the new behavior (if this is a feature change)?

  • We use jackson mechanisms for type resolution at parsing time.
  • A new SPI SecurityAnalysisJsonPlugin allows to provide jackson modules to increase JSON serialization with, in particular, new action types.

@miovd @geofjamg : does this module-based plugin looks OK to you ?
In the existing code, there are only plugins for extensions serialization, for which we have provide SPI at the more granular serializer/deserializer level, so the approach is a little different here ...

Use jackson mechanisms for type resolution.
One serializer/deserializer for each action type.

Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
third party actions serialization.

Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
@sylvlecl sylvlecl requested review from miovd and geofjamg October 17, 2022 13:17
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

86.4% 86.4% Coverage
0.0% 0.0% Duplication

@miovd miovd merged commit 74a8c36 into main Oct 18, 2022
@miovd miovd deleted the actions-json-serialization-plugins branch October 18, 2022 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants