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

Request for a Simplified Swagger Parser with Minimal Dependencies #2148

Open
YunaBraska opened this issue Dec 31, 2024 · 0 comments
Open

Request for a Simplified Swagger Parser with Minimal Dependencies #2148

YunaBraska opened this issue Dec 31, 2024 · 0 comments

Comments

@YunaBraska
Copy link

YunaBraska commented Dec 31, 2024

Issue Description:

Dear Team,

I am using the Swagger parser, and while its functionality is appreciated, the sheer number of dependencies introduced by the library is problematic. Below are my observations and concerns:

  1. Excessive Dependencies: The library adds over 50 additional dependencies to my project. Some examples:
  • org.slf4j: Not necessary for a simple parser. It clutters logs with irrelevant prompts for adding more dependencies.
  • com.github.java-json-tools: This library appears to be inactive.
  • com.sun.activation.jakarta and jakarta.xml.bind: Outdated and unreliable with newer Java versions, especially in stricter environments.
  • org.mozilla:rhino: JavaScript? What?
  • apache.httpclient: The use case here is unclear.
  • com.google.guava, org.apache.commons:commons-lang3, commons-io: Why are these required for basic parsing?
  1. Core Simplicity Missing: For a YAML/JSON parser, dependencies like SnakeYAML and ObjectMapper are understandable, but even these come with their own CVE risks. However, the other dependencies seem unnecessary for the core functionality.
  2. Reflections and Overhead: The library’s reliance on reflection further complicates its use and limits performance optimization.

Proposal:

  • Simplify the Library: Rebuild the parser using plain Java, focusing on minimalism. Most parsing tasks can be achieved without additional libraries.
  • Reduce Dependencies: Restrict dependencies to absolute essentials like SnakeYAML and ObjectMapper, provided their risks are mitigated.
  • Modernize: Remove outdated or dead dependencies like com.github.java-json-tools.
  • Avoid Reflection: Replace reflective mechanisms with straightforward, efficient alternatives.

This library has great potential but could be significantly better with these improvements. My goal is not to replace it, but to help make it a cleaner, more reliable tool for everyone.

Looking forward to your thoughts and potential roadmap for addressing these issues.

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

1 participant