Upgrade swagger from 2.0 to swagger/openapi 3.0

I am compiling on command line and here are the logs: danielkayiwa@Daniels-MBP idgen % mvn clean install[INFO] Scanning for projects - Pastebin.com

just add a reference omod-1.8 inside omod/pom.xml as seen below

		<dependency>
			<groupId>org.openmrs.module</groupId>
			<artifactId>webservices.rest-omod-1.8</artifactId>
			<version>${WEBSERVICES_VERSION}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.openmrs.module</groupId>
			<artifactId>webservices.rest-omod-1.8</artifactId>
			<version>${WEBSERVICES_VERSION}</version>
			<classifier>tests</classifier>
			<scope>test</scope>
		</dependency>

Shouldnโ€™t you be doing that in the pull request. :smile:

Yeah sure :grinning::grinning::grinning:. I just didnt commit the change.

1 Like

Ping me to test again after you have committed it.

1 Like

i have made the commit.

Your commit still has some compiler errors on running mvn clean install

True, some tests are failing that i will look into after fixing the failing test on rest module PR but what i did is i just went ahead and skipped the tests and used the omod to test and confirm generation of swagger documentation for the idgen module.

I have made a fix for the test that was failing on RESTWS-958: Upgrade swagger to 2.2.23 by mherman22 ยท Pull Request #631 ยท openmrs/openmrs-module-webservices.rest ยท GitHub and it is ready for review.

I have tested exactky how @dkayiwa advised (simpler than the sdk :slight_smile: ), by running mvn jetty:run in the openmrs-score/webapp and adding the legacy ui, the rest module with changes in that PR.

I also added the omods below that have the updated swagger changes.

screenshot of how that looks now

cc: @ibacher @dkayiwa

1 Like

So, you no longer have runtime errors. Correct?

On the rest module yes.

I am now working on the idgen module to fix its failing tests.

3 Likes

Hey @dkayiwa I am having some persistent test errors on the idgen module especially this class here openmrs-module-idgen/api/src/test/java/org/openmrs/module/idgen/service/IdentifierSourceServiceTest.java at master ยท openmrs/openmrs-module-idgen ยท GitHub which passes on Platform v1.10.2 but is failing on v2.0.0 and the culprit is the underlying spring version (4.1.4-release)'s handling of transactions and concurrency.

This is the commit I made (Chore): Upgrade OpenMRS Platform version to 2.x from 1.x that does the upgrading. The failing tests are those I have annotated with @Ignore for now.

Any pointers?

Just a note that changing the minimum platform version required for a module is always a breaking changeโ€ฆ

1 Like

i have done most of the necessary changes in the modules and all works just fine with the changes referencing what we have at RESTWS-958: Upgrade swagger to 2.2.23 by mherman22 ยท Pull Request #631 ยท openmrs/openmrs-module-webservices.rest ยท GitHub.

The following are the modules have all been fixed and most of them were throwing an InvalidActivationKeyException (OpenMRS 2.7.0-SNAPSHOT API) which i fexd by properly reorganizing the dependencies and how they are being managed within those modules.

However @dkayiwa @ibacher , i am still having trouble with the idgen module and i would be glad if you had a look at it. Here is the particular class thatโ€™s causing headace RESTWS-958: Ensure the module's rest is updated to use swagger 3.0 by mherman22 ยท Pull Request #125 ยท openmrs/openmrs-module-idgen ยท GitHub.

And feel free to review the rest of the work especially RESTWS-958: Upgrade swagger to 2.2.23 by mherman22 ยท Pull Request #631 ยท openmrs/openmrs-module-webservices.rest ยท GitHub.

2 Likes

@ibacher @dkayiwa when you get time