Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #1815
Closed
Open
Issue created Jan 04, 2019 by Administrator@rootContributor

[BUG][CLIENT][JAVA] artifactVersion is not taken from specification

Created by: mindhaq

Description

When the options for the generator do not provide artifactVersion, in the generated pom.xml, the <version> is always 1.0.0. It should be the version provided in the openapi specification file.

openapi-generator version

3.3.4

OpenAPI declaration file content or url
openapi: "3.0.0"
info:
  title: Title
  description: Description
  version: "1.2.0"
Command line used for generation
openapi-generator generate \
    --input-spec ./spec.yml \
    --output ${outdir} \
    --generator-name java \
    --config config.client-java.json \
    --enable-post-process-file \
    --group-id com.minhdaq \
    --artifact-id project
{
  "java8": true,
  "dateLibrary": "java8",
  "useBeanValidation": true,
  "library": "resttemplate",
}
Steps to reproduce

Create an API with version information. Find 1.0.0 instead of that version in the pom.xml.

Suggest a fix

Use version from YML in pom.xml.

Assignee
Assign to
Time tracking