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

The plugin should probably not depend on spring-core, spring-web, javax.ws.rs-api and javax.servlet-api #170

Open
murdos opened this issue Sep 8, 2024 · 1 comment

Comments

@murdos
Copy link
Contributor

murdos commented Sep 8, 2024

Excepted for the MergedAnnotations feature, most dependencies could probably be easily removed by replacing classes and enum import by String, e.g. in OperationType:

	GET("GET", "javax.ws.rs.GET", "jakarta.ws.rs.GET"),
	POST("POST", "javax.ws.rs.POST", "jakarta.ws.rs.POST"),

rather than:

	GET(RequestMethod.GET, javax.ws.rs.GET.class, "jakarta.ws.rs.GET"),
	POST(RequestMethod.POST, javax.ws.rs.POST.class, "jakarta.ws.rs.POST"),

This would lower required dependencies, and limit security surface.

And these dependencies should probably be just test dependencies.

murdos added a commit to murdos/openapi-maven-plugin that referenced this issue Sep 9, 2024
murdos added a commit to murdos/openapi-maven-plugin that referenced this issue Sep 9, 2024
@kbuntrock
Copy link
Owner

kbuntrock commented Sep 12, 2024

I agree, reducing the surface of dependencies has some sweet advantages.

As you mention, the only feature I'm using from Spring is the annotations resolver (I guess located in Spring core). Especially for their custom non standard alias mechanism. And probably for some inheritance resolving too.

Ideally, getting rid of this part would be nice too, but it brings other problems. I have no idea yet if the spring annotation resolver internals are complex or not and if it worth to be re-implemented.

Other than that, I see no issues getting rid of the other dependencies.

kbuntrock pushed a commit that referenced this issue Oct 2, 2024
It's kept only for compiling tests
See #170
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

No branches or pull requests

2 participants