OpenAPITools / OpenAPITools/openapi-generator

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

Open
#19,412 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
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

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.