OpenAPITools / OpenAPITools/openapi-generator
[BUG] Update swagger-parser dependency to fix relative reference resolution in parameter examples
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
We have identified an issue with resolving relative references in parameter examples within OpenAPI specifications. This problem affects the proper parsing and resolution of $ref references in parameter examples when they point to relative paths.
Root Cause
The issue stems from the underlying swagger-parser library's handling of relative references. We have reported this upstream issue to the swagger-parser project:
Related Issue: https://github.com/swagger-api/swagger-parser/issues/2229
Proposed Solution
Once the swagger-parser team resolves and releases a fix for the relative reference resolution issue, we need to:
- Update the swagger-parser dependency in openapi-generator to the latest version containing the fix
- Test the resolution of relative references in parameter examples
- Ensure backward compatibility is maintained
Impact
This fix will improve:
- Proper resolution of relative
$refreferences in parameter examples - Better compliance with OpenAPI specification standards
- Enhanced reliability when processing complex OpenAPI documents with relative references
Steps to Reproduce (if applicable)
- Create an OpenAPI specification with parameter examples using relative
$refreferences - Process the specification with openapi-generator
- Observe that relative references in parameter examples are not resolved correctly
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
Start by checking the openapi-generator dependency configuration for swagger-parser and the upstream swagger-parser issue 2229. Wait for the upstream fix and released version, then update the dependency, add coverage for relative references in parameter examples, and verify backward compatibility; no specific file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100