de-jena / MDO

Model based Data Organizer
Other
1 stars 1 forks source link

Fix for issue with Swagger Jakarta dependencies' OSGi metadata, and more #7

Open ideas-into-software opened 1 year ago

ideas-into-software commented 1 year ago
ideas-into-software commented 1 year ago

@juergen-albert

Problem which you reported 7 months ago @ https://github.com/swagger-api/swagger-core/issues/4354 could not be fixed on Swagger project side – first thing I tried is the solution you proposed in https://github.com/swagger-api/swagger-core/issues/4354 but that did not work.

This problem turned out to be on Transformer itself – it was missing entry for jakarta.validation.constraints=[3.0,4.0) in its configuration (/org.eclipse.transformer.cli/src/main/resources/org/eclipse/transformer/jakarta/jakarta-versions.properties) – that missing configuration was added , transformer rebuilt under bumped version, and resulting artifact used to rebuild (transform) https://github.com/swagger-api/swagger-core artifacts. Those artifacts in turn are included in local repository of MDO project for now – until released; see diff of this commit for more details.

Unfortunately, since https://github.com/eclipse/transformer itself is currently at version 0.5.0 (released) 0.6.0 (repository), and https://github.com/swagger-api/swagger-core was using org.eclipse.transformer:org.eclipse.transformer.cli:0.2.0, and there are significant differences in API between 0.2.0 and 0.5.0, I cannot submit PR to https://github.com/eclipse/transformer repository – so attached is modified transformer 0.2.0 (version bumped to 0.2.1).

Those rebuilt Swagger artifacts are for Jakarta EE 9 (Jakarta Servlet API 5.0, etc.), but MDO is not even at Jakarta 5 now – as you know, it is currently still using Java Servlet. Migrating MDO to Jakarta Servlet is separate from fixing this issue which is now fixed – please let me know how you’d like to proceed / if you need help with MDO upgrade. In addition, please let me know if I should also tackle upgrade of Swagger artifacts to Jakarta EE 10 (Jakarta Servlet API 6.0, etc.).

transformer_with_jakarta-validation-constraints.zip

juergen-albert commented 1 year ago

I'll take a closer look at the PR in the coming Days.

Regarding the Transformer issue: The fastest solution would be to raise an issue in the project. If it is just the property that is missing it is likely that BJ will fix it quicker then if I would create a PR for it.

What was the issue with you creating a PR? A missing CLA (Committer License Agreement)?

ideas-into-software commented 10 months ago

@juergen-albert

As per information received from swagger-core developers ( https://github.com/swagger-api/swagger-core/issues/4485#issuecomment-1862260026, https://github.com/swagger-api/swagger-core/issues/4354#issuecomment-1862259470), this is now fixed and latest release (2.2.20) contains this fix. Therefore, instead of using custom-built Swagger artifacts, we can switch to the official release and remove those from MDO’s local repository.