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

issue/200 API v2 Maven Module #223

Merged
merged 11 commits into from
Oct 14, 2024
Merged

Conversation

hhund
Copy link
Member

@hhund hhund commented Sep 4, 2024

New api infrastructure, api v2 module and upgrade to HAPI 7.4.0.

  • new process plugin api v2 module with dependency to HAPI FHIR 7.4.0, old process plugin api v1 module still has dependency to HAPI FHIR 5.1.0
  • HAPI dependency versions now managed via properties hapi.fhir.version and hapi.fhir.version.v1
  • upgraded HAPI FHIR dependency of DSF FHIR and DSF BPE application to 7.4.0, remove not needed workarounds and added a new ones to SnapshotGeneratorImpl and ResourceValidatorImpl in dsf-fhir-validation
  • added Task profile test to dsf-fhir-validation
  • added missing thymeleaf dependency to dsf-common-ui module
  • refactored code to use switch expressions with pattern matching where possible
  • set log level for ca.uhn.fhir.parser.LenientErrorHandler to ERROR to suppress "Unknown element 'author' found while parsing" messages generated during startup
  • removed dsf dependencies from process plugin api v1 module and copied dependend code into the module
  • to allow v1 and v2 to have different HAPI versions as dependencies, no code with dependencies to classes from HAPI can be loaded by the BPE app class loader as theses classes could not be linked to different HAPI versions via the v1 or v2 api class loaders. Unfortunately this requirement leads to duplicated code between the api v1, api v2 and the bpe modules.

Known Issues / TODOs:

  • The current (v1.0.1.0) Ping/Pong Process does not work with this branch. The reason for this is that the Ping Status Extension in Line 37 has a bad min = 3 configuration, now interpreted differently by the FHIR Validator of HAPI 7.4.0 resulting in invalid Task resources. We could implement a workaround that fixes the extension StructureDefinition or release a fixed process plugin.

closes #200
closes #201

* new process plugin api v2 module with dependency to HAPI FHIR 7.4.0,
old process plugin api v1 module still has dependency to HAPI FHIR 5.1.0
* HAPI dependency versions now managed via properties hapi.fhir.version
and hapi.fhir.version.v1
* upgraded HAPI FHIR dependency of DSF FHIR and DSF BPE application to
7.4.0, remove not needed workarounds and added a new ones to
SnapshotGeneratorImpl and ResourceValidatorImpl in dsf-fhir-validation
* added Task profile test to dsf-fhir-validation
* added missing thymeleaf dependency to dsf-common-ui module
* refactored code to use switch expressions with pattern matching where
possible
* set log level for ca.uhn.fhir.parser.LenientErrorHandler to ERROR to
suppress "Unknown element 'author' found while parsing" messages
generated during startup
@hhund hhund added this to the 2.0.0 milestone Sep 4, 2024
@hhund hhund requested a review from wetret September 4, 2024 00:07
@hhund hhund self-assigned this Sep 4, 2024
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Copy link
Member

@wetret wetret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for the valuable adjustments and additions. Here are some comments.

hhund added 8 commits October 3, 2024 13:18
HAPI bug workaround will never be removed from API v1 implementation.
The JsonAlias annotations were introduced to allow deserialization of
older TargetImpl objects in DSF 0.x that used the alias values as
property names.
Introduced new HAPI version property for plugin API v2.
Replaced hard-coded HAPI version numbers in dsf-bpe-server-jetty and api
v2 modules with version properties.
* New ProcessPluginApiClassLoaderFactory to create
ProcessPluginApiClassLoader instances with allow lists for classes and
resources.
* Default allowed classes and resources stored in jar internal text
files for v1 and v2. Lists are incomplete for now
@hhund hhund merged commit 854f645 into develop_2 Oct 14, 2024
4 checks passed
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.

Web Application Style Class Loading for Process Plugins Create API v2 Maven Module
2 participants