[BUG][Java] Generated README points to the wrong model package
Bug Report Checklist
- [x] 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?
- [x] Have you searched for related issues/PRs?
- [x] What's the actual output vs expected output?
- [ ] [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
The README generated using -g java told me to import OpenAPI models from org.openapitools.client.models.*, not model.*
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.DefaultApi;
openapi-generator version
❯ openapi-generator --version
openapi-generator-cli 7.8.0
commit : 6bdc452
built : -999999999-01-01T00:00:00+18:00
source : https://github.com/openapitools/openapi-generator
docs : https://openapi-generator.tech/
Reproduction instructions
openapi-generator generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g java -o ~/sandbox/petstore-openapi-java
Suggest a fix
Happy to contribute a fix on this. I believe it's this line: https://github.com/OpenAPITools/openapi-generator/blob/7a7c8c19ab66c2f0d54842c0945ed675cc114b1e/modules/openapi-generator/src/main/resources/Java/README.mustache#L125
but I don't know where the template input is coming from.
i think this line: https://github.com/OpenAPITools/openapi-generator/blob/7a7c8c19ab66c2f0d54842c0945ed675cc114b1e/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/README.mustache#L93
can you please file a PR with the suggested fix?
Edit: and this one as well
https://github.com/OpenAPITools/openapi-generator/blob/7a7c8c19ab66c2f0d54842c0945ed675cc114b1e/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_doc.mustache#L29
Should it stay invokerPackage or should it instead reference modelPackage? If you point me to where those templates get expanded I can dig a little