OpenAPITools / OpenAPITools/openapi-generator
[BUG] documented library configOption is not available.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- What's the version of OpenAPI Generator used?
3.3.4 - Have you search for related issues/PRs?
- What's the actual output vs expected output?
Actual: Jackson annotations.
Expected: Jsonp / Jsonb / Liberty - [Optional] Bounty to sponsor the fix
Description
The documentation at https://openapi-generator.tech/docs/generators/jaxrs-spec describes the configOption "library". However, it does not work:
java.lang.RuntimeException: Unknown library: openliberty
Available libraries:
NONE
openapi-generator version
3.3.4
OpenAPI declaration file content or url
The other way round… I am Posting the maven part instead.
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/pipeline.yaml</inputSpec>
<generatorName>jaxrs-spec</generatorName>
<configOptions>
<sourceFolder>src/main/java</sourceFolder>
<interfaceOnly>true</interfaceOnly>
<useSwaggerAnnotations>false</useSwaggerAnnotations>
<library>openliberty</library>
<java8>true</java8>
<dateLibrary>java8</dateLibrary>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
Command line used for generation
mvn clean verify
Steps to reproduce
mvn clean verify
With above configuration, it is 100% reproducible
Related issues/PRs
none found
Suggest a fix
-
make sure the library option works
-
document what library=openliberty actually does (I do not know of a OpenLiberty specific API)
-
Implement jsonp or jsonb instead (
<library>jsonb</library>). The current default is Jackson, which is not even an API and forces the application to ship Jackson :(
More information: https://javaee.github.io/jsonb-spec/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the jaxrs-spec generator documentation and the Maven plugin configuration shown in the report, then run mvn clean verify with library=openliberty to confirm the failure. Compare the documented library values with the generator's accepted options; done means the configured library is recognized and its behavior is documented, or the unsupported option is removed from the documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100