swagger-api / swagger-api/swagger-codegen-generators

Can we specify package structure relative to the generated directory in swagger

Open
#1,090 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
299
Forks
439
PR merge metrics
No merged PRs in 30d

Description

Currently the issue is we have to generate two openapi specs A and B both of which use the package C as common models.
So we want to generate common models in one directory and the different models in A and B in different directories.

When we are generating the models for both the openapi secification in the same directory then models which are different in package A and B but share the common name are getting replaced. So we were wondering if we can specify the directory for some of the openapi models while their generation?

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 tracing how the generator handles package and output-directory settings for models shared by two OpenAPI specifications. Reproduce generation with common package C and colliding model names in A and B; done means distinct output directories can be selected for those models without overwriting shared models.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.