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
  • #3272
Closed
Open
Issue created Jul 03, 2019 by Administrator@rootContributor0 of 1 checklist item completed0/1 checklist item

[BUG][Java][client] `mvn package` fails on Javadoc error

Created by: bkabrda

Bug Report Checklist

  • [*] Have you provided a full/minimal spec to reproduce the issue?
    • Any spec reproduces this, even the one included in samples
  • [*] Have you validated the input using an OpenAPI validator (example)?
  • [*] What's the version of OpenAPI Generator used?
    • seems all versions are affected, tested on 4.0.2 and master
  • [*] Have you search for related issues/PRs?
  • [*] What's the actual output vs expected output?
    • See below
  • [Optional] Bounty to sponsor the fix (example)
Description

Generated Java client (okhttp-gson) fails to build, erroring out on javadoc issues. This is reproducible even on samples/client/petstore/java/okhttp-gson for me. The output of mvn package is as follows:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.4:jar (attach-javadocs) on project petstore-okhttp-gson: MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in http://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] /Users/slavek.kabrda/programming/openapi-generator/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java:64: error: attribute not supported in HTML5: summary
[ERROR]      <table summary="Response Details" border="1">
[ERROR]             ^
# and many more error lines repeating the "table summary" error

It seems that there are 2 separate issues - the "table summary" being incorrect for HTML 5 and the other: "The code being documented uses modules but the packages defined in http://docs.oracle.com/javase/8/docs/api/ are in the unnamed module."

openapi-generator version

Seems to be both in 4.0.2 and current master.

OpenAPI declaration file content or url

Use the one included in samples.

Command line used for generation

None, just trying to build samples/client/petstore/java/okhttp-gson after cloning the repo.

Steps to reproduce
$ cd samples/client/petstore/java/okhttp-gson
$ mvn package
Related issues/PRs

None AFAICS.

Suggest a fix

For the first problem ("table summary"), we could probably easily fix the HTML to produce something that is compatible with HTML 5.

For the other issue, I guess the problem is a version combination of my JDK/maven, but I'm not a Java expert, so I don't know. Quick googling around didn't really help. My environment:

$ mvn -v
Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-04T21:00:29+02:00)
Maven home: /usr/local/Cellar/maven/3.6.1/libexec
Java version: 12.0.1, vendor: AdoptOpenJDK, runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home
Default locale: en_CZ, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.5", arch: "x86_64", family: "mac"
Assignee
Assign to
Time tracking