swagger-api / swagger-api/swagger-parser

V2 converter depends on javax not jakarta packages

Open
#1,981 1 comment 11 reactions 1 assignee View on GitHub

@frantuma is already working on this.

Since May 2, 2024.

Dominant language
Java
Stars
867
Forks
560
Avg merge
2d 21h
Merged PRs (30d)
7

Description

If you try to use the converter in a modern Jakarta-packaged application you get problems with duplicate classes in swagger-core and swagger-annotations. The workaround is to exclude them and depend explicitly on the jakarta-based versions, e.g:

		<dependency>
			<groupId>io.swagger.core.v3</groupId>
			<artifactId>swagger-core-jakarta</artifactId>
			<version>2.2.9</version>
		</dependency>
		<dependency>
			<groupId>io.swagger.parser.v3</groupId>
			<artifactId>swagger-parser-v2-converter</artifactId>
			<version>2.1.16</version>
			<exclusions>
				<exclusion>
					<groupId>io.swagger.core.v3</groupId>
					<artifactId>swagger-core</artifactId>
				</exclusion>
				<exclusion>
					<groupId>io.swagger.core.v3</groupId>
					<artifactId>swagger-models</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

This is kind of annoying, even though it's a problem that is created by the core libraries. It seems we need to have a "-jakarta" version of the converter library too?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.