OpenAPITools / OpenAPITools/openapi-generator

not generated parent tag on final generated pom.xml (only works with generator spring)

Open
#9,078 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

Pom parent tag is not created on jax-rs/jaxrs-resteasy... on generated pom.xml , but works using generator = spring

openapi-generator version

last version using docker image run

OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate  \
                        -i /local/$OPEN_APIFILE_NAME \
                        -g jaxrs-spec  \
                        --api-package myapi.resource \
                        --model-package myapi.dto \
                        -o /local/generated-apis-stubs \
                        -c /local/config.yaml 

The config.yaml looks like this

additionalProperties:
  artifactId: myamazingapi
  groupId: com.me
  serializableModel: "true"
  dateLibrary: java8
  interfaceOnly: true
  parentArtifactId: myparentArfitactId
  parentGroupId: com.me
  parentVersion: 1.0.0

On generated pom.xml there is no parent tag

But with generator spring works:

docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate  \
                        -i /local/openapi-spec.yaml \
                        -g spring  \
                        --api-package myapi.resource \
                        --model-package myapi.dto \
                        -o /local/generated-apis-stubs \
                        -c /local/config.yaml 

you can see the parent tag generated inside.

Related issues/PRs
Suggest a fix/enhancement

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 running the provided Docker command with generator jaxrs-spec, config.yaml, and the same OpenAPI input, then inspect generated-apis-stubs/pom.xml. Compare it with the pom.xml produced by the spring generator and verify whether the configured parentArtifactId, parentGroupId, and parentVersion are represented. Done means the jaxrs-spec generated pom.xml contains the expected parent tag.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
api, backend
Issue type
Bug
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.