OpenAPITools / OpenAPITools/openapi-generator
[BUG][Java] useAbstractionForFiles does not work properly on docs .md
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
useAbstractionForFiles changes File by org.springframework.core.io.Resource as the return type in the api classes.
This was done in the following MR: https://github.com/OpenAPITools/openapi-generator/pull/13168/files
However in the documentation files generated in markdown, the return type it's still File, and the example code doesn't use a org.springframework.core.io.Resource
openapi-generator version
7.8.0
Steps to reproduce
Use property useAbstractionForFiles = true
Related issues/PRs
https://github.com/OpenAPITools/openapi-generator/issues/10665
Suggest a fix
I think the documentation files should use org.springframework.core.io.Resource if useAbstractionForFiles=true
And the example code snippet should be modified accordingly
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 reproducing the Java generation with useAbstractionForFiles=true and inspect the generated Markdown documentation and example code. Compare their File types with the API classes changed by pull request 13168; done means the Markdown return type and example use org.springframework.core.io.Resource consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100