OpenAPITools / OpenAPITools/openapi-generator

[PYTHON][5.0.0beta2] Customization from config file, new supporting files not generated

Open
#7,954 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Server: Python
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

I am interested in the functionality described in Customization with the 5.0.0 version where we can specify additional files to be generated through a configuration file.

I tried to generate a python-flask server with two additional files : Author.md and python-logging.mustache. But they don't seem to be generated.

Either I am missing something or this is not yet available.

openapi-generator version

openapi-generator 5.0.0beta2

Files used

The configuration files used

templateDir: custom_template
additionalProperties:
  debugSupportingFiles: true
  packageName: python_com
  packageVersion: 1.0.1
  serverPort: 9090
files:
  Author.md : {}
  python-logging.mustache:
    folder: addon
    destinationFilename: python-logging.py
    templateType: SupportingFiles

Folder architecture

.
├── config.yaml
├── custom_template
│   ├── Author.md
│   └── python-logging.mustache
└── folder_archi

1 directory, 4 files
  
Command line used for generation

As for the command line used to generate the python-flask server.

 java -jar path/to/openapi-generator-cli-5.0.0-beta2.jar generate -g python-flask -i path/to/petstore.yaml -o outdir -c config.yaml 

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

Reproduce the reported generation using config.yaml, custom_template/Author.md, custom_template/python-logging.mustache, and the shown openapi-generator CLI command. Compare the generated output with the requested Author.md and addon/python-logging.py files; the issue is done when both supporting files are generated according to the configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, yaml
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.