user14273096
user14273096

Reputation: 11

How to include swagger-parser in Java program without Maven?

I want to include swagger-parser in Java, so that I can parse JSON or YAML files to extract the required information. I am using it as a JAVA program/application and not on a server or Springboot. I have googled a lot, but the installations required Maven. Could someone help with how I can install and integrate the swagger-parser with JAVA program please (preferably local installation)? Thank you.

Upvotes: 0

Views: 512

Answers (1)

RoToRa
RoToRa

Reputation: 38441

I'm not familiar with swagger-parser, however in cases like these you'll need to download the swagger-parser JAR file and the JAR files of its dependencies (this will be probably into the dozens) and put then into the lib directory of your project.

  1. Go to the swagger-parser page in Maven Central: https://mvnrepository.com/artifact/io.swagger.parser.v3/swagger-parser
  2. Click on the version you want (most likely the most current one: 2.0.21).
  3. At the top where it says Files click on jar to download the JAR file.
  4. Scroll down to the next table which is labeled Compile Dependencies.
  5. For each of the entries in there click on the version number.
  6. Now you will have to recursively repeat starting from step 3 to download each JAR file and in turn their compile dependencies.

As I said this will probably be dozens of files, so this will be a lot of work, so you may want to consider learning about Maven and using it, because it will do all the downloads for you.

Upvotes: 1

Related Questions