swagger-api / swagger-api/swagger-parser
Request for a Simplified Swagger Parser with Minimal Dependencies
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 867
- Forks
- 560
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
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:
- 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.jakartaandjakarta.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?
- Core Simplicity Missing: For a YAML/JSON parser, dependencies like
SnakeYAMLandObjectMapperare understandable, but even these come with their own CVE risks. However, the other dependencies seem unnecessary for the core functionality. - 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by auditing the project's dependency graph and parser components; implementation would require an agreed scope for dependency removal, reflection changes, and modernization before completion can be measured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100