openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

[BUG][Java] useAbstractionForFiles does not work properly on docs .md

Open jcolladosp opened this issue 1 year ago • 1 comments

Bug Report Checklist

  • [X] Have you provided a full/minimal spec to reproduce the issue?
  • [X] Have you validated the input using an OpenAPI validator (example)?
  • [X] Have you tested with the latest master to confirm the issue still exists?
  • [X] 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

image

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

jcolladosp avatar Aug 21 '24 14:08 jcolladosp

yes can you please file a PR accordingly to update the mustache template for the auto-generated documentation?

wing328 avatar Aug 22 '24 07:08 wing328