OpenAPITools / OpenAPITools/openapi-generator

[REQ] Model destination folder

Open
#16,744 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Hi,

I tried to generate models on different folder with:
"openapi-generator-cli generate -i src/api/pokeapi.yaml -g typescript-axios -o src/api --model-package models"
or
"openapi-generator-cli generate -i src/api/pokeapi.yaml -g typescript-axios -o src/api --additional-properties='modelPackage=models'"

I want that models would be created on folder src/api/models, but this file structure was created:
image

Is this possible with any command parameter ?

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 openapi-generator-cli command with the typescript-axios generator and the modelPackage/model-package options shown in the issue. Trace how that option affects the generated output, and consider the work complete when models are placed under src/api/models without creating the extra structure shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
cli, tooling
Issue type
Feature
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.