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?
Description
There is no available option to be able to use "Readme.mustace", "api_doc.mustache" and "model_doc.mustache" template files in cpp-ue4.
My suggestion is to introduce an optional property to the generating call: generateReadme = true, which by default will be false, so won't be a breaking change. If this property is enabled, your templates can use the Readme template file and generate an "index.md". The "index" name was chosen so that mkdocs can be used including multiple services generated via OpenAPI and this way can create a page for each of them and use the mkdocs index section feature.
For "api_doc" and "model_doc" there are already the global properties: apiDocs and modelDocs. My suggestion is to use them and only update CppUE4ClientCodegen to add the mustache templates into modelDocTemplateFiles and apiDocTemplateFiles structures as it's done with other languages.
openapi-generator version
I am using the latest version - master.
Generation Details
java -ea -server -Duser.timezone=UTC -jar openapi-generator-cli.jar generate -o /MyOutDis/ -i /MySpecsFile.yml -t /MyTemplateDir/ -g cpp-ue4 --global-property apiDocs=true --global-property modelDocs=true -p generateReadme=true
Steps to reproduce
1, Make these files ("Readme.mustace", "api_doc.mustache" and "model_doc.mustache") in your template directory
2. Generate using OpenAPI with cpp-ue4 language and enable the apiDocs and modelDocs options.
3. Note that no md files were generated
Suggest a fix
I opened a PR with the suggested solution: #17762