OpenAPITools / OpenAPITools/openapi-generator

Maven Spring Generator split API/Model/... into different modules

Open
#12,869 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

If not already possible, I'd like to propose a new feature to split the API/Model/... not just into different packages but also different modules.

Our current project which we created manually looks like this:

  • Project (Parent with packaging pom)
    • App (Module with packaging jar) contains the Application and the Controller Class. Injecting Services which implement the ServiceApi.
    • Model (Module with packaging jar) contains the Models.
    • ServiceApi (Module with packaging jar) contains the Interfaces for the Services by using the Model classes.
    • Services (Module(s) with packaging jar) one for each Impl of the ServiceApi we can inject into the App.

When we could at least use your generator to create the Project, App module and Model module, that would be great :)

openapi-generator version

We are currently using

  • groupId: org.openapitools
  • artifactId: openapi-generator-maven-plugin
  • version: 5.4.0

but are open to use any other version.

OpenAPI declaration file content or url

Following the OpenApi3 Spec

Suggest a fix/enhancement

Additional configuration params or additionalProperties for the plugin in the pom.xml like

  • apiModule
  • modelModule
  • ...

Thanks, kopi

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 locating the Maven Spring generator and reviewing how its current API and model packages are configured. Compare the requested App, Model, ServiceApi, and Services module layout with the generator's existing options and the suggested apiModule and modelModule parameters. Done means the generator can produce the requested module separation through documented configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.